Malconf 是一个 python3 库,可用于静态分析特定恶意软件家族,并提取事件响应人员在事件处理期间可以使用的配置数据。
作为一个库,它也可以被安装到自动化恶意软件分析管道中。
有一些先决条件已包含在 pip setup 和 requirements.txt 中。
对于所有解码器,你需要 yara 和 yara-python。要处理 .NET 恶意软件,你需要安装带 dotnet 支持的 yara-python
git clone --recursive https://github.com/VirusTotal/yara-python
python3 setup.py build --enable-magic --enable-dotnet
sudo python3 setup.py install
pip3 install --upgrade malwareconfig
git clone [email protected]:kevthehermit/RATDecoders.git
cd RATDecoders
pip3 install -r requirements.txt
python3 setup.py install
以下是当前支持的 RAT 列表:
使用提供的命令行工具 malconf,你可以传入单个文件或一个目录,并使用 -r 标志,它将自动检测家族并提取任何配置。
你还可以使用 -o 选项将结果写入文件。
malconf
malconf -l 这将列出所有受支持的 RAT
malconf /path/to/sample 这将自动检测家族并运行解码器
⇒ malconf tests/samples/alienspy
__ __ _ ____ __
| \/ | __ _| |/ ___|___ _ __ / _|
| |\/| |/ _` | | | / _ \| '_ \| |_
| | | | (_| | | |__| (_) | | | | _|
|_| |_|\__,_|_|\____\___/|_| |_|_|
Malware Configuration Parser by @kevthehermit
[+] Loading File: tests/samples/alienspy
[-] Found: AlienSpy
[-] Running Decoder
[-] Config Output
{'ConfigKey': 'fzGUoTaQH3SUW7E82IKQK2J2J2IISIS',
'NAME': 'ok',
'Version': 'B',
'connetion_time': '0',
'desktop': 'true',
'dns': '213.208.129.211',
'extensionname': 'qQJ',
'folder': 'java',
'instalar': 'true',
如果你通过 pip 安装,也可以将它作为库使用。
from malwareconfig import fileparser
from malwareconfig.modules import __decoders__, __preprocessors__
# Open and parse the file
sample_path = '/path/to/sample.exe'
file_info = fileparser.FileParser(file_path=sample_path)
# Check for a valid decoder and then parse
if file_info.malware_name in __decoders__:
module = __decoders__[file_info.malware_name]['obj']()
module.set_file(file_info)
module.get_config()
conf = module.config
pprint(conf)
所有功劳当归于应得之人。
Malware.lu 对最初的 xtreme RAT 分析报告的贡献 - https://code.google.com/p/malware-lu/wiki/en_xtreme_RAT
Fireye 的 Poison Ivy 和 Xtreme RAT 分析报告(尽管他们忽略了我的推文 :-) ) - http://www.fireeye.com/blog/technical/2014/02/xtremerat-nuisance-or-threat.html
Shawn Denbow 和 Jesse Herts 的论文 - http://www.matasano.com/research/PEST-CONTROL.pdf 为我节省了大量时间