linux hostapd EAPOL四次握手日志(基于 RTL8189 SDIO wifi 模组)

收到来自 sta 的关联请求:(从 cfg80211_new_sta 函数开始)

wlan0: STA f8:ac:65:c1:67:22 IEEE 802.11: associated
STA included RSN IE in (Re)AssocReq
  New STA
ap_sta_add: register ap_handle_timer timeout for f8:ac:65:c1:67:22 (300 seconds - ap_max_inactivity)
nl80211: Set STA flags - ifname=wlan0 addr=f8:ac:65:c1:67:22 total_flags=0x60 flags_or=0x0 flags_and=0xfffffff1 authorized=0
wlan0: STA f8:ac:65:c1:67:22 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=0x1c549d0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=f8:ac:65:c1:67:22
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
wlan0: STA f8:ac:65:c1:67:22 WPA: start authentication
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=0x1c549d0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=f8:ac:65:c1:67:22
nl80211: Set STA flags - ifname=wlan0 addr=f8:ac:65:c1:67:22 total_flags=0x60 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA f8:ac:65:c1:67:22 IEEE 802.1X: unauthorizing port
WPA: f8:ac:65:c1:67:22 WPA_PTK_GROUP entering state IDLE
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state AUTHENTICATION
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state AUTHENTICATION2
WPA: Re-initialize GMK/Counter on first station
random: Cannot read from /dev/random: Resource temporarily unavailable
random: Got 0/2 random bytes
random: Only 18/20 bytes of strong random data available
random: Allow operation to proceed based on internal entropy
Get randomness: len=32 entropy=2
random from os_get_random - hexdump(len=32): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
mixed random - hexdump(len=32): [REMOVED]
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
random from os_get_random - hexdump(len=32): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
mixed random - hexdump(len=32): [REMOVED]
Key Counter - hexdump(len=32): [REMOVED]
Get randomness: len=16 entropy=0
random from os_get_random - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
mixed random - hexdump(len=16): [REMOVED]
GTK - hexdump(len=16): [REMOVED]
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=3 addr=0x6c1e8 key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   broadcast key
Get randomness: len=32 entropy=0
random from os_get_random - hexdump(len=32): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
random_mix_pool - hexdump(len=20): [REMOVED]
random from internal pool - hexdump(len=16): [REMOVED]
mixed random - hexdump(len=32): [REMOVED]

真正开始四次握手:

1. 发送 EAPOL 请求,携带 ANonce:

WPA: Assign ANonce - hexdump(len=32): 10 0e 61 c2 b8 33 67 85 59 64 db b2 c8 e1 07 56 4b ba 63 9c 78 53 18 ba 28 6f e8 e2 fc 10 cf 3d
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state INITPSK
Searching a PSK for f8:ac:65:c1:67:22 prev_psk=(nil)
Searching a PSK for f8:ac:65:c1:67:22 prev_psk=(nil)
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state PTKSTART
wlan0: STA f8:ac:65:c1:67:22 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=1 kde_len=0 keyidx=0 encr=0)
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
print test
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 1)
wlan0: hostapd_new_assoc_sta: reschedule ap_handle_timer timeout for f8:ac:65:c1:67:22 (300 seconds - ap_max_inactivity)

2. 收到 EAPOL 响应

wlan0: Event EAPOL_RX (23) received
IEEE 802.1X: 121 bytes from f8:ac:65:c1:67:22
   IEEE 802.1X: version=1 type=3 length=117
