tayyabaawan731-droid/AI-Automation-task-4
GitHub: tayyabaawan731-droid/AI-Automation-task-4
一款 Python 威胁情报富化工具,通过聚合多个威胁情报平台数据对安全指标进行分析并生成结构化报告。
Stars: 0 | Forks: 0
# README.md
## THE ARZENS 威胁情报富化工具
### 概述
本项目是 THE ARZENS 工程实习项目(AI、自动化与安全工程方向)作业 4 的一部分。该工具通过查询多个威胁情报平台,对安全指标(如 IP 地址、域名、URL 和文件哈希)进行富化。
该工具集成了:
* VirusTotal
* AbuseIPDB
* AlienVault OTX
它能够分析各类指标并生成不同格式的安全报告。
## 功能
* 分析 IP 地址、域名、URL 和文件哈希
* 支持命令行输入
* 支持输入文件
* 交互模式
* 集成多个威胁情报 API
* JSON 输出
* CSV 输出
* 生成易读的报告
* 错误处理与重试机制
* API 速率限制处理
* 结果缓存
## 项目结构
```
assignment4/
├── threat_intel_tool.py
├── config.yaml
├── sample_indicators.txt
├── sample_output.json
├── sample_output.csv
├── sample_report.txt
├── alert_enricher.py
├── bulk_analyzer.py
├── sample_alert.json
├── sample_indicators_bulk.csv
├── WORKFLOWS.md
└── README.md
```
## 安装说明
安装所需的库:
```
pip install requests pyyaml python-dotenv colorama
```
## API 配置
创建一个名为 `config.yaml` 的文件。
```
virustotal_api_key: YOUR_VIRUSTOTAL_API_KEY
abuseipdb_api_key: YOUR_ABUSEIPDB_API_KEY
alienvault_api_key: YOUR_ALIENVAULT_API_KEY
```
**重要提示:** 切勿在源代码中硬编码 API 密钥。
## 用法
### 检查 IP 地址
```
python threat_intel_tool.py --ip 8.8.8.8
```
### 检查域名
```
python threat_intel_tool.py --domain google.com
```
### 检查文件哈希
```
python threat_intel_tool.py --hash abc123
```
### 检查 URL
```
python threat_intel_tool.py --url https://example.com
```
### 从文件分析指标
```
python threat_intel_tool.py --input-file sample_indicators.txt
```
### 交互模式
```
python threat_intel_tool.py --interactive
```
## 输出格式
该工具会生成以下输出:
* 控制台输出
* JSON 报告
* CSV 报告
* 文本报告
## 工作流
### 告警富化
```
python alert_enricher.py --alert sample_alert.json
```
### 批量分析
```
python bulk_analyzer.py --input sample_indicators_bulk.csv
```
## 使用的技术
* Python
* Requests
* PyYAML
* Python-dotenv
* Colorama
* JSON
* CSV
* Argparse
## 作者
Tayyaba Awan
THE ARZENS 工程实习项目
AI、自动化与安全工程方向
标签:API集成, Homebrew安装, Python, 可观测性, 威胁情报, 字符串匹配, 开发者工具, 恶意代码分类, 无后门, 自动化分析, 跨站脚本, 逆向工具