MalwLess 是一款开源工具,允许你在不运行实际进程或 PoC 的情况下模拟系统受损或攻击行为。该工具旨在测试蓝队检测能力和 SIEM 关联规则。它提供了一个基于规则的框架,任何人都可以编写规则,因此当出现新技术或攻击时,你可以编写自己的规则并与社区分享。
这些规则可以模拟 Sysmon 或 PowerShell 事件。MalwLess 能够解析规则并将其直接写入 Windows 事件日志,然后你可以将其转发到事件收集器。
MalwLess Simulation Tool v1.1
Author: @n0dec
Site: https://github.com/n0dec/MalwLess
[Rule test file]: https://raw.githubusercontent.com/n0dec/malwless/HEAD/rule_test.json
[Rule test name]: MalwLess default
[Rule test version]: https://raw.githubusercontent.com/n0dec/malwless/HEAD/0.3
[Rule test author]: https://raw.githubusercontent.com/n0dec/malwless/HEAD/n0dec
[Rule test description]: MalwLess default test pack.
[>] Detected rule: rules.vssadmin_delete_shadows
... Source: Sysmon
... Category: Process Create
... Description: Deleted shadows copies via vssadmin.
[>] Detected rule: rules.certutil_network_activity
... Source: Sysmon
... Category: Network connection detected
... Description: Network activity from certutil tool.
[>] Detected rule: rules.powershell_scriptblock
... Source: PowerShell
... Category: 4104
... Description: Powershell 4104 event for Invoke-Mimikatz.
你可以从网站 https://n0dec.github.io/#malwless 下载最新版本
或者从发布页面 https://github.com/n0dec/MalwLess/releases 下载
你的系统需要安装 sysmon。https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
下载最新 release 版本后,你可以在已提权的命令提示符中直接运行。
要测试默认的 rule set(位于 rule_test.json),只需下载并运行:
> malwless.exe
如果你想测试不同的 rule set 文件,请使用 -r 参数:
> malwless.exe -r your_pack.json
要编写自定义 rule set,请查看 编写规则集合 部分。
任何人都可以创建规则。规则采用 json 格式,结构简单。
此外,你可以使用 转换器 将原始事件解析并转换为规则。
"process_create_rule": {
"enabled": true,
"source": "Sysmon",
"category": "Process Create",
"description": "Activity event based on Process Create category.",
"payload": {
"Image": "process.exe",
"CommandLine": "process.exe --help"
}
}
Mitre ATT&CK 参考:https://attack.mitre.org/APTSimulator set 参考:https://github.com/NextronSystems/APTSimulatorEndgame RTA set 参考:https://github.com/endgameinc/RTAWindows oneliners 参考:https://arno0x0x.wordpress.com/2017/11/20/windows-oneliners-to-download-remote-payload-and-execute-arbitrary-code/WinPwnage set 参考:https://github.com/rootm0s/WinPwnageAwesome gists sets如有任何问题或建议,请在 Twitter 上联系我 @n0dec。
| key | values |
|---|
enabled | 如果值设为 true,则事件将被写入;如果设为 false,则忽略该规则。 |
source | SysmonPowerShell |
category | 每个源都有一系列可指定的不同类别。 |
description | 简单的规则描述。 |
payload | 这些值将被添加到事件中。如果你未指定有效负载,事件将包含位于 conf 中的默认配置文件的值。 |