bali-36/vulnsleuth
GitHub: bali-36/vulnsleuth
一款支持多接口和插件扩展的综合漏洞扫描框架,面向本地系统、网络和 Web 应用提供全面的漏洞评估能力。
Stars: 1 | Forks: 0
# VulnSleuth - 高级漏洞扫描器
[](https://www.python.org/)
[](LICENSE)
一个包含多种接口(TUI、Web Dashboard、CLI)、可扩展插件系统和自动化安全测试功能的综合漏洞评估平台。
**作者**:Muhammad Bilal Badar | **邮箱**: | **GitHub**:[@bali-36](https://github.com/bali-36)
## 📖 目录
- [关于](#about)
- [功能](#features)
- [安装说明](#installation)
- [快速开始](#quick-start)
- [配置](#configuration)
- [插件](#plugins)
- [项目结构](#project-structure)
- [安全](#security)
- [License](#license)
## 关于
VulnSleuth 是一款专为白帽黑客、安全专业人士和系统管理员打造的专业安全扫描框架。它提供跨本地系统、网络和 Web 应用的全面漏洞评估。
**目的**:安全审计、渗透测试、DevSecOps 集成、网络监控和教育用途。
## 功能
- **🖥️ 多种接口**:交互式 TUI、Web Dashboard 和用于自动化的 CLI
- **🔍 多层扫描**:针对本地系统、网络和 Web 应用程序的安全检查
- **🧩 插件系统**:具有 7+ 内置插件的可扩展架构
- **🎯 CVE 情报**:实时 CVE 查询、漏洞利用关联以及 NVD/MITRE 集成
- **📊 高级报告**:支持自定义模板的 JSON、HTML、CSV、XML、PDF 格式
- **💾 数据库管理**:SQLite 后端,具备历史记录追踪和分析功能
- **🤖 自动化**:定时扫描、自动修复建议、告警(邮件/Slack/Discord)
- **🔐 安全**:用户身份验证、加密、审计日志记录、速率限制
## 安装说明
### 前置条件
- Python 3.8+
- Nmap(用于网络扫描)
- Git
### 快速安装
```
# Clone repository
git clone https://github.com/bali-36/vulnsleuth.git
cd vulnsleuth
# Install dependencies
pip install -r requirements.txt
# Verify installation
nmap --version
python src/main.py --help
```
### 可选:虚拟环境
```
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
```
### 可选:Docker
```
docker build -t vulnsleuth .
docker run -p 5000:5000 -v $(pwd)/data:/app/data vulnsleuth
```
## 快速开始
### 1. 交互式 TUI
```
python src/main.py
```
带有 ASCII 横幅、实时进度和交互式导航的菜单驱动接口。
### 2. Web Dashboard
```
python src/app.py
# 访问 http://localhost:5000
```
功能:实时监控、扫描管理、漏洞浏览器、报告生成。
## 配置
编辑 `vulnsluth.cfg` 以自定义 VulnSleuth 的行为。
### 主要配置部分
#### 常规设置
```
[general]
max_threads = 50 # Concurrent threads
scan_intensity = medium # low, medium, high, aggressive
default_timeout = 300 # Scan timeout (seconds)
verbose_logging = true
```
#### 数据库
```
[database]
db_path = data/vulnsleuth.db
cve_cache_days = 7
auto_backup = true
```
#### CVE 情报
```
[cve_sources]
nvd_api_key = your_key_here # Get from nvd.nist.gov
mitre_enabled = true
exploit_db_enabled = true
```
#### 网络扫描
```
[network_scanning]
nmap_path = nmap
nmap_timing = -T4 # -T0 to -T5
default_ports = 1-1000,3000,3389,5432,8080,8443
os_detection = true
service_detection = true
```
#### Dashboard
```
[dashboard]
host = 127.0.0.1 # Use 0.0.0.0 for external access
port = 5000
```
#### 通知
```
[notifications]
email_enabled = false
smtp_server = smtp.gmail.com
slack_webhook = your_webhook_url
notify_on_critical = true
```
**重要**:在生产环境中请务必更改默认凭据!
## 插件
### 内置插件
VulnSleuth 包含 7 个专业的安全插件:
1. **Web 安全扫描器**:HTTP 头、SSL/TLS、Cookie、XSS/SQLi 指标
2. **网络探测**:端口扫描、服务检测、OS 指纹识别 (Nmap)
3. **CVE 情报**:实时 CVE 查询、漏洞利用关联、NVD/MITRE 集成
4. **SSL/TLS 审计**:证书验证、密码分析、协议版本
5. **数据库安全**:数据库服务检测、默认凭据、配置错误
6. **身份验证绕过**:默认凭据、弱密码、会话问题
7. **信息泄露**:服务器横幅、目录列表、备份文件
### 创建自定义插件
示例插件:
```
# plugins/my_custom_plugin.py
import sys, os
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'src'))
from plugin import VulnPlugin, VulnerabilityFinding, PluginMetadata
class CustomPlugin(VulnPlugin):
def __init__(self, config=None):
super().__init__(config)
self.metadata = PluginMetadata(
name="Custom Plugin",
version="1.0.0",
author="Your Name",
description="Custom vulnerability checks",
category="custom",
tags=["custom", "security"]
)
def check(self, target, **kwargs):
findings = []
# Your detection logic here
if self._detect_vulnerability(target):
finding = self.create_finding(
title="Vulnerability Found",
severity="high",
description="Details...",
target=target,
solution="Fix recommendation"
)
findings.append(finding)
return findings
def _detect_vulnerability(self, target):
# Your custom logic
return False
__plugin_class__ = CustomPlugin
```
放置在 `plugins/` 目录中。如果在配置中设置 `auto_load = true`,则在启动时自动加载。
## 项目结构
```
vulnsleuth/
├── LICENSE
├── README.md
├── requirements.txt # Python dependencies
├── vulnsluth.cfg # Configuration file
├── src/ # Core application
│ ├── main.py # TUI entry point
│ ├── app.py # Web dashboard (Flask)
│ ├── engine.py # Scan orchestration
│ ├── db.py # Database manager
│ ├── reporter.py # Report generation
│ ├── plugin.py # Plugin system
│ ├── tui.py # Terminal UI
│ ├── utils.py # Utilities
│ ├── auto_remediation.py # Auto-fix suggestions
│ ├── checks/ # Security checks
│ │ ├── local_checks.py
│ │ ├── network_checks.py
│ │ └── webapp_checks.py
│ ├── templates/ # Web UI templates
│ └── static/ # CSS/JS assets
├── plugins/ # Security plugins
│ ├── web_security_scanner_plugin.py
│ ├── network_reconnaissance_plugin.py
│ ├── cve_intelligence_plugin.py
│ ├── ssl_tls_audit_plugin.py
│ ├── database_security_plugin.py
│ ├── authentication_bypass_plugin.py
│ └── information_disclosure_plugin.py
├── data/ # Databases (created at runtime)
├── logs/ # Log files
├── reports/ # Generated reports
├── backups/ # Database backups
└── temp/ # Temporary files
```
## 安全
### ⚠️ 道德使用警告
**VulnSleuth 仅用于授权的安全测试。**
✅ **应该做**:获取书面许可、扫描拥有所有权的系统、遵循负责任的漏洞披露
❌ **不要做**:未经授权扫描、用于非法目的、破坏生产环境
**未经授权访问计算机系统是违法行为。** 用户需对自己的行为负全部责任。
### 生产环境安全检查清单
- [ ] 在 `vulnsluth.cfg` 中更改默认凭据
- [ ] 配置 IP 白名单
- [ ] 启用数据库加密
- [ ] 通过反向代理使用 HTTPS
- [ ] 设置 API 速率限制
- [ ] 定期进行安全更新
- [ ] 确保数据目录的文件权限安全
## 故障排除
| 问题 | 解决方案 |
|-------|----------|
| **未找到 Nmap** | 安装:`apt install nmap` (Linux),`brew install nmap` (Mac),或从 nmap.org 下载 (Windows) |
| **权限拒绝** | 使用 `sudo` 运行或修复目录权限:`chmod 755 data/ logs/` |
| **未找到 Module** | 重新安装依赖项:`pip install -r requirements.txt` |
| **数据库已锁定** | 停止所有实例:`pkill -f vulnsleuth` |
| **端口 5000 被占用** | 在配置中更改端口,或:`python src/app.py --port 8080` |
| **SSL 错误** | 在 `[web_scanning]` 中设置 `verify_ssl = false`(仅限测试!) |
启用调试日志记录:
```
[general]
verbose_logging = true
```
查看日志:`tail -f logs/vulnsleuth.log`
## License
MIT License - 版权所有 (c) 2024 Devdas
详情请参阅 [LICENSE](LICENSE) 文件。
## 联系方式
**Devdas** | | [@bali-36](https://github.com/bali-36)
- **Bug/功能**:[GitHub Issues](https://github.com/bali-36/vulnsleuth/issues)
- **安全**:(负责任的漏洞披露)
⭐ **如果您觉得有用,请给本仓库点个 Star!**
出于对网络安全社区的热爱,用 ❤️ 制作
标签:CTI, Python, Web安全, 实时处理, 密码管理, 插件系统, 无后门, 网络安全, 蓝队分析, 请求拦截, 逆向工具, 隐私保护