我想知道封顶文件中有多少有效的WPA握手。
我尝试过使用这种方法:
tshark -r file.cap -R "(wlan.fc.type_subtype == 0x08 || wlan.fc.type_subtype == 0x05 || eapol)" -2
1 0.064507 D-LinkIn_89:9f:44 → Broadcast 802.11 325 Beacon frame, SN=2485, FN=0, Flags=........, BI=100, SSID=AAAAA
2 15.639995 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 155 Key (Message 2 of 4)
3 15.643065 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 213 Key (Message 3 of 4)
4 27.695798 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 155 Key (Message 2 of 4)
5 27.703480 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 133 Key (Message 4 of 4)
6 54.926712 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 133 Key (Message 1 of 4)
7 54.975420 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 213 Key (Message 3 of 4)
8 81.340985 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 133 Key (Message 1 of 4)
9 81.351228 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 155 Key (Message 2 of 4)
10 81.353779 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 213 Key (Message 3 of 4)
11 81.358911 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 133 Key (Message 4 of 4)
12 119.080377 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 133 Key (Message 4 of 4)
我想要以下输出:
count.sh file.cap
3(3次有效握手)。
我想知道封顶文件中有多少有效的WPA握手。
我尝试过使用这种方法:
tshark -r file.cap -R "(wlan.fc.type_subtype == 0x08 || wlan.fc.type_subtype == 0x05 || eapol)" -2
1 0.064507 D-LinkIn_89:9f:44 → Broadcast 802.11 325 Beacon frame, SN=2485, FN=0, Flags=........, BI=100, SSID=AAAAA
2 15.639995 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 155 Key (Message 2 of 4)
3 15.643065 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 213 Key (Message 3 of 4)
4 27.695798 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 155 Key (Message 2 of 4)
5 27.703480 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 133 Key (Message 4 of 4)
6 54.926712 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 133 Key (Message 1 of 4)
7 54.975420 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 213 Key (Message 3 of 4)
8 81.340985 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 133 Key (Message 1 of 4)
9 81.351228 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 155 Key (Message 2 of 4)
10 81.353779 D-LinkIn_89:9f:44 → LgElectr_94:af:ba EAPOL 213 Key (Message 3 of 4)
11 81.358911 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 133 Key (Message 4 of 4)
12 119.080377 LgElectr_94:af:ba → D-LinkIn_89:9f:44 EAPOL 133 Key (Message 4 of 4)
我想要以下输出:
count.sh file.cap
3(3次有效握手)。
我不知道的是确定何时一组消息是有效的握手来破解它(让我们说像aircrack-ng这样的东西)。
救命。
好吧,经过一些挖掘,我意识到答案就在眼前。
我发现LazyScript(github repo)具有检查/验证WPA / WPA2握手的功能。潜入源代码我发现它使用Pyrit和Cowpatty
总而言之,有一种非常简单/简单的方法来计算封面文件中的握手(也检查质量):
pyrit -r fileWithHandShakes.cap analyze
它会给出这个输出:
Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+
Parsing file '/folder/fileWithHandShakes.cap' (1/1)...
Parsed 112 packets (112 802.11-packets), got 1 AP(s)
#1: AccessPoint fd:94:e3:43:bc:b6 ('MyWifi'):
#1: Station 30:fd:38:c1:2b:bb, 3 handshake(s):
#1: HMAC_SHA1_AES, good, spread 1
#2: HMAC_SHA1_AES, bad, spread 17
#3: HMAC_SHA1_AES, bad, spread 22
#2: Station 44:00:10:06:bc:bc, 2 handshake(s):
#1: HMAC_SHA1_AES, good, spread 1
#2: HMAC_SHA1_AES, bad, spread 3
这是计算握手的方式,也是检查握手质量的方法。