article
README
🚀 病毒总线 VirusTotal 项目说明
本项目 mcp-virustotal 集成了 VirusTotal API,支持对文件、URL 和 IP 地址进行威胁情报查询,还具备自动化的关系分析功能,能实现多源威胁检测,同时支持结果导出和日志记录。
🚀 快速开始
要安装并运行 mcp-virustotal,请执行以下命令:
npm install mcp-virustotal
配置文件路径
- 全局安装配置路径:
~/.config/mcp-virustotal/config.json - 当前目录配置路径:
config.json
简单配置示例(全局安装)
mcp-virustotal config --key VT_PUBLIC_KEY=your_api_key_here
✨ 主要特性
- 支持文件、URL 和 IP 地址的威胁情报查询
- 提供自动化的关系分析功能
- 集成 VirusTotal API 实现多源威胁检测
- 支持结果导出和日志记录功能
- 具备代理服务器配置选项
📦 安装指南
安装步骤
- 全局安装:
npm install -g mcp-virustotal - 创建配置文件:
mcp-virustotal config init - 配置 API 密钥:
mcp-virustotal config --key VT_PUBLIC_KEY=your_api_key_here - 启动服务:
mcp-virustotal start
💻 使用示例
基础用法
本项目提供了多种功能模块,以下是一些基础的使用示例:
报告工具
- 病毒文件分析
mcp-virustotal report file --hash 0a1b2c3d4e5f6a7b8c9d
- URL 分析
mcp-virustotal report url --url http://example.com
- IP 地址分析
mcp-virustotal report ip --ip 192.168.1.1
关系分析工具
- URL 关系分析
mcp-virustotal relationship url --url http://example.com --type communicating_files
- 文件关系分析
mcp-virustotal relationship file --hash 0a1b2c3d4e5f6a7b8c9d --type dropped_files
📚 详细文档
配置文件结构
{
"key": "your_api_key_here",
"proxy": {
"enabled": false,
"url": "http://proxy.example.com:1080"
},
"logging": {
"level": "info",
"file": "/var/log/mcp-virustotal.log"
}
}
功能模块说明
报告工具
- 文件分析接口
mcp-virustotal report file --hash <file_hash>
- URL 分析接口
mcp-virustotal report url --url <target_url>
- IP 地址分析接口
mcp-virustotal report ip --ip <target_ip>
关系分析工具
- 获取文件关系信息
mcp-virustotal relationship file --hash <file_hash> --type <relationship_type>
- 获取 URL 关系信息
mcp-virustotal relationship url --url <target_url> --type <relationship_type>
错误处理
常见错误及解决方案
-
API 请求失败
- 检查网络连接
- 验证 API 密钥是否有效
- 确保请求频率在 VirusTotal 的限制范围内
-
配置文件错误
- 确认配置文件路径正确
- 验证 JSON 格式无误
- 检查 API 密钥是否正确设置
🔧 技术细节
项目结构
src/:核心业务逻辑代码config/:配置管理模块logger/:日志记录组件api/:API 请求处理函数
贡献指南
- 克隆仓库
git clone https://github.com/virus-total/mcp-virustotal.git
- 安装依赖
npm install
- 运行测试
npm test
📄 许可证
本项目遵循 MIT 协议。详情请访问: MIT License
参考资料
贡献者名单
- 张三(zhangsan)
- 李四(lisi)
- 王五(wangwu)
微信扫一扫