一款高性能异步 SCADA/ICS 扫描器,用于跨网络识别工业控制系统并对其进行指纹识别。可检测漏洞、识别厂商/产品,并生成全面的风险评估报告。
警告:仅限经授权的安全评估使用。未经授权进行扫描可能违反法律法规。
# Clone the repository
git clone https://github.com/geeknik/scada-scanner.git
cd scada-scanner
# Install dependencies
pip install -r requirements.txt
# Single target scan
python scada_scanner.py -t 192.168.1.100 -o results.json
# CIDR range scan
python scada_scanner.py -c 192.168.1.0/24 -o results.json
# Multiple CIDR ranges from file
python scada_scanner.py -f networks.txt -o results.json
# Export CSV instead of JSON
python scada_scanner.py -t 192.168.1.100 --format csv -o results.csv
# Respect an exclude list
python scada_scanner.py -c 10.0.0.0/24 --exclude exclude.txt
# Highlight unexpected protocol/port combos (logged and in findings)
python scada_scanner.py -t 203.0.113.10 -o results.json
# Enable live vuln enrichment via ProjectDiscovery vulnx (requires vulnx + PDCP API key)
vulnx auth
python scada_scanner.py -t 192.168.1.100 --vulnx --vulnx-limit 3
Required arguments (one of):
-t, --target Single target IP address
-c, --cidr CIDR range to scan (e.g., 192.168.1.0/24)
-f, --cidr-file File containing CIDR ranges (one per line)
Optional arguments:
-o, --output Output file (default: scan_results.json)
-r, --rate Max requests per second (default: 10.0)
--timeout Connection timeout in seconds (default: 5)
--max-concurrent Maximum concurrent connections (default: 50)
--safe-mode Enable safe mode (non-intrusive scans only)
--exclude File containing IPs to exclude from scan
-v, --verbosity Verbosity level: 0=quiet, 1=normal, 2=debug
--format Output format: json or csv (default: json)
--safe-mode 标志启用{
"scan_summary": {
"timestamp": "2025-02-27T14:02:33.456789",
"total_hosts_scanned": 256,
"hosts_with_scada": 12,
"total_vulnerabilities": 37,
"high_risk_hosts": 5
},
"hosts": [
{
"ip": "192.168.1.100",
"ports": [
{
"port": 502,
"protocol": "MODBUS",
"fingerprint": {
"vendor": "Schneider",
"product": "M340",
"version": "2.6.0",
"risk_score": 0.75,
"evidence": [
"response:00010000000101",
"port_hint:502"
],
"findings": [
"Detected MODBUS protocol (confidence: 0.55)",
"Identified vendor: SCHNEIDER, product: M340",
"Overall risk assessment: High (score: 0.75)"
],
"unexpected_port": false
}
}
],
"vulnerabilities": [
{
"cve_id": "CVE-2025-55221",
"description": "Socomec DIRIS Digiware M-70 DoS via crafted Modbus TCP/RTU over TCP packets",
"severity": "high",
"source": "local_db"
}
]
}
]
}
本工具仅限经授权的安全评估使用。未经授权进行扫描可能违反:
扫描器内置了一个针对核心协议的轻量级漏洞数据库(参见 VULNERABILITY_DATABASE)。如需更新的情报,可启用可选的 ProjectDiscovery vulnx 集成:
vulnx 并配置你的 PDCP API 密钥(vulnx auth)。--vulnx 运行(可选调整 --vulnx-limit 和 --vulnx-timeout)。source: "vulnx"。如果 vulnx 缺失或无法访问,扫描器将静默回退至本地数据库。本地数据库条目会定期从针对核心协议的 vulnx 搜索中刷新(已收录于本仓库快照),并标记为 source: "local_db"。
运行单元测试套件:
pytest
扫描器采用模块化设计,可轻松扩展对新协议的支持:
SCADA_PORTS 列表PROTOCOL_SIGNATURES 字典VULNERABILITY_DATABASE欢迎贡献!请遵循以下步骤:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)本项目采用 MIT 许可证授权 - 详情请参阅 LICENSE 文件。
本软件按“原样”提供,不附带任何明示或暗示的担保。对于因使用本软件而造成的任何损害或损失,作者不承担任何责任。