Buffl

WLAN

CF
by Carmen F.

802.1x Authenticatio

Uses IEEE 802.1x ("Dot1x") Port based Network Access Control for authentication

Originally designed for wired LANs, adapted for 802.11

802.1x is based on the following principles:

A device, called Supplicant, which wants to access a LAN must authenticate itself prior to gaining access

Authentication is performed by a device called Authenticator, which is usually the local switch

The Authenticator blocks access to the LAN for the Supplicant until authentication was performed successfully

An Authentication Server (AS) situated in the LAN or co-located with the Authenticator performs the actual authentication procedure and has access to all necessary credentials (passwords, shared secrets, certificates,…)

The AS is also called "AAA server" (Authentication, Authorization, and Accounting)

The Authenticator relays all messages between the Supplicant and AS during the authentication procedure via Extensible Authentication Protocol (EAP)

EAP is a meta protocol that allows execution of many different authentication protocols between Supplicant and AS without the Authenticator being aware of the exact protocol used

The actual protocol used to transport EAP messages between Authenticator and AS is not defined (a common choice is RADIUS) In case of WLAN, 802.1x is the default choice for an iBSS

A STA wanting to associate with the AP of an iBSS is a Supplicant

The AP of the iBSS is the Authenticator

The AS is located either on the AP or on a dedicated device in the DS (usual case, esp. for ESSs)

802.1x can be optionally used for an IBSS

every STA must then be able to function as an Authenticator and AS for newly joining STAs

The general procedure of authenticating a joining STA in an iBSS is described on the next slides

It is assumed that RADIUS is used as the protocol between Authenticator and AS

iBSS Procedure

The joining STA performs Open System Authentication with the AP prior to associating

Only done for compatibility reasons, no actual authentication is performed

The joining STA performs Association with the AP

AP nominally accepts Association but blocks all access to the iBSS or DS until the actual 802.1x Authentication was performed successfully

AP acting as Authenticator initiates 802.1x Authentication by sending an EAP-Request message to the STA, which will act as the Supplicant

The EAP-Request is sent as an EAPOL ("EAP over LAN") message, encapsulated in a 802.11 data frame

Alternatively, the STA/Supplicant can initiate 802.1x Authentication by sending an EAPOL-Start message to the AP, triggering the EAP-Request

The STA/Supplicant sends an EAP-Response to the AP/Authenticator which contains information on the Supplicant and the supported authentication protocols

The AP/Authenticator relays the information in the EAP-Response to the AS via the wired LAN (the DS)

In case of RADIUS, the information is sent as a RADIUS Access Request to the AS

The AS initiates a supported authentication protocol by sending a respective RADIUS-encapsulated message to the AP/Authenticator who forwards it as an EAPOL message to the STA/Supplicant

STA/Supplicant and AS now perform the negotiated auth. protocol by exchanging protocol-specific EAP messages, with the AP/Authenticator acting as relay

AP/Authenticator still allows no communication of the STA/Supplicant with other STAs on the iBSS or in the DS, except with the AS for authentication purposes

During the auth. procedure, STA/Supplicant and AS mutually authenticate each other and establish a shared secret called the Master Session Key (MSK) which is later used as PMK

AP/Authenticator and AS are assumed to be authenticated to each other (e. g. via pre-shared secret or certificate) and communicate over a secure channel

When the auth. protocol is completed successfully, the AS transmits the PMK created during authentication to the AP/Authenticator in a RADIUS Accept message

This allows the AP/Authenticator to derive the other pairwise keys

for key management purposes with the STA/Supplicant

 Upon receipt of the PMK, the AP/Authenticator finishes the authentication

procedure by sending an EAP-Success message to the now authenticated

STA/Supplicant

 Initiates key management procedures between AP and STA

Key Management - Security Analysis

In principle, an eavesdropper can capture the messages of the 4WHS to mount an offline brute force/dictionary attack in order to recover the PMK

This is especially dangerous when PSK is used as authentication method, as the PMK/PSK rarely, if ever, changes

A high entropy PSK must be used and the PSK must be immediately changed when disclosure is suspected (e. g. due to theft of a device)

Brute force attacks are harder with SAE and 802.1x authentication, as the PMK is dynamically created

Note that with PSK every STA in the BSS knows the shared secret and can therefore calculate the PTK of any other STA – 802.1x must be used when traffic should be protected from the other STAs too

This is also the case with SAE, when the same passphrase is used on multiple STAs A 4WHS can be forced by an attacker by injecting spoofed Disassociation/ Deauthentication frames

Always possible when management frame protection is not enabled (which is the usual case)

As the GTK/IGTK is shared by all devices in the same BSS, insider attacks with multi/broadcast frames are possible

GTK derivation does not use the Supplicant and Authenticator MAC addresses and hence a receiver can not reliably distinguish between MC/BC frames sent from the AP and forged frames sent by a malicious STA associated with the same iBSS

An insider can exploit this by acting as a MITM (e. g. by sending spoofed ARP requests)

A newly discovered type of attack, called Key Reinstallation AttACK (KRACK) is possible against every RSNA key management handshake

By suppressing/delaying and replaying certain handshake messages, an attacker can force the

STA/Supplicant or AP/Authenticator to reinstall an already used PTK or GTK, causing a reset of associated cryptographic parameters (nonces, replay counters)

