_________ _ _ ______ _____ ______
| | | | | \ | | | | | | \ \ | | | | \ \ /.)
| | | | | | | | | | | | | | | | | | | | /)\|
|_| |_| |_| \_|__|_| |_| |_| _|_|_ |_| |_| // /
/'" "
面向 Virustotal 及其他服务的在线哈希检查器
Florian Roth
Munin 是一个在线哈希检查工具,可从各种在线来源检索有价值的信息
当前版本的 Munin 会查询以下服务:
默认模式 - 从文件读取哈希

usage: munin.py [-h] [-f path] [--vh search-string]
[--vhrule search-string] [-o output] [--vtwaitquota]
[--vtminav min-matches] [--limit hash-limit]
[--vhmaxage days] [-c cache-db] [-i ini-file]
[-s sample-folder] [--comment] [-p vt-comment-prefix]
[--download] [-d download_path] [--nocache] [--nocsv]
[--verifycert] [--sort] [--web] [-w port] [--cli]
[--rescan] [--debug]
在线哈希检查器
optional arguments:
-h, --help 显示此帮助消息并退出
-f path 要处理的文件(逐行哈希,或每行包含哈希的 csv
- 自动检测位置和注释)
--vh search-string 通过关键字、标签、YARA 规则名称、Mitre ATT&CK 软件(例如 S0154)、
技术(例如 T1023)或威胁组织(例如 G0049)查询 Valhalla 中的哈希
--vhrule search-string
通过规则、关键字、标签、YARA 规则名称、Mitre ATT&CK 软件(例如
S0154)、技术(例如 T1023)或威胁组织
(例如 G0049)查询 Valhalla 中的哈希
-o output 结果输出文件(CSV)
--vtwaitquota 如果超出 VT 配额则不继续,而是等待
第二天
--vtminav min-matches
从 VT 查询哈希信息所需的最少 AV 匹配数"
--limit hash-limit 在批处理模式下处理完这么多新哈希后退出
(忽略缓存)。
--vhmaxage days Valhalla 上要处理的样本的最大存在天数
-c cache-db 缓存数据库文件的名称(默认:vt-hash-
db.json)
-i ini-file 保存 API 密钥的 ini 文件的名称
-s sample-folder 包含要处理的样本的文件夹
--comment 为所分析的哈希发布一条评论,其中
包含日志行中的注释
-p vt-comment-prefix Virustotal 评论前缀
--download 启用从 Hybrid Analysis 下载样本。
需要样本的 SHA256。
-d download_path 从 Hybrid Analysis 下载样本的输出路径。
文件夹必须存在
--nocache 不使用缓存数据库文件
--nocsv 不写入包含结果的 CSV
--verifycert 验证 SSL/TLS 证书
--sort 对输入行进行排序
--web 以 Web 服务方式运行 Munin
-w port Web 服务端口
--cli 以命令行界面模式运行 Munin
--rescan 触发对每个已分析文件的重新扫描
--debug 调试输出
pip3 install -r requirements.txt(在 macOS 上添加 --user)cp munin.ini my.ini(参见 获取 API 密钥 章节以获取帮助)python munin.py -i my.ini -f munin-demo.txt处理 Virustotal Retrohunt 结果,并在检查前对行进行排序,以便匹配的签名按块进行检查
python3 munin.py -i my.ini -f ~/Downloads/retro_hunt
处理包含样本的目录并在线检查其哈希值
python3 munin.py -i my.ini -s ~/malware/case34
使用命令行界面模式(v0.14 新增)
python3 munin.py -i my.ini
Profile > My API key 中查看你的公共 API 密钥在此处注册 https://malshare.com/register.php
在此处注册 https://bazaar.abuse.ch/。然后你可以在 Account Overview 中找到你的 API 密钥。
Profile > API keyAuthkey 的值用作 API 密钥目前仅面向客户或受邀研究人员
https://valhalla.nextron-systems.com/
Hashlookup CIRCL 的实例免费提供,并按尽力而为的原则提供服务。
使用 --cli 启动 munin 并按照说明操作。
例如
python3 munin.py -i my.ini --cli
粘贴包含哈希值的内容,然后按 CTRL+D 完成输入。最后一行末尾需要有一个换行符。
默认情况下,它会创建一个文件名中包含当前日期的 CSV 文件。

使用 --web 启动 munin,并可选地通过 -w port 指定端口。
例如:
python3 munin.py -i my.ini --web -w 8080
该 Web 服务按照以下 URL 方案等待字符串。
http://server:port/<string>
该字符串可以是任意不含换行符的字符串,例如
Emotet:1585ad28f7d1e0ca696e6c6c2f1d008a
ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa;IOC1
dc9b5e8aa6ec86db8af0a7aa897ca61db3e5f3d2e0942e319074db1aaccfdc83