摘要
来自 VirusTotal API v3 的威胁情报:按哈希查询文件报告,约 70 个引擎给出的 URL、域名和 IP 报告,搜索,指标之间的关联关系,沙箱行为与 MITRE ATT&CK,社区评论和投票,重新扫描,以及在管理员开启后提交 URL 扫描。
引导式设置
2 分钟将 VirusTotal 连接到 Gemini
开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 VirusTotal,再把你的 MCP URL 添加到 Gemini。无需代码,也无需自行运行服务器。
无需信用卡 · 7 天试用 · 提供自托管方案
试试这样问
VirusTotal 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → VirusTotal、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
VirusTotal + Gemini
来自 VirusTotal API v3 的威胁情报:按哈希查询文件报告,约 70 个引擎给出的 URL、域名和 IP 报告,搜索,指标之间的关联关系,沙箱行为与 MITRE ATT&CK,社区评论和投票,重新扫描,以及在管理员开启后提交 URL 扫描。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
VIRUSTOTAL_API_KEY
步骤 1 — 获取凭证
设置大约需要 2 分钟。你需要一个 VirusTotal 账户;社区版 API 密钥是免费的。
- 在 https://www.virustotal.com/gui/join-us 免费注册 VirusTotal Community,并确认邮箱。
- 在 https://www.virustotal.com/gui/my-apikey 打开你的 API 密钥,粘贴到
VIRUSTOTAL_API_KEY。它由 64 个小写十六进制字符组成,通过x-apikey请求头发送。 - 安装连接器并运行
virustotal_list_popular_threat_categories:这是一个轻量调用,用来确认密钥。
公开密钥还是 Premium 密钥:免费密钥每分钟 4 次、每天 500 次请求,而且 VirusTotal 的条款禁止在商业产品或企业业务流程中使用公开 API。Premium 密钥没有这些限制,并解锁 virustotal_intelligence_search、更多关联关系和更多上下文。每日配额在 00:00 UTC 重置。用你的 VirusTotal 用户名调用 virustotal_get_api_usage,可以查看最多 30 天内按接口统计的每日用量。
隐私:你查询或提交的每个指标都会进入 VirusTotal 的数据集,并对社区可见。绝不要发送机密的或含个人数据的 URL、域名或哈希,例如带令牌的 URL、密码重置链接或内部主机名。
可以读取的内容:
- 判定结果:
virustotal_get_file_report(按 SHA-256、SHA-1 或 MD5 查询,不上传任何内容)、virustotal_get_url_report、virustotal_get_domain_report和virustotal_get_ip_report,包括约 70 个引擎和 URL 黑名单的检测统计、每个引擎的判定、信誉、投票、标签,并视对象而定提供文件类型和文件名、最终 URL 和重定向、DNS 记录、WHOIS、注册商、ASN 和国家。 virustotal_search接受哈希、完整 URL、域名、IP 或评论标签(如#phishing)。传入 URL 时返回该 URL 的报告,在没有 URL ID 时这是最简单的办法。- 关联关系:
virustotal_list_related_objects沿着某个关系查询,例如文件的contacted_domains、域名的resolutions或subdomains、IP 的communicating_files。virustotal_list_related_ids只返回 ID,数据量小得多。virustotal_get_resolution读取一条 DNS 解析记录(ID 为 IP 后面紧跟域名,例如8.8.8.8dns.google)。 - 沙箱:
virustotal_get_file_behaviour_summary(进程、文件、注册表项、互斥体、DNS、IP 和 HTTP 流量)和virustotal_get_file_mitre_attack(每个沙箱中观察到的 MITRE ATT&CK 战术和技术)。 - 社区:针对单个对象的
virustotal_list_comments和virustotal_list_votes,整个 VirusTotal 范围内的virustotal_list_latest_comments(可按tag:malware等过滤),单条评论用virustotal_get_comment。 - 仅限 Premium:使用搜索修饰符(如
type:peexe positives:10+)的virustotal_intelligence_search。
可以写入的内容:virustotal_rescan 请求对 VirusTotal 已知的文件、URL、域名或 IP 重新分析,virustotal_get_analysis 读取结果(每 15 到 60 秒查询一次,直到 status 为 completed)。virustotal_add_comment 以你的账户发布公开评论(以 # 开头的词会成为标签),virustotal_add_vote 投出公开的 harmless 或 malicious 票。
安装时关闭:virustotal_scan_url 和 virustotal_delete_comment。两者都无法撤销:提交的 URL 连同其中的所有内容会永久共享给 VirusTotal 社区,删除的评论也无法恢复。团队需要时由工作区管理员开启。开启 virustotal_scan_url 后,VirusTotal 尚未见过的 URL(404)可以提交,并用 virustotal_get_analysis 读取结果。
URL 标识符:URL 相关工具使用 URL ID,即去掉填充的 base64url 编码 URL(https://example.com/ 变为 aHR0cHM6Ly9leGFtcGxlLmNvbS8),或规范化 URL 的 SHA-256。URL 报告的 data.id 就是这个 SHA-256;分析 ID 的形式为 u-<sha256>-<timestamp>。拿不准时,AI 会直接用 URL 调用 virustotal_search。
数据格式:响应遵循 JSON:API,包含 data.id、data.type 和 data.attributes。last_analysis_stats 按判定统计引擎数量(malicious、suspicious、harmless、undetected、timeout),last_analysis_results 列出每个引擎的类别和结果。reputation 是社区评分,负数表示不好;total_votes 统计 harmless 和 malicious 票数。日期是以秒为单位的 Unix 时间戳(UTC)。检测数少并不证明对象安全:AI 还会检查分析日期和关联关系。URL、域名和 IP 报告省略了体积较大的字段,例如 HTTP 头、Cookie、HTML meta 和完整的 HTTPS 证书;证书可以通过 historical_ssl_certificates 关系获取。
分页:只要还有更多条目,列表工具就会返回 meta.cursor 和 links.next;AI 把 meta.cursor 作为 cursor 并保持相同的 limit 传入,没有游标时停止。
常见错误:401 WrongCredentialsError 或 AuthenticationRequiredError 表示密钥错误或缺失(或账户邮箱未确认),403 ForbiddenError 表示仅限 Premium 的接口或关系,404 NotFoundError 表示 VirusTotal 没见过该对象,409 AlreadyExistsError 表示重复投票,429 QuotaExceededError 表示超过每分钟或每日配额(稍后再试或升级),400 InvalidArgumentError 表示 ID 格式错误。
该连接器不上传文件,也不下载样本:文件通过哈希查询。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Gemini 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启
gemini。 - 在 Gemini CLI 中运行
/mcp(或在终端运行gemini mcp list),anythingmcp应显示为已连接。 - 开始输入提示,Gemini CLI 现在可以调用
VirusTotal的工具。
可用工具
| Tool | What it does |
|---|---|
virustotal_get_file_report | Report on a file already known to VirusTotal, by hash: detection stats (malicious, suspicious, harmless, undetected), each engine's… |
virustotal_get_url_report | Report on a URL already analysed by VirusTotal: detection stats and each engine's verdict, categories, final URL after redirects, HTTP… |
virustotal_get_domain_report | Report on a domain: detection stats and each engine's verdict, categories from several vendors, reputation, votes, last DNS records… |
virustotal_get_ip_report | Report on an IPv4 or IPv6 address: detection stats and each engine's verdict, reputation, votes, ASN and owner, country and continent… |
virustotal_get_analysis | Status and result of one analysis started by virustotal_scan_url, virustotal_rescan or a file submission: status (queued, in-progress… |
virustotal_search | Look up a file hash, a URL, a domain, an IP address or a comment tag in one call |
virustotal_intelligence_search | VirusTotal Intelligence corpus search with search modifiers (e.g. type:peexe positives:10+ fs:2026-01-01+, entity:domain domain_regex:...… |
virustotal_list_comments | Community comments on a file, URL, domain or IP address, newest first: text, tags, date and the comment's own votes |
virustotal_list_votes | Community votes on a file, URL, domain or IP address: each vote's verdict (harmless or malicious), value and date |
virustotal_list_related_objects | Objects related to a file, URL, domain or IP address, as full objects: e.g. the domains and IPs a file contacted, files it dropped, a… |
virustotal_list_related_ids | Ids (descriptors) of the objects related to a file, URL, domain or IP address, without their attributes: much smaller than… |
virustotal_get_file_behaviour_summary | Summary of all sandbox runs of a file: processes created, files written and deleted, registry keys, mutexes, DNS lookups, IP traffic, HTTP… |
virustotal_get_file_mitre_attack | MITRE ATT&CK tactics and techniques observed for a file in each sandbox, with the signatures that triggered them and their severity |
virustotal_list_latest_comments | Latest comments posted anywhere on VirusTotal, optionally only those with a tag (filter tag:malware) |
virustotal_get_comment | One comment by id: text, tags, date, votes and, with relationships=author,item, who wrote it and what it is about |
virustotal_get_resolution | One DNS resolution object: which IP a domain resolved to, when, and from which source |
virustotal_list_popular_threat_categories | List of the threat categories antivirus verdicts commonly use (trojan, ransomware, dropper, miner, phishing, ...) |
virustotal_get_api_usage | Daily API usage of a VirusTotal user, per endpoint, between two dates (at most 30 days, default the last 30) |
virustotal_scan_url | Submit a URL for scanning by about 70 security engines |
virustotal_rescan | Ask VirusTotal to analyse again an object it already knows: a file by hash, a URL by identifier, a domain or an IP address |
virustotal_add_comment | Post a public comment on a file, URL, domain or IP address under your VirusTotal account |
virustotal_add_vote | Cast your public vote on a file, URL, domain or IP address: harmless or malicious |
virustotal_delete_comment | Delete one of your own public comments by id |
示例提示
- “SHA-256 为 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f 的文件被判定为恶意了吗?给我看检测统计和威胁标签。”
- “检查域名 example-login-secure.com:引擎怎么判定,它是什么时候注册的,解析到过哪些 IP?”
- “IP 185.220.101.1 的信誉如何,归谁所有,有哪些文件与它通信过?”
- “给我看这个哈希的沙箱行为和 MITRE ATT&CK 技术:44d88612fea8a8f36de82e1278abb02f。”
- “列出最新的带 phishing 标签的社区评论,并总结它们冒充了哪些品牌。”
FAQ
Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。
下一步
这份指南对你有帮助吗?