sandeep0428/pdf-malware-analysis-toolkit

GitHub: sandeep0428/pdf-malware-analysis-toolkit

一个专注于PDF恶意软件的分析工具包,结合本地静态特征提取与云端沙箱API,实现自动化威胁检测与DOCX报告生成。

Stars: 0 | Forks: 0

# 📄 PDF 恶意软件分析工具包 一个专注于网络安全的 PDF 恶意软件分析工具包,旨在检测恶意指标、提取 IOC,并集成 VirusTotal 和 Hybrid Analysis API 以实现自动化威胁情报。 ## 🚀 功能特性 - 📌 元数据提取(作者、创建者、时间戳) - 🔍 基于关键字的可疑模式检测 - 📦 嵌入对象提取 - ⚠️ PDF 内部 JavaScript 分析 - 🌐 IOC 提取(IP、域名、URL) - 🧠 风险评分引擎 - 🧬 YARA 规则扫描 - 🛡️ CVE 检测模式 - 🔎 VirusTotal 查询(基于哈希) - ☁️ Hybrid Analysis 沙箱集成 - 📊 自动生成报告(DOCX) ## 🏗️ 项目结构 PDF-Malware-Analysis-Toolkit/ │ ├── analyzer/ ├── yara_rules/ ├── samples/ ├── screenshots/ ├── main.py ├── requirements.txt ├── README.md └── .gitignore ## ⚙️ 安装 ``` git clone https://github.com/sandeep0428/pdf-malware-analysis-toolkit.git cd pdf-malware-analysis-toolkit pip install -r requirements.txt ``` ## 📸 截图 ### 🔍 分析执行 ![执行](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/8b6fef3fd9115047.png) ![执行](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/2bd279ef0e115048.png) ### 📊 生成的报告 ![报告](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/4bc520412a115049.png) ![报告](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/5c27ffeff6115050.png) ![报告](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/9736ab6ffa115111.png) ### 📊 生成的日志 ![日志](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/8cf83e57c6115112.png) ## 📊 示例输出 文件: sample_cve.pdf [+] 正在分析: samples/sample_cve.pdf 2026-04-02 01:12:06,350 - INFO - 正在分析文件: samples/sample_cve.pdf --- 元数据 --- 2026-04-02 01:12:06,351 - INFO - 正在提取元数据 {} --- 关键字扫描 --- 2026-04-02 01:12:06,361 - INFO - 正在扫描关键字 [] --- 嵌入对象 --- 2026-04-02 01:12:06,361 - INFO - 正在提取嵌入对象 ['\r\n<< /Filter /JBIG2Decode >>\r\nstream\r\nFake exploit content\r\nendstream\r\nend'] --- JavaScript 分析 --- 2026-04-02 01:12:06,362 - INFO - 正在分析 JavaScript [] --- IOC 提取 --- 2026-04-02 01:12:06,363 - INFO - 正在提取 IOC {'urls': [], 'ips': []} --- YARA 扫描 --- 2026-04-02 01:12:06,364 - INFO - 正在运行 YARA 扫描 [] --- CVE 检测 --- 2026-04-02 01:12:06,373 - INFO - 正在检测 CVE ['CVE-2010-0188 Exploit'] --- VirusTotal 扫描 --- 2026-04-02 01:12:06,374 - INFO - 正在运行 VirusTotal 上传与扫描 [VT 摘要] 恶意 : 1 可疑 : 0 未检测 : 62 无害 : 0 [!] 警告: 文件为恶意文件! [!] 检测引擎: VBA32: suspected of SuspiciousFile.PDF.Crafted 2026-04-02 01:12:07,404 - INFO - VT 结果: {'stats': {'malicious': 1, 'suspicious': 0, 'undetected': 62, 'harmless': 0, 'timeout': 0, 'confirmed-timeout': 0, 'failure': 1, 'type-unsupported': 12}, 'detections': {'VBA32': 'suspected of SuspiciousFile.PDF.Crafted'}} --- 文件哈希 --- 2026-04-02 01:12:07,436 - INFO - 正在计算文件哈希 b1c142ec39beb5a646d89fd29df86c27161ef439802d1dd9c22f8b3e1b193f8a --- Hybrid Analysis 沙箱 --- 2026-04-02 01:12:07,437 - INFO - 正在运行 Hybrid Analysis 沙箱 --- Hybrid Analysis 沙箱 --- [DEBUG] 状态: 400 [DEBUG] 响应: {"validation_errors":[{"field":"id","errors":["This value is not valid id."]}],"message":"Input data validation has failed. Please check 'validation_errors' field to get more data."} [Hybrid 错误]: {"validation_errors":[{"field":"id","errors":["This value is not valid id."]}],"message":"Input data validation has failed. Please check 'validation_errors' field to get more data."} {'error': 'submit_failed'} --- 风险评分 --- 2026-04-02 01:12:08,603 - INFO - 已计算风险评分: {'score': 0, 'level': 'LOW'} {'score': 0, 'level': 'LOW'} 2026-04-02 01:12:08,604 - INFO - 正在生成报告 [+] 分析完成 2026-04-02 01:12:08,684 - INFO - 分析已完成 [+] 分析完成。
标签:Ask搜索, Claude, CVE检测, DAST, DNS信息、DNS暴力破解, DNS 反向解析, Hybrid Analysis, IOC提取, IP 地址批量处理, PDF恶意代码检测, Python, VirusTotal, YARA规则, 元数据提取, 威胁情报, 开发者工具, 恶意软件分析, 搜索语句(dork), 数字取证, 数据展示, 无后门, 无线安全, 沙箱API, 沙箱集成, 红队, 网络信息收集, 网络安全, 自动化分析, 自动化脚本, 跨站脚本, 进程保护, 逆向工具, 隐私保护