VirusTotal智能搜索

1. VirusTotal介绍

从wiki参考4上,可以对VT(VirusTotal)有一个大致了解:

  1. VirusTotal.com是一个免费的病毒、蠕虫、木马和各种恶意软件分析服务,可以针对可疑文件和网址进行快速检测,最初由Hispasec维护
  2. VirusTotal.com曾在PC World杂志(美国版)的评选中,荣获2007年最优秀的100款产品之一的称号
  3. 2012年9月7日 Google 已经收购了网络安全创业公司VirusTotal,旨在增强针对自身互联网服务的保护措施

2. 智能搜索示例

VT可以直接像搜索引擎一样使用,这没什么特别之处。

VT最强大的是,可以根据多个Operator组合做智能搜索,比如(如下案例来自参考2):

  1. 搜索具有不合理XREF表的PDF文件

方法1

type:pdf tag:invalid-xref

方法2

type:pdf AND tag:invalid-xref
  1. 搜索所有DLL文件或者是EXE文件
type:pedll OR type:peexe
  1. 搜索family是zbot的能正常运行(不crash)的文件
engines:zbot NOT tag:corrupt

这里的含义是:至少有一家vendor将family标为zbot,且不会corrupt(能在真实系统中运行)

  1. 或逻辑与非逻辑组合搜索
(engines:zbot OR engines:sinowal) NOT (tag:corrupt)

这里的含义是:至少有一家vendor将family标为zbot,或者sinowal,且不会corrupt(能在真实系统中运行)

  1. 超过5家vendor打为malware的pdf文件
type:pdf positives:5+
  1. 能自动执行,且嵌入了js的pdf文件
type:pdf tag:autoaction tag:js-embedded
  1. 含有能被漏洞利用的pdf
type:pdf tag:exploit
  1. 搜索含有漏洞的文件
tag:exploit
  1. 搜索含有某个特定漏洞CVE的文件
tag:cve-2012-0158

3. 参考

  1. VT. https://www.virustotal.com/gui/home/search
  2. VT Search operators. https://support.virustotal.com/hc/en-us/articles/360001387057
  3. VT File search modifiers. https://support.virustotal.com/hc/en-us/articles/360001385897-VT-Intelligence-search-modifiers
  4. https://zh.wikipedia.org/wiki/VirusTotal
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
加入这些API可以增强你的搜索和安全分析能力。以下是每个API的简要介绍和如何使用它们: 1. fofa API:可以使用 Fofa API 来搜索互联网上的设备和服务。在使用之前,你需要注册并获取 API 密钥。然后,你可以使用 API 来执行各种查询,例如根据 IP 地址、端口、协议、地理位置等来搜索设备。示例代码如下: ```python import requests api_email = 'your_email' api_key = 'your_api_key' query = 'title="admin" && country="CN"' res = requests.get(f"https://fofa.so/api/v1/search/all?email={api_email}&key={api_key}&qbase64={query}") print(res.json()) ``` 2. Shodan API:与 Fofa API 类似,Shodan API 也可以用来搜索互联网上的设备和服务。你需要注册并获取 API 密钥,然后可以使用 API 来执行各种查询。例如,根据 IP 地址、端口、协议、服务等搜索设备。示例代码如下: ```python import shodan api_key = 'your_api_key' api = shodan.Shodan(api_key) query = 'apache' results = api.search(query) for result in results['matches']: print(result['ip_str']) ``` 3. GitHub API:GitHub API 可以用来搜索代码库、获取代码库信息、获取提交历史记录等。你需要注册并获取 API 密钥,然后可以使用 API 来执行各种查询。例如,搜索代码仓库、获取仓库信息、获取提交历史记录等。示例代码如下: ```python import requests api_key = 'your_api_key' headers = {'Authorization': f'token {api_key}'} # Search repositories query = 'language:python' res = requests.get(f'https://api.github.com/search/repositories?q={query}', headers=headers) print(res.json()) # Get repository information repo_name = 'torvalds/linux' res = requests.get(f'https://api.github.com/repos/{repo_name}', headers=headers) print(res.json()) # Get commit history res = requests.get(f'https://api.github.com/repos/{repo_name}/commits', headers=headers) print(res.json()) ``` 4. VirusTotal API:VirusTotal API 可以用来分析文件、URL 和 IP 地址的恶意程度。你需要注册并获取 API 密钥,然后可以使用 API 来执行各种分析。例如,分析文件、URL 和 IP 地址的恶意程度,获取恶意软件样本等。示例代码如下: ```python import requests api_key = 'your_api_key' headers = {'x-apikey': api_key} # Analyze file file_hash = 'e8f91b8e4b9f0dbd382bfe6c9f776b2c' res = requests.get(f'https://www.virustotal.com/api/v3/files/{file_hash}', headers=headers) print(res.json()) # Analyze URL url = 'https://www.google.com' res = requests.post(f'https://www.virustotal.com/api/v3/urls', headers=headers, json={'url': url}) print(res.json()) # Analyze IP address ip_address = '8.8.8.8' res = requests.get(f'https://www.virustotal.com/api/v3/ip_addresses/{ip_address}', headers=headers) print(res.json()) ``` 以上是如何使用 fofa、shodan、github 和 virustotal 的 API 进行搜索和分析的示例代码。注意,在使用这些 API 时需要遵守相应的使用条款和政策。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值