Jashwanth33/FINALYEAR-PROJECT
GitHub: Jashwanth33/FINALYEAR-PROJECT
一套结合规则扫描与机器学习的 Web 应用混合漏洞检测系统,集成暗网监控与自动化报告功能以降低误报并提升威胁优先级评估能力。
Stars: 0 | Forks: 0
# VULNSecure - 混合漏洞检测系统
[](https://python.org)
[](https://flask.palletsprojects.com/)
[](https://www.tensorflow.org/)
[](LICENSE)
[](http://makeapullrequest.com)
## 架构
`mermaid
graph TB
subgraph "Frontend"
UI[React Dashboard]
API_Client[API Client]
end
```
subgraph "Backend Services"
Flask[Flask Server]
Scanner[Scanner Engine]
ML[ML Risk Analyzer]
DarkWeb[Dark Web Monitor]
end
subgraph "Data Layer"
MongoDB[(MongoDB)]
Redis[(Redis Cache)]
CVE_DB[(CVE Database)]
end
subgraph "External APIs"
OWASP[OWASP API]
Shodan[Shodan API]
end
UI --> Flask
API_Client --> Flask
Flask --> Scanner
Flask --> ML
Flask --> DarkWeb
Scanner --> CVE_DB
Scanner --> OWASP
Scanner --> Shodan
ML --> MongoDB
DarkWeb --> MongoDB
Flask --> Redis
```
`
## 系统流程
`mermaid
flowchart TD
A[User Submits Target URL] --> B{Input Validation}
B -->|Invalid| C[Return Error]
B -->|Valid| D[Initialize Scanner]
D --> E[Port Scanning]
D --> F[Service Detection]
D --> G[Vulnerability Check]
E --> H[Aggregate Results]
F --> H
G --> H
H --> I[ML Risk Assessment]
I --> J{Risk Level}
J -->|Critical| K[Immediate Alert]
J -->|High| L[Priority Report]
J -->|Medium| M[Standard Report]
J -->|Low| N[Info Report]
K --> O[Generate Report]
L --> O
M --> O
N --> O
O --> P[Send Notification]
O --> Q[Store in Database]
`
## 项目结构
`
FINALYEAR-PROJECT/
├── app.py # Main Flask application entry point
├── config.py # Configuration settings
├── requirements.txt # Python dependencies
│
├── scanner/ # Vulnerability scanning modules
│ ├── __init__.py
│ ├── web_scanner.py # Web application vulnerability scanner
│ ├── network_scanner.py # Network port & service scanner
│ ├── port_scanner.py # TCP/UDP port scanning
│ ├── ssl_scanner.py # SSL/TLS vulnerability detection
│ └── cve_checker.py # CVE database lookup
│
├── ml_model/ # Machine learning components
│ ├── __init__.py
│ ├── trainer.py # Model training pipeline
│ ├── predictor.py # Risk prediction engine
│ ├── feature_extractor.py # Feature extraction from scan results
│ └── models/ # Saved ML models
│ ├── risk_classifier.pkl
│ └── severity_model.pkl
│
├── dark_web/ # Dark web monitoring
│ ├── __init__.py
│ ├── monitor.py # Dark web crawler
│ ├── credential_checker.py # Leaked credential detection
│ └── alert_system.py # Alert notification system
│
├── reports/ # Report generation
│ ├── __init__.py
│ ├── generator.py # PDF/HTML report generator
│ ├── templates/ # Report templates
│ │ ├── executive_summary.html
│ │ └── technical_detail.html
│ └── exports/ # Generated reports
│
├── api/ # REST API endpoints
│ ├── __init__.py
│ ├── routes.py # API route definitions
│ ├── auth.py # Authentication endpoints
│ └── validators.py # Input validation
│
├── templates/ # Frontend HTML templates
│ ├── base.html
│ ├── dashboard.html
│ ├── scan_results.html
│ └── reports.html
│
├── static/ # Static assets
│ ├── css/
│ │ └── style.css
│ ├── js/
│ │ ├── dashboard.js
│ │ └── charts.js
│ └── images/
│
├── tests/ # Test suite
│ ├── test_scanner.py
│ ├── test_ml_model.py
│ └── test_api.py
│
├── docs/ # Documentation
│ ├── architecture.md
│ ├── api_reference.md
│ └── deployment.md
│
├── docker/ # Docker configuration
│ ├── Dockerfile
│ └── docker-compose.yml
│
└── scripts/ # Utility scripts
├── setup.sh
└── train_model.py
`
## 功能
| 功能 | 描述 | 状态 |
|---------|-------------|--------|
| Web 漏洞扫描 | OWASP Top 10 检测 | 完成 |
| 端口扫描 | TCP/UDP 端口发现 | 完成 |
| SSL/TLS 分析 | 证书和协议检查 | 完成 |
| ML 风险评估 | AI 驱动的威胁评分 | 完成 |
| 暗网监控 | 凭据泄露检测 | 完成 |
| 自动化报告 | 生成 PDF/HTML | 完成 |
| 实时仪表盘 | 实时扫描监控 | 完成 |
| API 集成 | RESTful API endpoint | 完成 |
## 技术栈
`
┌─────────────────────────────────────────────────────────┐
│ TECH STACK │
├─────────────────┬─────────────────┬─────────────────────┤
│ Frontend │ Backend │ Database │
├─────────────────┼─────────────────┼─────────────────────┤
│ React.js │ Python │ MongoDB │
│ HTML5/CSS3 │ Flask │ Redis │
│ Chart.js │ Celery │ SQLite (dev) │
│ Bootstrap 5 │ Gunicorn │ │
├─────────────────┴─────────────────┴─────────────────────┤
│ ML & Security │
├─────────────────┬─────────────────┬─────────────────────┤
│ TensorFlow │ scikit-learn │ pandas │
│ NumPy │ OWASP ZAP │ Nmap │
│ Shodan API │ CVE Database │ requests │
└─────────────────┴─────────────────┴─────────────────────┘
`
## 安装
`ash
# 克隆 repository
git clone https://github.com/Jashwanth33/FINALYEAR-PROJECT.git
cd FINALYEAR-PROJECT
# 创建虚拟环境
python -m venv venv
source venv/bin/activate # Linux/Mac
# venv\Scripts\activate # Windows
# 安装依赖项
pip install -r requirements.txt
# 设置环境变量
cp .env.example .env
# 使用你的 API keys 编辑 .env
# 初始化数据库
python scripts/setup.py
# 运行应用程序
python app.py
`
## API Endpoint
| 方法 | Endpoint | 描述 |
|--------|----------|-------------|
| POST | /api/v1/scan | 开始新的漏洞扫描 |
| GET | /api/v1/scan/:id | 获取扫描状态 |
| GET | /api/v1/scan/:id/results | 获取扫描结果 |
| GET | /api/v1/reports | 列出所有报告 |
| POST | /api/v1/reports/generate | 生成报告 |
| GET | /api/v1/dashboard/stats | 仪表盘统计信息 |
## 使用示例
`python
from scanner import WebScanner
from ml_model import RiskPredictor
# 初始化 scanner
scanner = WebScanner(target="https://example.com")
# 运行 scan
results = scanner.scan()
# 获取 ML risk assessment
predictor = RiskPredictor()
risk_score = predictor.predict(results)
print(f"Risk Score: {risk_score}/10")
print(f"Vulnerabilities Found: {len(results)}")
`
## 许可证
基于 MIT 许可证分发。查看 LICENSE 获取更多信息。
## 作者
**Jashwanth** - [GitHub](https://github.com/Jashwanth33) | [LinkedIn](https://linkedin.com/in/jashwanth)
标签:Apex, CTI, Flask, Python, 威胁情报, 密码管理, 开发者工具, 插件系统, 搜索引擎查询, 无后门, 暗网监控, 机器学习, 自定义脚本, 请求拦截, 逆向工具