43

Munin:依据文件Hash从各种在线恶意软件扫描服务提取信息的工具

 6 years ago
source link: http://www.freebuf.com/sectool/182863.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
_________   _    _   ______  _____  ______
| | | | | \ | |  | | | |  \ \  | |  | |  \ \
| | | | | | | |  | | | |  | |  | |  | |  | |
|_| |_| |_| \_|__|_| |_|  |_| _|_|_ |_|  |_|

Online Hash Checker for Virustotal and Other Services
Florian Roth

munin是一个依据文件Hash,从各种在线恶意软件扫描服务提取信息的工具。

当前Munin查询支持以下服务:

1.Virustotal

2.Malshare

3.HybridAnalysis

:Munin是基于“VT-Checker”脚本的,该脚本目前在LOKI存储库进行维护。

截图

jqmiAbq.jpg!web

使用

usage: munin.py [-h] [-f path] [-c cache-db] [-i ini-file] [-s sample-folder]
                [--comment] [-p vt-comment-prefix] [--download]
                [-d download_path] [--nocache] [--intense] [--retroverify]
                [-r num-results] [--nocsv] [--verifycert] [--sort] [--debug]

Online Hash Checker

optional arguments:
  -h, --help            显示帮助信息并退出
  -f path               要处理的文件(逐行哈希或以行为单位的哈希csv文件 - 自动检测位置和注释)
  -c cache-db           缓存数据库文件的名称(默认为:vt-hash-db.pkl) 
  -i ini-file           包含API密钥的ini文件的名称
  -s sample-folder      要处理的样本文件夹
  --comment             对日志中包含注释的analysed hash发表评论
  -p vt-comment-prefix  Virustotal 注释前缀
  --download            从Hybrid Analysis中启用样本下载
  -d download_path      Hybrid Analysis中用于样本下载的输出路径。文件夹必须存在                        
  --nocache             不使用缓存数据库文件
  --intense             使用PhantomJS解析永久链接(用于提取用户对样本的注释)
  --retroverify         在运行结束时仅检查具有相同注释的40个条目(retrohunt验证)
  -r num-results        验证结果的数量
  --nocsv               不要将结果写入csv文件
  --verifycert          验证 SSL/TLS 证书
  --sort                对输入行进行排序(对VT retrohunt结果非常有用)
  --debug               调试输出

特性

模式A:从任意基于正则表达式的文本文件中提取哈希值

模式B:遍历样本目录并在线检查哈希值

通过API(JSON响应)从Virustotal检索有价值的信息,并通过永久链接(HTML解析)获取其他信息

保存历史记录(缓存),只对文本文件中多次出现的散列查询服务一次

被存储在JSON中的缓存对象

使用结果创建CSV文件,以便于后续的处理和报告

如果可用,将结果追加到之前的CSV文件中

提取信息

哈希和注释

基于用户定义的列表进行匹配的AV供应商

在野使用的文件名

PE信息,如描述,原始文件名和版权声明

基于Virustotal ratio的结果

第一次和最后一次提交时间

某些指标的标签:Harmless, Signed, Expired, Revoked, MSSoftware

提取检查

上传样本查询 Malshare.com

查询Hybrid-Analysis.com分析样本

当前批处理中的重复Imphash > 帮助你发现导入哈希表中的重复项

安装

1.下载/克隆存储库

2.安装所需软件包:pip3 install -r requirements.txt(如果是macOS则再添加一个–user参数)

3.(可选:–intense模式需要)下载PhantomJS并将其放入$PATH,例如/usr/local/bin http://phantomjs.org/download.html

4.在munin.ini文件中,为不同的服务设置API密钥

5.首次运行使用demo文件:python munin.py -f munin-demo.txt –nocache

典型的命令行使用

处理Virustotal Retrohunt结果,并在检查之前对行进行排序,以便在块中检查匹配的签名:

python munin.py -f my.ini -f ~/Downloads/retro_hunt

处理IOC文件,并显示在Virustotal上对这些样本发表评论的人(使用PhantomJS,CPU使用率会更高):

python munin.py -f my.ini -f ~/Downloads/misp-event-1234.csv --sort --intense

处理样本目录并在线检查其哈希值:

python munin.py -f my.ini -s ~/malware/case34

获取Munin使用的API密钥

Virustotal

1.在此创建一个帐户: https://www.virustotal.com/#/join-us

2.在Profile > My API key中获取你的public API key。

Malshare

在这里注册: https://malshare.com/register.php

Hybrid Analysis

1.在此创建一个帐户: https://www.hybrid-analysis.com/signup

2.登录,并在Profile > API key中获取密钥。

*参考来源: github ,FB小编 secist 编译,转载请注明来自FreeBuf.COM


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK