chkndrp/OneShot-Extended
GitHub: chkndrp/OneShot-Extended
OneShot-Extended 是原版 OneShot 的增强分支,专注于无需监听模式的 WPS 渗透测试,支持 Pixie Dust 攻击、在线暴力破解及多种 PIN 连接方式。
Stars: 111 | Forks: 40
```
▄▖ ▄▖▌ ▗ ▄▖ ▗ ▌ ▌
▌▌▛▌█▌▚ ▛▌▛▌▜▘▄▖▙▖▚▘▜▘█▌▛▌▛▌█▌▛▌
▙▌▌▌▙▖▄▌▌▌▙▌▐▖ ▙▖▞▖▐▖▙▖▌▌▙▌▙▖▙▌
```
该工具无需监听模式即可执行各种 WPS 攻击。
这是原版 OneShot 的改进版本。
## 相比原版 OneShot 的优势
- 在扫描器中高亮显示易受攻击的 WPS 版本(`1.0`)
- 能够使用相同的界面终止/恢复干扰进程
- 一些细微的更改(例如 `WPA3TM` 指示、更好的 `vulnwsc` 检测、`RF-Kill` 处理)
- 提高了扫描器的可靠性(重试、`up` 状态检测、`lock` 检测)
- 改进了对 Android 的支持
- 许多新的命令参数和功能
- 支持现代版本的 Python(`>3.10`)
## 功能
- PIN/Null PIN 以及按钮(Push button)连接
- [Pixie Dust 攻击](https://forums.kali.org/showthread.php?24286-WPS-Pixie-Dust-Attack-Offline-WPS-Attack)
- [在线 WPS 暴力破解](https://sviehb.files.wordpress.com/2011/12/viehboeck_wps.pdf)
- 离线 WPS PIN 生成算法
- 基于 iw 的 Wi-Fi 扫描器(带高亮显示);
- 支持写入文件
## 用法
```
Required arguments:
-i, --interface INTERFACE
Name of the interface to use
-b, --bssid BSSID BSSID of the target AP
Attack Modes:
-p, --pin PIN Use the specified pin (arbitrary string or 4/8 digit pin)
-N, --null-pin Use a null pin
-P, --pixie-dust Run Pixie Dust attack
-B, --bruteforce Run online bruteforce attack
--pbc, --push-button-connect
Run WPS push button connection
Optional arguments:
-k, --kill Automatically kill processes interfering with the wireless interface
-r, --restore Restore killed interfering processes on exit (--kill)
-w, --write Write credentials to the file on success
-l, --loop Run in a loop
-c, --clear Clear the screen on every wi-fi scan
-d, --delay DELAY Set a delay between pin attempts in seconds (default: 0)
-t, --timeout TIMEOUT
Set the timeout for retrying after WPS lock (default: 60)
Advanced Arguments:
-F, --pixie-force Run Pixiewps with --force option (bruteforce full range)
-S, --show-pixie Print pixiewps command and related data
-I, --iface-down Down network interface when the work is finished
-M, --mtk-wifi Activate MediaTek Wi-Fi interface driver on startup and deactivate it on exit
-D, --dont-touch-settings
Don't touch the Android Wi-Fi settings on startup and exit
--reverse-scan Reverse order of networks in the list of networks. Useful on small displays
--vuln-list VULN_LIST
Use custom file with vulnerable devices list
-v, --verbose Verbose output
-h, --help Show this help message and exit
```
## 安装前置条件
**在 Termux 上:**
使用此脚本来安装依赖项、下载代码仓库,并将 `ose.py` 添加到路径中:
```
curl -sL https://gist.githubusercontent.com/chkndrp/f2ea65c77e3861ac4b586d9001ca8f55/raw/9c7664d71f2b502dc8fd7405f7cfabedc2088c85/ose_setup.py | bash
```
或者手动执行:
```
pkg install -y root-repo
pkg install -y git sudo python wpa-supplicant pixiewps iw openssl iproute2
```
**在 Linux 发行版上。通过你的包管理器安装这些软件包:**
```
python3 wpa-supplicant iw wget pixiewps iproute2
```
## 更新/下载
**下载源码:**
```
cd ~
git clone https://github.com/chkndrp/OneShot-Extended ose
```
**在最近的提交后更新源码:**
```
cd ose
git fetch
git reset --hard origin/master
```
**在 Termux 上,第二次运行此脚本将会更新本地代码仓库。**
```
curl -sL https://gist.githubusercontent.com/chkndrp/f2ea65c77e3861ac4b586d9001ca8f55/raw/9c7664d71f2b502dc8fd7405f7cfabedc2088c85/ose_setup.py | bash
```
## 快速开始
**Pixie Dust 攻击:**
```
sudo python ose.py -i wlan0 -P
```
**在线暴力破解攻击:**
```
sudo python ose.py -i wlan0 -B
```
## 故障排除
`Device or resource busy (-16)`
- 发生这种情况是因为有其他进程正在使用该网络接口。
- 关闭 Wi-Fi 扫描器/管理器,或者使用 `--kill` 参数来停止它们。
- 在 Android 上,Wi-Fi 扫描器会自动禁用,因此不建议使用 `--kill` 参数
`在搭载 MediaTek SoC 的 Android 设备上禁用 Wi-Fi 时,无线网络接口消失`
- 尝试使用 `--mtk-wifi` 标志运行 Oneshot-Extended,以初始化 Wi-Fi 设备驱动程序。
## 鸣谢
* [kimocoder](https://github.com/kimocoder/OneShot),[drygdryg](https://github.com/drygdryg) 感谢他们为本项目奠定的基础
* [rofl0r](https://github.com/rofl0r/oneshot) 感谢其开发的原版 oneshot
## 警告
- 本工具仅供教育和授权的渗透测试目的使用。
- 它不适用于且不得用于非法活动,例如黑客攻击、未经授权的访问,或对系统或网络造成破坏。
- 使用此工具即表示您同意以负责任和符合道德规范的方式使用它,并遵守所有适用的法律法规。
- 开发者对任何滥用本工具的行为概不负责。
标签:Python, Wi-Fi攻击, WPS破解, 无后门, 网络安全, 逆向工具, 隐私保护