AkinjaElly/automated-vulnerability-scanner
GitHub: AkinjaElly/automated-vulnerability-scanner
基于 Python 与 Nmap 的自动化网络漏洞扫描器,将端口扫描与服务指纹检测结果标准化为结构化 JSON 攻击面报告,用于资产侦察与漏洞管理。
Stars: 0 | Forks: 0
# 自动化网络漏洞扫描器
## 1. 目标
本项目的目标是使用 Python 和 Nmap 引擎绑定,设计并实现一款自动化的网络侦察和漏洞管理工具。该脚本以编程方式扫描目标基础设施,解析传输协议,枚举活动端口配置,识别服务版本指纹,并将非结构化的扫描遥测数据标准化为结构化的 JSON 攻击面账本。
## 2. 工具与核心技术能力
* **自动化语言:** Python 3.x
* **核心库:** `python-nmap`, `json`, `sys`
* **安全框架:** Nmap (Network Mapper) 核心抽象引擎
* **目标测试基础设施:** `scanme.nmap.org`
## 3. 工具架构与部署执行
该应用程序通过 Python 封装了 Nmap 引擎,部署了经过优化的服务检测扫描(`-sV -sC -F`)。它以编程方式遍历系统协议,并将扫描结果导出为适用于企业的 `scan_report.json`,以便集成到更广泛的 SIEM 工作流或报告引擎中。
### 脚本执行与攻击面映射摘要

## 4. 分析结果与结构分解
该自动化框架解析了目标资产(`45.33.32.156`),并在 TCP 传输层发现了 10 个暴露的访问点。
### 检测到的关键服务足迹:
1. **Secure Shell Daemon (端口 22/tcp):** 运行 `OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.13`。
* *分析:* 识别版本指纹使工程师能够将这些足迹与已知的 CVE 索引进行关联。
2. **Domain Name System (端口 53/tcp):** 活动的通用 `domain` daemon 正在监听连接状态。
3. **Hypertext Transfer Protocol Engine (端口 80/tcp):** 运行 `Apache httpd 2.4.7`。
* *分析:* 过时的生产版本通过传统的 Web 应用程序漏洞带来了重大的利用风险。
4. **遗留及高风险基础设施服务:** 遗留邮件服务器(25 端口的 `smtp`,110 端口的 `pop3`,995 端口的 `pop3s`)以及明文远程管理 daemon(5900 端口的 `vnc`)存在活动暴露面。
## 5. 自动化输出标准化 (JSON 结构)
除了 stdout 控制台报告之外,该引擎还将结果提取到一个生产级别的 `scan_report.json` 文档中,该文档采用以下结构化 schema 进行建模,以便进行编程消费:
```json
{
"45.33.32.156": {
"hostname": "scanme.nmap.org",
"state": "up",
"protocols": {
"tcp": [
{
"port": 22,
"name": "ssh",
"product": "OpenSSH",
"version": "6.6.1p1 Ubuntu 2ubuntu2.13",
"state": "open"
}
]
}
} ```
6. Security Analysis & Mitigation StrategiesExploit IDDiscovered VectorSeverityEngineering Risk AnalysisRecommended ActionVULN-01Legacy Web Server Version (Apache 2.4.7)HighOutdated web engines are vulnerable to remote code execution (RCE) and denial of service (DoS) exploits.Upgrade HTTP system dependencies to the latest stable Apache binaries.VULN-02Plaintext Remote Desktop Management (VNC)MediumPort 5900 exposed without modern cryptographic wrapping allows network sniffers to capture remote interface credentials.Enforce end-to-end encryption or tunnel VNC traffic through secure SSH loops; implement strict IP ACL rules.VULN-03Plaintext Cleartext Mail Services (SMTP / POP3)Low / MediumRunning unencrypted mail exchanges exposes authentication handshakes to network intercept vectors.Enforce mandatory TLS configuration wrappers (SMTPS / POP3S) over secure alternative ports.7. ConclusionThis tool successfully establishes a template for scalable, code-driven asset tracking and vulnerability scanning. Moving away from manual operations toward automated collection allows teams to maintain continuously updating asset baselines, map systemic exposures efficiently, and generate instantly actionable data arrays perfect for modern DevSecOps deployment frameworks.
}
rn DevSecOps deployment frameworks.
标签:CTI, Homebrew安装, Nmap, Python, 对称加密, 插件系统, 数据统计, 无后门, 端口扫描, 网络安全, 自动化审计, 虚拟驱动器, 逆向工具, 隐私保护