Techniques which decides if a new device can join the normal or a special network.
A captive portal forces a client to an authentication page. After authentication in a normal low-security environment (where you cannot assume preconfigured systems) the authentication is usually granted to a combination of MAC and IP. Therefore, try to sniff valid pairs and use them.
Attack vectors
- Sniff the network for credentials
- Interal portal services may not use SSL.
- Sniff pairs of IP and MAC and reuse them after they didn’t showed up after a few minutes. (Take care for timeouts.)
- Attack the captive portal
- Old embedded system?
- Old OS?
- Old framework?
- Attack other authenticated client devices to use the connecion through them.
- Attack other client devices before authenciation.
- Attack services like DNS or DHCP which are used before authentication.
Notes
- NAP was supported until Windows Server 2012.
- NPS Network Policy Services from Windows Server 2016 on.
- Sometimes are “special” devices excluded from normal authentication. E.g. are new iPads allowed from the upper management, which normal employees not have. Try to impersonate as another device can help, e.g. use something like a User Agent switcher in a browser and see if the captive portal changes.
- Sometimes NAC detection systems check only every n (5?) minutes if the traffic looks right and let all traffic through in the meantime due to performance reasons. This means that an attacker needs only to make one forged connection and can then use the interface for some time also with different packets.
- Try to replay captured traffic from a victim each n minutes.
- This may be sufficient to convince the NAC system that the system is still active and doesn’t hit the timeout.
- However, the traffic could get back to the attackers system and lead to the generation of a RST packet because the attacker’s system doesn’t know how to handle the response for which it never sent a request. This RST packet would signal to the NAC system that this connection is over. To circumvent this, the attacker would simply prevent his system from sending RST packets:
iptables -F
iptables -A OUTPUT -p tcp --destination-port 80 --tcp-flags RST RST -s $mysqlf -d $target -j DROP
Tools
Cpscam.pl: Detect pairs of IPs and MAC addresses which were not used for some time with cpscam.pl:
perl cpscam.pl eth0 192.168.178.0 255.255.255.0
Capturing traffic ..
Sat May 1 19:44:51 2021
Sat May 1 19:45:12 2021
Host 192.168.178.1 has been inactive for 21 seconds.
p0f: Scan passivly for devices. And alerts about devices which “doesn’t look right” and could be forged ones.
# p0f .-[ 192.168.178.1/33553 -> 192.168.178.38/80 (syn) ]- | | client = 192.168.178.1/33553 | os = Linux 2.2.x-3.x | dist = 0 | params = generic | raw_sig = 4:64+0:0:1460:mss*20,6:mss,sok,ts,nop,ws:df,id+:0 | `----
OPNsense is a Linux-based framework for detecting the action in a network.
Paketfence is a NAC software for Linux to control which systems are in and can join the network.
Pre-Authentication traffic with EAP
If a network requires each client to be authenticated via IEEE 802.1X/EAP, then a switch will route unauthenticated EAP messages to a RADIUS server, which will respond to the switch if the authentication was successful.
Leave a Reply
You must be logged in to post a comment.