maxi-schaefer/Aegis
GitHub: maxi-schaefer/Aegis
Aegis 是一套基于 Python 的集成式侦察管线,通过串联子域名枚举、端口扫描、Web 指纹识别与 CVE 关联,实现攻击面自动化映射和漏洞快速发现。
Stars: 1 | Forks: 0
# Aegis:高性能侦察与漏洞映射 Pipeline
## 🛠️ 核心架构组件
* **异步风格线程处理:** 使用 `ThreadPoolExecutor` 引擎协调对海量子域名集的并发探测。
* **Layer-7 签名编译引擎:** 自动将原始、分布式的 Wappalyzer 指纹降采样为结构化的 regex 查找对象。
* **多源 CVE 同步:** 将发现的 Web 软件桥接回 **CISA KEV(已知被利用漏洞)** 目录和 **社区 NVD(国家漏洞数据库)** 每日 feed 更新。
* **Active Directory 探测:** 安全评估上下文感知的 Web 路径,同时追踪 Wildcard DNS 污染和潜在的 WAF 频率拦截。
* **被动元数据扩充:** 提取资产属性,包括 SSL/TLS 证书参数、兼容 Shodan 的 favicon Murmur3 哈希以及 HTML 标题。
## 📂 仓库文件结构
```
├── aegis.py # Main pipeline orchestrator, CLI portal, and thread pool controller
├── update_data.py # Signature and CVE compiler (Fetch Wappalyzer + CISA KEV + NVD)
├── signatures.json # Generated compilation cache containing layer-7 regex rules
├── cve_database.json # Generated local look-up database mapping technologies to CVEs
└── scanner/
├── ports.py # Native Python wrapper binding high-intensity Nmap probes
├── brute.py # Adaptive web directory discovery engine
├── subdomains.py # Subprocess interface handler leveraging Subfinder binaries
├── vuln.py # Local logical correlation engine mapping versions to CVEs
├── web.py # Layer-7 HTTP fingerprinting and favicon-hashing engines
└── enrich.py # Infrastructure helpers (DNS resolution, Wildcard checking)
```
## 🚀 快速开始
### 1. 系统要求与外部依赖
Aegis 依赖于底层系统二进制文件进行网络侦察。在执行之前,请确保已安装:
- **Nmap**(用于服务指纹识别和版本检测)
- **Subfinder**(用于自动化子域名枚举)
在 Debian/Ubuntu 系统上,通过以下命令安装:
```
sudo apt update && sudo apt install nmap subfinder -y
```
### 2. Python 设置
克隆仓库并安装所需的依赖项:
```
pip install -r requirements.txt
```
### 3. 编译签名与更新漏洞数据库
在首次运行扫描之前,请更新您的本地元数据引擎。此实用程序将获取最新的签名 schema 和漏洞记录,以构建您的本地数据库文件(`signatures.json` 和 `cve_database.json`):
```
python update_data.py
```
## 💻 使用方法
使用主执行窗口对目标域名运行完整的发现与映射 pipeline:
```
python aegis.py targetdomain.com --threads 20
```
选项:
- `domain`:要进行枚举和指纹识别的目标根域名
- `-t, --thread`:调整处理线程池的最大工作线程数(默认:`20`)
## 📊 结构化 JSON 输出格式
执行完成后,Aegis 会将所有 pipeline 的发现格式化为一个标记为 `target_domain_results.json` 的规范化报告文件。该 schema 捕获了您资产面上的全面状态属性:
```
[
{
"host": "api.targetdomain.com",
"ip": "192.168.1.50",
"dns": {
"A": ["192.168.1.50"],
"CNAME": []
},
"ports": [
{
"host": "192.168.1.50",
"port": 443,
"protocol": "tcp",
"state": "open",
"service": "http",
"product": "Apache httpd",
"version": "2.4.49"
}
],
"tech": {
"technologies": ["Apache httpd", "http"]
},
"http": {
"https": {
"status": 200,
"title": "Corporate API Portal",
"server": "Apache/2.4.49",
"technologies": [
{ "name": "Apache httpd", "version": "2.4.49" }
],
"favicon_hash": "-123456789",
"final_url": "[https://api.targetdomain.com/](https://api.targetdomain.com/)",
"waf_triggered": false
}
},
"tls": {
"subject": { "commonName": "api.targetdomain.com" },
"issuer": { "commonName": "Let's Encrypt Authority X3" },
"not_before": "May 1 00:00:00 2026 GMT",
"not_after": "Aug 1 00:00:00 2026 GMT"
},
"exposed_endpoints": {
"https": [
{ "path": "/.env", "status": 200, "content_length": 421 },
{ "path": "/robots.txt", "status": 200, "content_length": 150 }
]
},
"vulnerabilities": [
{
"tech_name": "Apache httpd",
"version_detected": "2.4.49",
"cve": "CVE-2021-41773",
"type": "Path Traversal & RCE - CISA KEV",
"cvss": 9.8,
"description": "Flaw in path normalization logic in Apache HTTP Server 2.4.49 allows directory traversal and remote code execution."
}
],
"is_wildcard": false
}
]
```
## ⚖️ 许可证与免责声明
本软件仅用于授权的安全研究、资产管理和防御性审计目的。用户对在运行目标交战之前确保遵守当地法律和组织授权范围负全部责任。
标签:CTI, GitHub, Python, 实时处理, 密码管理, 攻击面测绘, 无后门, 资产指纹识别, 逆向工具