Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kmahyyg/c6008dab2640622d0d028e20df1b3a3f to your computer and use it in GitHub Desktop.
Save kmahyyg/c6008dab2640622d0d028e20df1b3a3f to your computer and use it in GitHub Desktop.
Issue 1289 - Broadcom OOB write when handling 802.11k Neighbor Report Response.md

Translated To ZH-CN | https://bugs.chromium.org/p/project-zero/issues/detail?id=1289

Issue 1289 - Broadcom OOB write when handling 802.11k Neighbor Report Response

Issue Overview

此 Issue 在 2017.6.12 提出,到 2017.9.25 关闭,状态标记为已修复,Broadcom 官方分配的 issue 号是 V2017061204 。

Exploit 解压密码:rrm_exploit -> Archiver

影响芯片: 博通 Wi-Fi 模块

漏洞类型:远程代码执行漏洞

实际测试: iOS 10.2(14C92)通过,影响版本包括10.3.3以内的版本。

Exploit Usage

这个 Exploit (已附在附件中) 将得到远程代码执行权限,这个漏洞位于 iPhone 7 的 Wi-Fi Firmware当中。 需要根据被测试设备的系统版本调整 exploit/symbols.py 中的信息,请自行查看源代码修正

漏洞原理:成功执行漏洞利用程序之后,Wi-Fi 芯片的固件被插入后门,允许远程读写操作被以 Crafted action frames 数据包的形式提交执行。

Exploit Contains

附件中提供的 Exploits 压缩包中包括下列内容:

  1. hostapd-2.6

    一个修改版的 hostapd ,这个版本引入的修改包括:对 802.11k RRM 尤其是 Neighbor Reports 的支持,同时,这个版本允许执行更多的指令来实现 Exploit 中需要的功能。

  2. Exploit

    Exploit本身。

Exploit Run Configuration

  1. 连接并启用一个支持 SoftMAC 的 Wi-Fi 无线网卡到你的机器(例如 TP-Link TL-WN722N)

    译者注: 这个是为了作为一个 AP,为下一步发射入侵包信号作准备。 Hostapd 为其支持的软件包。看名字就知道,是用来控制 AP 信息和发射参数的。

  2. 编译附件所提供的 hostapd

  3. hostapd-2.6/hostapd/hostapd.conf 中的 interface 设置项,匹配你的接入网卡名,例如 wlan0

  4. 配置下列信息于 exploit/conf.py 中:

    配置名 描述
    HOSTAPD_DIR 之前编译好的 hostapd 的二进制文件所在目录
    TARGET_MAC 被攻击设备的 MAC 地址
    AP_MAC 之前第一步接入的无线网卡的 MAC 地址
    INTERFACE 之前第一步接入的网卡对应的网卡名,也就是第二步中的 wlan0
  5. 通过运行 exploit/assemble_backdoor.sh 组装后门对应的 Shell Code 。

  6. 使用之前修改好的 hostapd.conf 运行 hostapd ,发射出一个广播 Wi-Fi ,其 SSID 为 test80211k

  7. 将目标设备接入 test80211k

  8. 运行攻击程序 exploit/attack.py

根据上述步骤,运行完成后,一个简单的读写后门将被成功植入。你可以通过调用 read_dword write_dword 这两个函数分别实现对目标设备 Wi-Fi 模块固件的读写权限。

@kmahyyg
Copy link
Author

kmahyyg commented Jan 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment