From 326bebdebe84aa347f18457210d1e28d6212abd2 Mon Sep 17 00:00:00 2001 From: Samirbous <64742097+Samirbous@users.noreply.github.com> Date: Fri, 29 Jan 2021 19:06:49 +0100 Subject: [PATCH] [New Rule] Execution via Electron Child Process Node.js Module (#817) * [New Rule] Execution via Electron ChildProc Node.js Module * relinted * fixed TID and adjusted KQL for perf * fixed kql * Update rules/macos/execution_defense_evasion_electron_app_childproc_node_js.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> * Update rules/macos/execution_defense_evasion_electron_app_childproc_node_js.toml Co-authored-by: David French <56409778+threat-punter@users.noreply.github.com> Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> Co-authored-by: David French <56409778+threat-punter@users.noreply.github.com> --- ...vasion_electron_app_childproc_node_js.toml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 rules/macos/execution_defense_evasion_electron_app_childproc_node_js.toml diff --git a/rules/macos/execution_defense_evasion_electron_app_childproc_node_js.toml b/rules/macos/execution_defense_evasion_electron_app_childproc_node_js.toml new file mode 100644 index 000000000..f297aa6af --- /dev/null +++ b/rules/macos/execution_defense_evasion_electron_app_childproc_node_js.toml @@ -0,0 +1,56 @@ +[metadata] +creation_date = "2020/01/07" +maturity = "production" +updated_date = "2020/01/07" + +[rule] +author = ["Elastic"] +description = """ +Identifies attempts to execute a child process from within the context of an Electron application using the +child_process Node.js module. Adversaries may abuse this technique to inherit permissions from parent processes. +""" +from = "now-9m" +index = ["auditbeat-*", "logs-endpoint.events.*"] +language = "kuery" +license = "Elastic License" +name = "Execution via Electron Child Process Node.js Module" +references = [ + "https://www.matthewslipper.com/2019/09/22/everything-you-wanted-electron-child-process.html", + "https://www.trustedsec.com/blog/macos-injection-via-third-party-frameworks/", + "https://nodejs.org/api/child_process.html", +] +risk_score = 47 +rule_id = "35330ba2-c859-4c98-8b7f-c19159ea0e58" +severity = "medium" +tags = ["Elastic", "Host", "macOS", "Threat Detection", "Defense Evasion", "Execution"] +type = "query" + +query = ''' +event.category:process and event.type:(start or process_started) and process.args:("-e" and const*require*child_process*) +''' + + +[[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 = "T1548" +name = "Abuse Elevation Control Mechanism" +reference = "https://attack.mitre.org/techniques/T1548/" + + +[rule.threat.tactic] +id = "TA0005" +name = "Defense Evasion" +reference = "https://attack.mitre.org/tactics/TA0005/"