Wi-Fi handshake — simplified model
When a device connects to a WPA2 network, a 4-way handshake takes place. During this process, the PMK (Pairwise Master Key) is derived from the network password (PSK):
PMK = PBKDF2-HMAC-SHA1(password, salt=SSID, 4096 iterations, 32 bytes)
The PBKDF2 computation with 4096 iterations makes WPA2 password brute-force attacks slower by increasing the computational cost of testing each password candidate.
This challenge is not based on a real PCAP file. Instead, it uses a simplified, plaintext, theoretical model of the WPA2 handshake mechanism. In this challenge, the MIC (Message Integrity Code) is calculated using the following algorithm:
import hashlib
import hmac
PMK = hashlib.pbkdf2_hmac(
'sha1',
password.encode(),
SSID.encode(),
4096,
dklen=32
)
KCK = hmac.new(
PMK,
b'KCK-soddalashtirilgan',
hashlib.sha1
).digest()[:16]
MIC = hmac.new(
KCK,
b'EAPOL-FRAME-PLACEHOLDER',
hashlib.sha1
).digest()[:16]
Network parameters:
- Network name (SSID):
SamSU_WiFi - Number of iterations:
4096 - PMK length:
32 bytes - KCK length:
16 bytes - MIC length:
16 bytes
Captured theoretical MIC value (HEX):
71ad0997c0ee3e3f3f4eb852e632633c
The attached file parollar_royxati.txt contains 8 possible password candidates. Your task is to calculate the PMK, KCK, and MIC for each candidate using the algorithm provided above, and compare the resulting MIC values with the given target value.
Main objective: Identify the single password candidate whose calculated MIC exactly matches the provided MIC value.
Flag format:
BAYROQ{F0R3N_WIFI_<discovered_password>}
Once you identify the correct password, append it after the F0R3N_WIFI_ prefix to construct the complete flag.
Example: If the discovered password is example123, the expected answer should be:
BAYROQ{F0R3N_WIFI_example123}
Note: Submit the complete flag, not just the discovered password. Make sure to preserve the correct capitalization, underscores, and curly braces.