Evil Twin EAP-TLS
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์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
EAP-TLS๋ WPA2/3-Enterprise์์ ์ผ๋ฐ์ ์ผ๋ก ์ ํ๋๋ โsecureโ ์ต์ ์ด์ง๋ง, ํ๊ฐ ์ค์ ๋ ๊ฐ์ง ์ค์ฉ์ ์ธ ์ฝ์ ์ด ์์ฃผ ๋ฐ๊ฒฌ๋ฉ๋๋ค:
- Unauthenticated identity leakage: outer EAP-Response/Identity๋ TLS ํฐ๋์ด ๊ตฌ์ถ๋๊ธฐ ์ ์ ํ๋ฌธ์ผ๋ก ์ ์ก๋๋ฏ๋ก, ์ค์ ๋๋ฉ์ธ ์ฌ์ฉ์ ์ด๋ฆ์ด ๋ฌด์ ์์์ ์ข ์ข leak๋ฉ๋๋ค.
- Broken client server-validation: supplicant๊ฐ RADIUS ์๋ฒ ์ธ์ฆ์๋ฅผ ์๊ฒฉํ๊ฒ ๊ฒ์ฆํ์ง ์๊ฑฐ๋ ์ฌ์ฉ์๊ฐ ๊ฒฝ๊ณ ๋ฅผ ํด๋ฆญํด์ ๋์ด๊ฐ๋๋ก ํ์ฉํ๋ฉด, self-signed cert๋ฅผ ์ฌ์ฉํ๋ rogue AP๊ฐ ์ฌ์ ํ ํผํด์๋ฅผ ์จ๋ณด๋ฉํ ์ ์์ด mutual TLS๊ฐ ์ผ๋ฐฉํฅ TLS๋ก ๋ฐ๋ ์ ์์ต๋๋ค.
Unauthenticated EAP identity leakage / username enumeration
EAP๋ TLS๊ฐ ์์๋๊ธฐ ์ ์ ์์ด๋ดํฐํฐ ๊ตํ์ ์ํํฉ๋๋ค. ํด๋ผ์ด์ธํธ๊ฐ ์ธ๋ถ ์์ด๋ดํฐํฐ๋ก ์ค์ ๋๋ฉ์ธ ์ฌ์ฉ์ ์ด๋ฆ์ ์ฌ์ฉํ๋ฉด, RF ๋ฒ์ ๋ด์ ๋๊ตฌ๋ ์ธ์ฆ ์์ด ๊ทธ๊ฒ์ harvestํ ์ ์์ต๋๋ค.
Passive harvest workflow
# 1) Park on the right channel/BSSID
airodump-ng -i $IFACE -c $CHAN --bssid $BSSID
# 2) Decode EAP frames and extract identities
# Trigger a client connection (e.g., your phone) to see the leak
tshark -i "$IFACE" -Y eap -V | grep "Identity: *[a-z]\|*[A-Z]\|*[0-9]"
Impact: ๋น ๋ฅด๊ณ ์ธ์ฆ ๋ถํ์ํ username ์์ง โ password spraying, phishing, account correlation์ ์ฐ๋ฃ๋ฅผ ๊ณต๊ธํจ. Worse when usernames match email addresses.
TLS 1.3 ๊ฐ์ธ ์ ๋ณด ๋ณดํธ vs ๋ค์ด๊ทธ๋ ์ด๋ ๊ฒ์
TLS 1.3์ client certs์ ๋๋ถ๋ถ์ handshake metadata๋ฅผ ์ํธํํ๋ฏ๋ก, supplicant๊ฐ ์ค์ ๋ก TLS 1.3์ ํ์ํ ๋ Evil Twin์ ์๋์ ์ผ๋ก client certificate/identity๋ฅผ ์์๋ผ ์ ์๋ค. ๋ง์ enterprise stacks๊ฐ ํธํ์ฑ์ ์ํด ์ฌ์ ํ TLS 1.2๋ฅผ ํ์ฉํ๋ค; RFC 9190์ rogue AP๊ฐ TLS 1.2 static-RSA suites๋ง ์ ๊ณตํด fallback์ ๊ฐ์ ํ๊ณ outer identity(์ฌ์ง์ด client cert)๋ฅผ cleartext EAP-TLS๋ก ๋ค์ ๋๋ฌ๋ผ ์ ์๋ค๊ณ ๊ฒฝ๊ณ ํ๋ค.
Offensive playbook (downgrade to leak ID):
- hostapd-wpe๋ฅผ TLS 1.2 static RSA ciphers๋ง ํ์ฑํํ๊ณ TLS 1.3์
openssl_ciphersuite/ssl_ctx_flags์์ ๋นํ์ฑํํ ์ํ๋ก ์ปดํ์ผํ๋ค. - corporate SSID๋ฅผ ๊ด๊ณ ํ๋ค; victim์ด TLS 1.3์ ์์ํ๋ฉด TLS alert๋ก ์๋ตํ๊ณ handshake๋ฅผ ์ฌ์์ํ์ฌ ํผ์ด๊ฐ TLS 1.2๋ก ์ฌ์๋ํ๊ฒ ํจ์ผ๋ก์จ cert validation์ด ์ฑ๊ณตํ๊ธฐ ์ ์ ์ค์ identity๋ฅผ ๋๋ฌ๋ด๊ฒ ํ๋ค.
- hostapd-wpe์์
force_authorized=1์ ํจ๊ป ์ค์ ํ๋ฉด client-auth๊ฐ ์คํจํ๋๋ผ๋ 4-way handshake๊ฐ ์๋ฃ๋์ด DHCP/DNS-level ํธ๋ํฝ์ ์ด์ฉํ phish๋ portal ๊ณต๊ฒฉ์ด ๊ฐ๋ฅํด์ง๋ค.
Defensive toggle (what to look for during an assessment):
- hostapd/wpa_supplicant 2.10์ EAP-TLS server and peer ์์ค์์ TLS 1.3์ ์ถ๊ฐํ์ง๋ง ๊ธฐ๋ณธ์ ์ผ๋ก disabled by default๋ก ์ ๊ณต๋๋ค; ํด๋ผ์ด์ธํธ์์
phase1="tls_disable_tlsv1_3=0"์ผ๋ก ํ์ฑํํ๋ฉด ๋ค์ด๊ทธ๋ ์ด๋ ์ฐฝ์ ์ ๊ฑฐํ ์ ์๋ค.
TLS 1.3 realities in 2024โ2025
- FreeRADIUS 3.0.23+๋ EAP-TLS 1.3์ ์์ฉํ์ง๋ง, ํด๋ผ์ด์ธํธ๋ ์ฌ์ ํ ๊นจ์ง๊ธฐ ๋๋ฌธ์(Windows 11์ EAP-TLS 1.3 ์ธ์
์ฌ๊ฐ ์์, Android ์ง์์ ๋ค์ํจ) ๋ง์ ๋ฐฐํฌ์์ ์์ ์ฑ์ ์ํด
tls_max_version = "1.2"๋ก ๊ณ ์ ํ๋ค. - Windows 11์ EAP-TLS 1.3์ ๊ธฐ๋ณธ์ผ๋ก ํ์ฑํ(22H2+)ํ์ง๋ง ์คํจํ resumptions๊ณผ ๋ถ์์ ํ RADIUS ์คํ ๋๋ฌธ์ ์ข ์ข TLS 1.2๋ก์ fallback์ ๊ฐ์๋นํ๋ค.
- TLS 1.2์ฉ RSA key exchange๋ ํ๊ธฐ๋๊ณ ์์ผ๋ฉฐ; OpenSSL 3.x๋ security level โฅ2์์ static-RSA suites๋ฅผ ์ ๊ฑฐํ๋ฏ๋ก TLS 1.2 static-RSA rogue๋ OpenSSL 1.1.1๊ณผ
@SECLEVEL=0๋๋ ๊ทธ ์ด์ ๋ฒ์ ์ด ํ์ํ๋ค.
Practical version steering during an engagement
- Force TLS 1.2 on the rogue (to leak identities):
# hostapd-wpe.conf
ssl_ctx_flags=0
openssl_ciphers=RSA+AES:@SECLEVEL=0 # requires OpenSSL 1.1.1
disable_tlsv1_3=1
- Probe client TLS intolerance: ๋ ๊ฐ์ rogue๋ฅผ ์ด์ํ๋ผ โ ํ๋๋ TLS 1.3-only๋ฅผ ๊ด๊ณ (
disable_tlsv1=1,disable_tlsv1_1=1,disable_tlsv1_2=1)ํ๊ณ ๋ค๋ฅธ ํ๋๋ TLS 1.2-only๋ก ๊ด๊ณ ํ๋ค. ์ค์ง 1.2 BSS์๋ง ์ ์ํ๋ ํด๋ผ์ด์ธํธ๋ ๋ค์ด๊ทธ๋ ์ด๋ ๋์์ด๋ค. - Watch for fallback in captures: ์ด๊ธฐ
ClientHello์supported_versions์ 0x0304๊ฐ ํฌํจ๋ ํtls.handshake.version==0x0303๋ฅผ Wireshark์์ ํํฐ๋งํ๋ผ; 0x0303๋ก ์ฌ์๋ํ๋ victims๋ ๋ค์ outer ID๋ฅผ leaking ํ๊ณ ์๋ค.
Evil Twin via broken server validation (โmTLS?โ)
Rogue APs๊ฐ corporate SSID๋ฅผ ๋ฐฉ์กํ๋ฉด ์ด๋ค certificate๋ ์ ์ํ ์ ์๋ค. ํด๋ผ์ด์ธํธ๊ฐ:
- doesnโt validate the server cert, ๋๋
- prompts the user ํ๊ณ untrusted CAs/self-signed certs๋ฅผ ์ค๋ฒ๋ผ์ด๋ํ๋๋ก ํ์ฉํ๋ฉด,
EAP-TLS๋ ๋ ์ด์ mutualํ์ง ์๋ค. client-cert validation์ ๊ฑด๋๋ฐ๋(์:
SSL_set_verify(..., 0)) ์์ ๋ hostapd/hostapd-wpe๋ง ์์ผ๋ฉด Evil Twin์ ์ธ์ธ ์ ์๋ค.
Rogue infra quick note
On recent Kali, compile hostapd-wpe using hostapd-2.6 (from https://w1.fi/releases/) and install the legacy OpenSSL headers first:
apt-get install libssl1.0-dev
# patch hostapd-wpe to set verify_peer=0 in SSL_set_verify to accept any client cert
Windows supplicant ์ค์ ์ค์ (GUI/GPO)
Windows EAP-TLS ํ๋กํ์ผ์ ์ฃผ์ ์ค์ :
- Verify the serverโs identity by validating the certificate
- ์ฒดํฌ๋จ โ ์ฒด์ธ(chain)์ด ์ ๋ขฐ๋์ด์ผ ํจ; ์ฒดํฌ ํด์ โ ๋ชจ๋ self-signed cert ํ์ฉ.
- Connect to these servers
- ๋น์ด ์์ โ ์ ๋ขฐ๋ CA์ ๋ชจ๋ ์ธ์ฆ์ ํ์ฉ; CN/SAN ๋ชฉ๋ก์ ์ค์ ํ์ฌ ์์๋๋ RADIUS ์ด๋ฆ์ ๊ณ ์ (pin).
- Donโt prompt user to authorise new servers or trusted certification authorities
- ์ฒดํฌ๋จ โ ์ฌ์ฉ์๊ฐ ์ฐํํ ์ ์์; ์ฒดํฌ ํด์ โ ์ฌ์ฉ์๊ฐ ์ ๋ขฐ๋์ง ์๋ CA/์ธ์ฆ์๋ฅผ ์ ๋ขฐํ๊ณ rogue AP์ ์ฐ๊ฒฐํ ์ ์์.
๊ด์ฐฐ๋ ๊ฒฐ๊ณผ:
- Strict validation + no prompts โ rogue cert ๊ฑฐ๋ถ๋จ; Windows๊ฐ ์ด๋ฒคํธ๋ฅผ ๊ธฐ๋กํ๊ณ TLS ์คํจ(์ข์ ํ์ง ์ ํธ).
- Validation + user prompt โ ์ฌ์ฉ์๊ฐ ์๋ฝํ๋ฉด ์ฑ๊ณต์ ์ธ Evil Twin ์ฐ๊ฒฐ.
- No validation โ ๋ชจ๋ ์ธ์ฆ์๋ก ์กฐ์ฉํ Evil Twin ์ฐ๊ฒฐ.
References
- EAP-TLS: The most secure option? (NCC Group)
- EAP-TLS wireless infrastructure (Versprite hostapd bypass)
- RFC 4282 - Network Access Identifier
- Microsoft ServerValidationParameters (WLAN profile)
- RFC 9190 โ EAP-TLS 1.3
- hostapd/wpa_supplicant 2.10 release notes (TLS 1.3 EAP-TLS support)
- FreeRADIUS TLS 1.3 support thread (Nov 2024)
- Windows 11 enabling TLS 1.3 for EAP (SecurityBoulevard, Jan 2024)
- draft-ietf-tls-deprecate-obsolete-kex
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์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