This allows an attacker to provoke keystream reuse (i. e. some data frames are encrypted with the same nonces/keystreams), replay certain frames and possibly forge frames in one or both directions

The attack is particularly effective against WLANs protected by 802.1x authentication, as it targets the handshakes performed after the authentication

The next slide shows a KRACK procedure against the 4WHS for forcing a STA/Supplicant to reinstall an already negotiated PTK

Note that the attack is possible, because the STA/Supplicant treats the retransmission of Message 3 in the same way as the first, original Message 3 – which is actually a flaw in the 802.11 standard!

Wi-Fi Protected Setup

Wi-Fi Protected Setup (WPS) is a standard for automated setup of a WPA2-Personal/PSK protected iBSS

intended to facilitate secure configuration for end users without security know-how

Defines new protocols for automatic exchange of configuration data and derivation of a dynamic PSK

APs and STAs supporting WPS include respective information in the Beacon and Probe frames

Message exchange is done via EAP messages of custom EAP type (EAP-WSC, Wi-Fi Simple Configuration)

Three methods are defined for initial exchange of a device password (=shared secret used for authentication and PSK generation):

PIN ... user must enter an 8 digit PIN number at the AP or the STA device, PIN is either static (printed on label on device) or dynamically created by device and displayed

Near-Field Communication (NFC) ... user must establish an NFC link for exchange of credentials, e. g. via NFC-capable tags

Push Button Configuration (PBC) ... user presses a button at AP and STA device at same time

Exchange of credentials is followed by a key agreement and authentication procedure to derive a PSK

Uses a Diffie-Hellman exchange to establish a shared key followed by the exchange of keyed hashes of the device password to mutually authenticate AP and STA

PSK is derived from the shared DH key and random numbers and is therefore different for each new association (in contrast to normal WPA/WPA2-PSK) WPS with Push-Button Configuration is inherently vulnerable

A default PIN of all-0 is used, so a MITM can not be detected

Furthermore, the AP accepts any association for a certain time after pushing the button

WPS with PIN entry method using a static PIN (e. g. printed on AP) is vulnerable to an accelerated online brute force attack against the AP

The authentication procedure confirms knowledge of the PIN in two steps, first and second half of PIN is separately confirmed

In addition, the last digit of the PIN is used as checksum of the first 7 digits, reducing the entropy

An attacker can separately brute force the PIN halves, thereby reducing the max. tries from 108 to 104 + 103

Revision of WPS standard mandates that the AP enters a lockdown state after 10 failed authentication attempts to prevent this attack

Still many old implementations out there – some do not even allow WPS to be disabled!

Other WLAN security issues

An attacker can install a “rogue AP” in a target network

Allows LAN access without direct physical connection ("LAN port in the parking lot")

Can also result involuntarily, e. g. due to employee installing AP for convenience

Necessitates strict LAN-level authentication at all times (via 802.1x for wired ports) and dedicated WLAN IDS systems working together with wired IDS for detection

802.11 is exceptionally vulnerable to logical DoS via management frames when management frame protection is not enabled (usual case in SOHO networks)

Disassociation/Deauthentication frame spoofing

Fake Association DoS against AP (overflowing association table)

Spoofed Beacon Frames for setting up rogue/fake APs

Control Frames are not protected in any way

CTS-jamming/NAV attack ... attacker sends forged CTS frames with maximum reserved time to permanently occupy the NAV, depriving all other STAs from RF medium access

False packet validation attack ... attacker destroys data frame at receiver and sends fake ACK to sender to prevent retransmission for prolonged time

Many old implementations are vulnerable to fuzzing attacks

Attacker STA sends specially prepared frame with unconventional content to victim in order to crash it or gain access via exploit in WLAN driver

Disable IBSS support on WLAN NICs to mitigate attack vector

Flaws in the handling of CCMP encryption by chipsets of several major HW vendors were found that cause frames to be encrypted with an all-0 Temporal Key (or not at all) for a short while after a STA disassociates

This vulnerability, called “Kr00k”, affects a large number of existing smartphones and IoT devices and was discovered in the wake of the KRACK attacks Due to ambiguities in the 802.11 standard regarding the management of security contexts for buffered frames, an attacker can force APs of certain vendors to send buffered frames in plaintext or encrypted with an a key chosen by the attacker

Buffering of frames is part of the power save features and is triggered by a client via setting the power-management bit in a frame header - this bit is sent unprotected, allowing an attacker to force buffering of frames at the AP!

By forcefully changing the security context of a client, e.g. via spoofed authentication frames, the AP can be tricked into deleting the security context of the client, falling back to a null or all-zero encryption for the buffered frames once they are sent out

Because the SSID is not authenticated when connecting to a network, a victim can be tricked into connecting to another network with the same credentials but a different SSID via MitM-attack

This can be a problem, for example, with VPN services that disable themselves based on a trusted SSID

Implementation flaws in wpa-supplicant and IWD, two widely used client implementations, allow an attacker to trick a client into connecting to a fake network when using 802.1x authentication (wpa-supplicant)

complete a 4-way handshake with a peer without knowing the PMK, allowing decryption and forging of packets (IWD)

Author

Carmen F.

Information

Last changed