Link to this headingWPA (Wi-Fi Protected Access) Personal
- Also known as WPA-PSK (Pre shared key)
- Shares the same key but greater size of 256-bits
- Uses Temporary Key Integrity Protocol(TKIP), which dynamically generates a 128 bit key for every packet
- Uses [RC4](/Crypto/Symmetric Encryption/RC4)
- Takes the Hash(IV + SharedKey) as input to [RC4](/Crypto/Symmetric Encryption/RC4)
- No Forward Secrecy (No Per-Session Key)
- Old sessions can be decrypted when key is broken
- All new sessions can be decrypted when key is broken
- If key is known to mutable people anyone can manipulate data from anyone
- PTK is used to encrypt unicast traffic
- GTK is used for multicast and broadcast traffic.
Link to this heading4-way handshake
- Using the Preshared master Key (PSK) generate the Pairwise Master Key (PMK) on both the AP and the Device
- AP Generates the Group Master Key (GMK). From Random
- AP sends APNonce to Client (Message 1)
- Client sends SNonce to the AP (Message 2)
- AP generates the Pairwise Transient Key (PTK) and Breaks down into
- 128bit Key Conformation Key (KCK) for computing Message Integrity Code on EAPOL messages
- 128bit Key Encryption Key (KEK) for Distributing group keys that are sent from the AP to the client
- 128bit Temporal Key (TK) for Encrypting Unicast data packets
- 64bit Message Integrity Code Key for integrity protection on unicast data packets transmitted by the AP
- 64bit Message Integrity Code Key for integrity protection on unicast data packets transmitted by the Client
- AP generates the Group Temporal Key (GTK) either from the Group Master Key (GMK) or could be random
- 128bit Group Encryption Key (GEK) for encryption on Multicast data packets
- 64bit Group Integrity Key (GIK) for data authentication on Multicast data packets transmitted by the AP
- 64bit Group Integrity Key (GIK) for data authentication on Multicast data packets transmitted by the Client
- GTK is transfered encrypted with the PTK and sent to the Client.
- Client Acknowledges the Keys
Generate PMK:
Generate PTK:
Generate PMK and PMKID:
Link to this headingPMKID
PMKID is what is used for handing off clients between Access points. This attack is not easier but does make it easier to gather the correct packet to crack the password. It makes a single request to the AP and retrieves the response, instead of needing to be sniffing for the 4 way handshake.
The PMKID is located in 802.11 management frames.
Link to this headingFrame Encryption
Once the Access Point and the device have the PTK. Message 3 of the 4 way handshake
And once it is verified on both devices. Message 4 of the 4 way handshake.
The per packet key is made using a mix of the PTK and the packet_number.
The Nonce is appended to the beginning of the packet.
Nonces should be unique similar to IV and similar attacks when nonce repeats.
Link to this headingBruteforce
- If attackers have the first handshake bruteforce is possible.
- Ranbowtables exist for the top 1000 SSIDs
Hashcat Crack:
John Crack:
Link to this headingPacket spoofing/decryption
- Packet spoofing and decryption attacks on TKIP,
- Inject an arbitrary amount of packets with a 112 byte payload
- Can inject manipulate packets
Link to this headingSecurity Issues
- key rotation issues
- shared encryption
- passive handshake capture attacks.
Link to this headingPredicting Group Keys (33c3)
- May use Jiffy Time to generate key
- May use MD5(epoc)
Private master key is generated once at boot when entropy is bad and not changed at anypoint during operation.