【问题标题】:How to count the number of valid WPA handshakes in a cap file如何计算 cap 文件中有效 WPA 握手的次数
【发布时间】:2019-07-27 10:02:12
【问题描述】:

我想知道 cap 文件中有多少次有效的 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 文件.cap

3(3 次有效握手)。

我不知道的是识别一组消息何时是有效的握手来破解它(比如说像 aircrack-ng)。

帮助。

【问题讨论】:

  • 这看起来更像是一个编程/脚本问题,而不是一个安全问题。
  • @schroeder 嘿,我正要修改你迁移时的问题。这实际上不是关于编程,而是关于如何解释数据。

标签: wifi handshake wpa


【解决方案1】:

好吧,经过进一步挖掘,我意识到答案就在我眼前。

我发现 LazyScript (github repo) 具有检查/验证 WPA/WPA2 握手的功能。深入研究源代码,我发现它使用了PyritCowpatty

因此,总而言之,有一种非常简单/简单的方法可以计算 cap 文件中的握手次数(同时检查质量):

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

这是计算握手次数以及检查握手质量的方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-15
    • 1970-01-01
    • 2019-07-23
    • 1970-01-01
    • 2015-01-05
    • 1970-01-01
    • 2014-12-16
    • 2020-02-24
    相关资源
    最近更新 更多