WPA: RX EAPOL data - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 01 13 0b fa 69 e7 ff 10 69 70 69 2d fb 56 b6 95 6a 39 d0 5c 4d 38 a4 fb 0a 2f 6d d2 a4 8e f8 55 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 27 68 8f 2d 7a 5f 1f 00 2c 9b ae ca 49 cd 3a 9c 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 80 00
WPA: Received EAPOL-Key from f8:ac:65:c1:67:22 key_info=0x10a type=2 mic_len=16 key_data_length=22
WPA: EAPOL-Key header (ending before Key MIC) - hexdump(len=77): 02 01 0a 00 00 00 00 00 00 00 00 00 01 13 0b fa 69 e7 ff 10 69 70 69 2d fb 56 b6 95 6a 39 d0 5c 4d 38 a4 fb 0a 2f 6d d2 a4 8e f8 55 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: EAPOL-Key Key MIC - hexdump(len=16): 27 68 8f 2d 7a 5f 1f 00 2c 9b ae ca 49 cd 3a 9c
WPA: Received Key Nonce - hexdump(len=32): 13 0b fa 69 e7 ff 10 69 70 69 2d fb 56 b6 95 6a 39 d0 5c 4d 38 a4 fb 0a 2f 6d d2 a4 8e f8 55 82
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
Add randomness: count=6 entropy=0
random pool - hexdump(len=128): [REMOVED]
random_mix_pool - hexdump(len=8): [REMOVED]
random_mix_pool - hexdump(len=32): [REMOVED]
random pool - hexdump(len=128): [REMOVED]
wlan0: STA f8:ac:65:c1:67:22 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state PTKCALCNEGOTIATING

3. 交换密钥:

Searching a PSK for f8:ac:65:c1:67:22 prev_psk=(nil)
WPA: PTK derivation using PRF(SHA1)
WPA: PTK derivation - A1=68:b9:d3:ca:4c:c2 A2=f8:ac:65:c1:67:22
WPA: Nonce1 - hexdump(len=32): 10 0e 61 c2 b8 33 67 85 59 64 db b2 c8 e1 07 56 4b ba 63 9c 78 53 18 ba 28 6f e8 e2 fc 10 cf 3d
WPA: Nonce2 - hexdump(len=32): 13 0b fa 69 e7 ff 10 69 70 69 2d fb 56 b6 95 6a 39 d0 5c 4d 38 a4 fb 0a 2f 6d d2 a4 8e f8 55 82
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: KEK - hexdump(len=16): [REMOVED]
WPA: TK - hexdump(len=16): [REMOVED]
WPA: EAPOL-Key MIC using HMAC-SHA1
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state PTKINITNEGOTIATING
wlan0: STA f8:ac:65:c1:67:22 WPA: sending 3/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=1 kde_len=46 keyidx=1 encr=1)
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]
WPA: Encrypt Key Data using AES-WRAP (KEK length 16)
WPA: EAPOL-Key MIC using HMAC-SHA1
print test
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 1)

4. 收到确认,安装密钥

wlan0: Event EAPOL_RX (23) received
IEEE 802.1X: 99 bytes from f8:ac:65:c1:67:22
   IEEE 802.1X: version=1 type=3 length=95
WPA: RX EAPOL data - hexdump(len=99): 01 03 00 5f 02 03 0a 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 87 30 df f5 94 4d 81 4c eb 27 4f 1e 54 99 e5 70 00 00
WPA: Received EAPOL-Key from f8:ac:65:c1:67:22 key_info=0x30a type=2 mic_len=16 key_data_length=0
WPA: EAPOL-Key header (ending before Key MIC) - hexdump(len=77): 02 03 0a 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: EAPOL-Key Key MIC - hexdump(len=16): 87 30 df f5 94 4d 81 4c eb 27 4f 1e 54 99 e5 70
WPA: Received Key Nonce - hexdump(len=32): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
wlan0: STA f8:ac:65:c1:67:22 WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: EAPOL-Key MIC using HMAC-SHA1
WPA: f8:ac:65:c1:67:22 WPA_PTK entering state PTKINITDONE
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=3 addr=0x1c549d0 key_idx=0 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   addr=f8:ac:65:c1:67:22
wlan0: AP-STA-CONNECTED f8:ac:65:c1:67:22
nl80211: Set STA flags - ifname=wlan0 addr=f8:ac:65:c1:67:22 total_flags=0x61 flags_or=0x1 flags_and=0xffffffff authorized=1
wlan0: STA f8:ac:65:c1:67:22 IEEE 802.1X: authorizing port
wlan0: STA f8:ac:65:c1:67:22 RADIUS: starting accounting session 61EFEC833B924721
wlan0: STA f8:ac:65:c1:67:22 WPA: pairwise key handshake completed (RSN)

四次握手完成!!!
===================

你可能感兴趣的:(物联网学前班-公众号,嵌入式,物联网,Linux,无线子系统,hostapd,EAPOL,四次握手,linux,wireless,nl80211,RTL8189)