efchatz/WPAxFuzz

GitHub: efchatz/WPAxFuzz

一款功能完备的开源 Wi-Fi 模糊测试工具,用于对 802.11 协议帧和 WPA3-SAE 交换进行 fuzz 测试并发现协议实现漏洞。

Stars: 206 | Forks: 23


Logo

一个功能完备的 Wi-Fi Fuzzer


报告 Bug · 功能请求

目录
  1. 关于本项目
  2. Fuzz 管理帧、控制帧和数据帧
  3. Fuzz SAE 交换
  4. DoS 攻击模块
  5. 漏洞
  6. 相关工作
  7. 许可证
  8. 联系方式
  9. 致谢
## 关于本项目 该工具能够对 802.11 协议的任何管理帧、控制帧或数据帧或 SAE 交换进行 fuzz 测试。对于管理帧、控制帧或数据帧,您可以选择“标准”模式(即所有传输的帧都具有有效的大小值),或“随机”模式(即大小值是随机的)。SAE fuzz 操作需要一个支持 WPA3 的 AP。针对任何 AP(WPA2 或 WPA3)都可以执行管理帧、控制帧或数据帧的 fuzz。最后,还实现了一个 DoS 攻击向量,它利用了管理帧、控制帧或数据帧 fuzz 的结果。总体而言,WPAxFuzz 提供以下选项: ``` 1) Fuzz Management Frames 2) Fuzz SAE exchange 3) Fuzz Control Frames 4) Fuzz Data Frames (BETA) 5) DoS attack module ``` 您可以使用以下命令执行该工具: ``` sudo python3 fuzz.py ``` ## Fuzz 管理帧、控制帧和数据帧 ### 环境要求与依赖 1. 确保预先安装了以下内容。其他版本的 Scapy 和 Python 可能也适用。 [![Python](https://img.shields.io/badge/Python-3.7-blue)][Python-url] [![Scapy](https://img.shields.io/badge/scapy-2.4.3-blue)][Scapy-url] [![Nmap](https://img.shields.io/badge/Nmap-7.93-blue)][Nmap-url] [![Blab](https://img.shields.io/badge/Blab-1.0-blue)][Blab-url] 此外,您的系统中还必须安装 [![aircrack-ng](https://img.shields.io/badge/aircrack-1.7-blue)][aircrack-url]。 2. 在初始化该工具之前,用户必须探测本地网络以发现任何潜在目标,即 STA 和 AP。 ``` nmap -sP {ip_prefix}.* ``` 3. 如果 fuzz 测试是在虚拟机 (VM) 上执行的,而目标 STA 恰好也在宿主机上运行,则可能会导致错误的推断。建议将 STA 和 fuzz 操作放在不同的物理机上。 4. 如果目标 STA 是 MS Windows OS 机器,则可能需要修改防火墙以允许在本地网络内进行 ``ping'' 操作。这使得监听模式能够检查关联 STA 的存活性。 5. `AlivenessCheck.py` 中的 `find_LAN_prefix` 方法依赖于提取 `hostname -I` 返回的第一个 IP 地址,当存在多个网络接口时,这可能会导致错误的子网检测,因为所需接口的 IP 可能不在列表的首位。请确保所需子网的 IP 地址在 `hostname -I` 的输出中排第一位(正在修复中)。 6. 关于 Blab 工具(种子生成),由于 OS 的不一致性,您必须将 Blab 的二进制文件放置在 fuzzer 项目的主目录中。这样一来,无论宿主 OS 是什么,该 fuzzer 都是兼容的。 ``` git clone https://haltp.org/git/blab.git cd blab/ make cd {binary directory, where Blab is saved} ex. cd /bin/blab/bin cp blab {fuzzer directory} ex. cp blab /home/kali/Desktop/WPAxFuzz ``` ### 描述 步骤 1:使用 (i) 目标 AP 及关联的 STA MAC 地址、(ii) AP 的 SSID,以及 (iii) 无线接口名称来更新配置文件 (`src/config.json`)。 步骤 2:将 WNIC 设置为监听模式: ``` sudo airmon-ng sudo airmon-ng check sudo airmon-ng check kill sudo airmon-ng start {NAME_OF_ATT_INTER} ``` 步骤 3:将 WNIC 的信道设置为目标 AP 发射时所使用的相同信道: ``` sudo airodump-ng {NAME_OF_ATT_INTER} \\to find the channel that targeted AP transmits on sudo iw {NAME_OF_ATT_INTER} set channel {AP_channel} HT20 \\to set channel to your WNIC ``` 步骤 4:选择选项 (1)、(3) 或 (4),即: ``` 1) Fuzz management frames 3) Fuzz Control Frames 4) Fuzz Data Frames (BETA) ``` 步骤 5:选择以下模式之一: ``` Standard: All the frame fields, including the ones being produced with ``Blab'', carry a value length that abides by the 802.11 standard. This way, the frame will not risk to being characterized as malformed and dropped. Random: The fields produced via the seed generator have a random value length, which can be either lesser or greater than that defined by the 802.11 standard. ``` 步骤 7:从此刻起,与用户唯一的交互发生在发生连接中断或检测到取消认证/取消关联帧时。在这种情况下,系统会要求用户重新连接 STA 并恢复 fuzz 过程。 步骤 8:连续按两次 Ctrl+c 退出 fuzz 过程。 ## Fuzz SAE 交换 此模块专注于在 SAE 握手期间交换的所谓 SAE Commit 和 SAE Confirm Authentication 帧。根据 802.11 标准,这两个帧都携带 Authentication algorithm (3)、Authentication Sequence(Commit 为 1,Confirm 为 2)和 Status code,即一个介于 0 到 65535 之间的值,其中 0 代表“成功”。请注意,介于 1 到 129 之间的 Status code 值(除了 4, 8, 9, 20, 21, 26, 29, 36, 48, 66, 69-71, 90-91, 116, 124 和 127)表示不同的故障原因,其余则由协议保留。 更详细地说,当前模块(通过 WPAxFuzz 的 CLI 选择)可选择利用突发帧发送模式,即它一次向目标 AP 喷射多个帧(即 128 个)。它包含四个不同的循环:(i) 将 SAE (Authentication) 帧发送到目标 STA 工作的无线电信道, 将 SAE 帧发送到与目标 STA 不同的无线电信道,以及 以及前两者中的任何一种,但启用了突发模式。此外,基于 WPA3-SAE Authentication 过程的无状态方法,每个 fuzz 周期通过七种不同的变体执行,如下所示: 1. 一个空的 SAE auth 帧。 2. 一个有效的(格式良好的)SAE-Commit 帧,后接 (1)。 3. 一个有效的 SAE-Commit 帧,后接一个所谓的 Send-Confirm 字段设置为 0 的 SAE-Confirm 帧。回想一下,Send-Confirm 字段带有已发送 Confirm 帧的计数器,因此充当防重放计数器。 4. 与 (3) 相同,但 Send-Confirm 字段的值设置为 2。选择此特定值 (2) 时,对该字段使用介于 2 到 65,534 之间的值,“AP 平均在 20 秒后断开了目标 STA”。 5. 一个有效的 SAE-Commit 帧。 6. 一个有效的 SAE-Confirm 帧,其 Send-Confirm 字段等于 0。 7. 与 (6) 相同,但 Send-Confirm 字段的值设置为 2。 与管理帧模块一样,本模块使用相同的监听逻辑,并分为两种不同类型的 fuzz 程序,即标准模式和扩展模式。例如,Authentication algorithm 字段使用经过精心挑选的特定值(包括 0、1、2 和 200)进行 fuzz,而不是由 Blab 生成的随机值。另一方面,扩展模式专注于极其耗时地测试每一个有效的 SAE 字段组合,即 0 到 65535 范围内的每一个可能值,这使得它相对于标准模式更加耗时。 ## DoS 攻击模块 该模块基于从 fuzz 过程中收集的数据(日志文件)发起 DoS 攻击。它只能针对在 fuzz 过程中使用的同一 AP 和 STA 执行。也就是说,在 fuzz 过程中引起任何类型异常行为的帧将根据以下选项决定的方式进行传输。 ### 描述 步骤 1:选择选项 5),即: ``` 5) DoS attack module ``` 步骤 2:选择您希望的攻击模块 ``` 1) Frames detected at the moment of connectivity disruption, one-by-one 2) Sequence of frames till the moment a disruption was detected (BETA) ``` 步骤 3:DoS802.11 的第一种模式测试 fuzzer 截至该时刻检测到的所有帧。这是一种二手过滤,用于将真阳性帧与假阳性帧区分开来。如果某个帧呈阳性,即对关联的 STA 造成 DoS,则会自动生成 exploit。 步骤 4:当日志文件被处理完毕后,DoS802.11 将退出。 **其余模块目前处于 BETA 模式。 ## 漏洞 迄今为止,通过利用不同的管理帧,该 fuzzer 成功识别了以下 CVE ID: | CVE IDs | 易受攻击的设备/芯片组 | WPA2/WPA3-SAE | 状态 | 评分 | |----------------------------------------------------------------------------------|-----------------------------|---------------|----------|-------| | [CVE-2022-32654](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32654) | mt5221/mt7603/mt7613
mt7615/mt7622/mt7628
mt7629/mt7663/mt7668
mt7682/mt7686/mt7687
mt7697/mt7902/mt7915
mt7916/mt7921/mt7933
mt7981/mt7986/mt8167S
mt8175/mt8362A/mt8365
mt8385/mt8518S/mt8532
mt8695/mt8696/mt8788 | 两者 | 已发布 | 6.7 (中危) | | [CVE-2022-32655](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32655) | mt5221/mt7603/mt7613
mt7615/mt7622/mt7628
mt7629/mt7663/mt7668
mt7682/mt7686/mt7687
mt7697/mt7902/mt7915
mt7916/mt7921/mt7933
mt7981/mt7986/mt8167S
mt8175/mt8362A/mt8365
mt8385/mt8518S/mt8532
mt8695/mt8696/mt8788 | 两者 | 已发布 |6.7 (中危) | | [CVE-2022-32656](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32656) | mt5221/mt7603/mt7613
mt7615/mt7622/mt7628
mt7629/mt7663/mt7668
mt7682/mt7686/mt7687
mt7697/mt7902/mt7915
mt7916/mt7921/mt7933
mt7981/mt7986/mt8167S
mt8175/mt8362A/mt8365
mt8385/mt8518S/mt8532
mt8695/mt8696/mt8788 | 两者 | 已发布 | 6.7 (中危) | | [CVE-2022-32657](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32657) | mt7603/mt7613/mt7615
mt7622/mt7628/mt7629
mt7915/mt7916/mt7981
mt7986 | 两者 | 已发布 | 6.7 (中危) | | [CVE-2022-32658](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32658) | mt7603/mt7613/mt7615
mt7622/mt7628/mt7629
mt7915/mt7916/mt7981
mt7986 | 两者 | 已发布 | 6.7 (中危) | | [CVE-2022-32659](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32659) | mt7603/mt7613/mt7615
mt7622/mt7628/mt7629
mt7915/mt7916/mt7981
mt7986/mt8518s/mt8532 | 两者 | 已发布 | 6.7 (中危) | | [CVE-2022-46740](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-46740) | WS7100-20 | 两者 | 已发布 | 6.5 (中危) | 此外,通过利用不同的控制帧,该 fuzzer 成功识别了以下 CVE ID。 | CVE IDs | 易受攻击的设备/芯片组 | WPA2/WPA3-S | 状态 | 评分 | |----------------------------------------------------------------------------------|-----------------------------|---------------|----------|-------| |[CVE-2022-32666](https://cve.mitre.org/cgi-bin/cvename.cgi?name=2022-32666)| mt7603/mt7613/mt7615
mt7622/mt7628mt7629
mt7915/mt7916/mt7981
mt7986/mt8365 | 两者 | 已发布 | 7.5 (高危) | 我们还要感谢 MediaTek 和华为的安全团队,他们确认并修复了这些安全问题,如以下两份安全公告所述:[MediaTek](https://corp.mediatek.com/product-security-acknowledgements) 和 [Huawei](https://www.huawei.com/en/psirt/security-advisories/2022/huawei-sa-dosvihswr-8f632df1-en)。 此外,通过遵循题为 ["How is your Wi-Fi connection today? DoS attacks on WPA3-SAE"](https://www.sciencedirect.com/science/article/pii/S221421262100243X) 著作中的方法论,该 fuzzer 能够识别出与以下 CVE ID 相关的相同 SAE 漏洞: | CVE IDs | 易受攻击的设备/芯片组 | WPA2/WPA3-SAE | 状态 | 评分 | |----------------------------------------------------------------------------------|-----------------------------|---------------|----------|-------| | [CVE-2021-37910](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-37910) | 所有基于 ASUS RX 的型号 | WPA3-SAE | 已发布 | 5.3 (中危) | | [CVE-2021-40288](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-40288) | AX10v1 | WPA3-SAE | 已发布 | 7.5 (高危) | | [CVE-2021-41753](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41753) | DIR-x1560/DIR-X6060 | WPA3-SAE | 已发布 | 7.5 (高危) | | [CVE-2021-41788](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41788) | mt7603E/mt7612/mt7613
mt7615/mt7622/mt7628
mt7629/mt7915| WPA3-SAE | 已发布 | 7.5 (高危) | ## 相关工作 请感兴趣的读者参阅以下关于用于构建 [WPAxFuzz](https://www.mdpi.com/2410-387X/6/4/53) 方法论的出版物。同时,读者也可参阅 ["Bl0ck: Paralyzing 802.11 connections through Block Ack frames"](https://arxiv.org/abs/2302.05899) 以获取有关控制帧 exploit 的更多详细信息。请注意,发表在 Elsevier 的国际《信息与应用安全杂志》(JISA) 上、题为 ["How is your Wi-Fi connection today? DoS attacks on WPA3-SAE"](https://www.sciencedirect.com/science/article/pii/S221421262100243X) 的论文获得了 2022 年度 Dr KW Wong 最佳论文奖。公告地址如下:https://www.sciencedirect.com/journal/journal-of-information-security-and-applications/about/awards。总的来说,JISA 论文中详述的方法论在 WPAxFuzz 的出版物中得到了扩展。 ``` @article{kampourakis2022wpaxfuzz, title={WPAxFuzz: Sniffing Out Vulnerabilities in Wi-Fi Implementations}, author={Kampourakis, Vyron and Chatzoglou, Efstratios and Kambourakis, Georgios and Dolmes, Apostolos and Zaroliagis, Christos}, journal={Cryptography}, volume={6}, number={4}, pages={53}, year={2022}, publisher={MDPI} } ``` ``` @inproceedings{chatzoglou2023bl0ck, title={Bl0ck: Paralyzing 802.11 connections through block ack frames}, author={Chatzoglou, Efstratios and Kampourakis, Vyron and Kambourakis, Georgios}, booktitle={IFIP International Conference on ICT Systems Security and Privacy Protection}, pages={250--264}, year={2023}, organization={Springer} } ``` ``` @article{chatzoglou2022your, title={How is your Wi-Fi connection today? DoS attacks on WPA3-SAE}, author={Chatzoglou, Efstratios and Kambourakis, Georgios and Kolias, Constantinos}, journal={Journal of Information Security and Applications}, volume={64}, pages={103058}, year={2022}, publisher={Elsevier} } ``` ## 许可证 MIT License Copyright (c) 2022-2023 Vyron Kampourakis (Management frames, Control frames, Data frames and DoS tools)
Copyright (c) 2022 Apostolos Dolmes (SAE Exchange tool)
Copyright (c) 2022-2023 Vyron Kampourakis and Efstratios Chatzoglou (Methodology) ## 联系方式 Efstratios Chatzoglou - efchatzoglou@gmail.com
Vyron Kampourakis - byrkam@gmail.com ## 致谢 我们要感谢我们联系并报告这些攻击的所有供应商,以及我们收到的 bug 赏金。此外,我们还要向 [README 模板仓库](https://github.com/othneildrew/Best-README-Template) 表示感谢,它帮助我们创建了这个 README 文件;并感谢 [logo.com](https://logo.com/),它让我们能够创建 WPAxFuzz 工具的徽标。
标签:802.11协议, CTI, Wi-Fi, WPA3, 拒绝服务攻击, 逆向工具