该工具可自动化模拟恶意进程事件的过程,无需实际搭建真实进程环境。
假设你想测试 w3wp.exe 派生 Powershell 的场景,你需要通过 IIS 配置来模拟 w3wp.exe 事件;如果你有许多规则需要验证,这会是一项非常耗时的工作。由于检测引擎通常基于来自 Sysmon 或 EDR 等遥测收集工具的简单字符串匹配来工作,任何具有相同父进程名、子进程名、命令行和路径的二进制文件都可以用来测试逻辑,因此无需配置 IIS 即可模拟该行为。

该工具允许你创建具有自定义父进程、子进程、命令行和路径的子进程。此外,还支持其他一些事件,例如从特定进程和路径创建文件、DNS 查询、注册表以及进程连接。
NAME:
Malware Cli - A new cli application
USAGE:
main.exe [global options] command [command options] [arguments...]
DESCRIPTION:
Detection validation tool.
The objective is to generate event with specific conditions to validate detection rule.
You can execute commands such as w3wp.exe spawning shell or winword creating file or making DNS queries.
COMMANDS:
argsfree Accept any commandline
connect Connect to host
download Download file
dnsquery Resolve DNS
execute Execute command with custom commandline and parent process
encrypt encrypt all files in a folder that match a pattern
createfile Create file at a spcific path
reg Add registry key
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
winword.exe 派生 cscript.exe
mcli.exe execute --parent winword.exe --command cscript.exe
rundll32.exe 发起 DNS 请求
mcli.exe dnsquery --binpath c:\temp\rundll32.exe --host malicious.com
w.exe 从路径 C:\temp 创建文件
mcli.exe createfile --path f.dat --binpath c:\temp\w.exe
运行应用以下载先决条件并检查执行
go run .
编译应用
go build -o mcli.exe .