WPA2 WiFi破解 (hcxtools)
Preparation
- Kali Linux operating system
- A Wifi dongle that supports monitor mode and packet injection, I’m using
Alfa AWUS036ACMworks out of the box without any driver. - Running unsupported dongle (like
TP-Link Archer Tx35U) might end up with a crashing kernel
Attack
跟上集老方法不太一樣,這次要用hcxdumptool來抓取packet, instead of using airodump-ng
Kali Linux應該是預設安裝好了,若沒有的話可以sudo apt update && sudo apt install hcxtools,或是
1. Turn off services
1 | |
這兩個是有可能會影響到等等攻擊的service,wpa_supplicant是無線網路後端的component
2. Generate bpf file
bpf file是hcxdumptool用來過濾packet的檔案,在檔案中存在的mac address可以被設定成要攻擊還是無視
可以先用airodump-ng來抓到要攻擊的對象mac address和channel number
1 | |
若是要保護某mac_addr:
1 | |
這次我們要指定攻擊某個對象,所以用attack.bpf
3. Run hcxdumptool
1 | |
-i: specifies the interface name-w: output file name-c: channel number, follow by one character:
1 | |
--rds: how much information to display, checkhcxdumptool -hfor more (不要看man page,不是最新的)
大概會看到這些:
1 | |
當看到EA123P的2, 3, P下面有+的時候,就可以停了,若不確定,可以跑久一點來make sure all EAPOL frame/PMKID frame都有抓到
4. Convert file to hashcat format
1 | |
hcxpcapngtool will throw errors if:
- The capture was too short/incomplete.
- The format used is old/outdated.
- Too many DEAUTHENTICATION frames were detected.
- The capture file was cleaned.
- No PROBEREQUESTS were detected.
- Too few M1 frames were detected.
有警告可能還是解的出來,但如果說impossible那就是沒有辦法
5. Crack
跟上集是一樣的,用自己喜歡的wordlist
1 | |
也可以用bruteforce(暴力解)模式,例如台灣很常見的家裡電話八碼可以這樣:
1 | |
(我的terminal打\?d才會認成command line args,正常來說打?d就可以了)
-a: mode,3means bruteforce
1 | |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.

