From 14ef24e9ddfe86bc2080847bf5a5a712e9863033 Mon Sep 17 00:00:00 2001 From: Samirbous <64742097+Samirbous@users.noreply.github.com> Date: Mon, 30 Nov 2020 21:02:57 +0100 Subject: [PATCH] [New Rule] Command shell activity started via rundll32 (#391) * [New Rule] Command shell activity started via rundll32 * added tag * adjusted parent args for performance avoid leading wildcard * filtered a common FP * Update execution_command_shell_via_rundll32.toml * Update rules/windows/execution_command_shell_via_rundll32.toml Co-authored-by: David French <56409778+threat-punter@users.noreply.github.com> * Update rules/windows/execution_command_shell_via_rundll32.toml Co-authored-by: David French <56409778+threat-punter@users.noreply.github.com> * Update rules/windows/execution_command_shell_via_rundll32.toml Co-authored-by: David French <56409778+threat-punter@users.noreply.github.com> * Update rules/windows/execution_command_shell_via_rundll32.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> * Update rules/windows/execution_command_shell_via_rundll32.toml Co-authored-by: Justin Ibarra Co-authored-by: David French <56409778+threat-punter@users.noreply.github.com> Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com> Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> Co-authored-by: Justin Ibarra --- .../execution_command_shell_via_rundll32.toml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 rules/windows/execution_command_shell_via_rundll32.toml diff --git a/rules/windows/execution_command_shell_via_rundll32.toml b/rules/windows/execution_command_shell_via_rundll32.toml new file mode 100644 index 000000000..2e246c214 --- /dev/null +++ b/rules/windows/execution_command_shell_via_rundll32.toml @@ -0,0 +1,53 @@ +[metadata] +creation_date = "2020/10/19" +ecs_version = ["1.6.0"] +maturity = "production" +updated_date = "2020/10/19" + +[rule] +author = ["Elastic"] +description = "Identifies command shell activity started via RunDLL32, which is commonly abused by attackers to host malicious code." +from = "now-9m" +index = ["winlogbeat-*", "logs-endpoint.events.*"] +language = "eql" +license = "Elastic License" +name = "Command Shell Activity Started via RunDLL32" +risk_score = 21 +rule_id = "9ccf3ce0-0057-440a-91f5-870c6ad39093" +severity = "low" +tags = ["Elastic", "Host", "Windows", "Threat Detection", "Execution"] +type = "eql" + +query = ''' +process where event.type in ("start", "process_started") and + process.name : ("cmd.exe", "powershell.exe") and + process.parent.name : "rundll32.exe" and + /* common FPs can be added here */ + not process.parent.args : "C:\\Windows\\System32\\SHELL32.dll,RunAsNewUser_RunDLL" +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1059" +name = "Command and Scripting Interpreter" +reference = "https://attack.mitre.org/techniques/T1059/" + + +[rule.threat.tactic] +id = "TA0002" +name = "Execution" +reference = "https://attack.mitre.org/tactics/TA0002/" +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1086" +name = "PowerShell" +reference = "https://attack.mitre.org/techniques/T1086/" + + +[rule.threat.tactic] +id = "TA0002" +name = "Execution" +reference = "https://attack.mitre.org/tactics/TA0002/"