From ad514eaeabe2bec3ec95a64cea72d2ac2021bceb Mon Sep 17 00:00:00 2001 From: Samirbous <64742097+Samirbous@users.noreply.github.com> Date: Fri, 29 Jan 2021 19:03:17 +0100 Subject: [PATCH] [New Rule] Attempt to Add an Account to the Admin Group (#803) * [New Rule] Attempt to Add an Account to the Admin Group * adjusted query for perf * Update rules/macos/privilege_escalation_local_user_added_to_admin.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> * Update rules/macos/privilege_escalation_local_user_added_to_admin.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> * Update rules/macos/privilege_escalation_local_user_added_to_admin.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> --- ..._escalation_local_user_added_to_admin.toml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 rules/macos/privilege_escalation_local_user_added_to_admin.toml diff --git a/rules/macos/privilege_escalation_local_user_added_to_admin.toml b/rules/macos/privilege_escalation_local_user_added_to_admin.toml new file mode 100644 index 000000000..f05951ebc --- /dev/null +++ b/rules/macos/privilege_escalation_local_user_added_to_admin.toml @@ -0,0 +1,46 @@ +[metadata] +creation_date = "2020/01/05" +maturity = "production" +updated_date = "2020/01/05" + +[rule] +author = ["Elastic"] +description = """ +Identifies attempts to add an account to the admin group via the command line. This could be an indication of privilege +escalation activity. +""" +from = "now-9m" +index = ["auditbeat-*", "logs-endpoint.events.*"] +language = "kuery" +license = "Elastic License" +name = "Potential Admin Group Account Addition" +references = ["https://managingosx.wordpress.com/2010/01/14/add-a-user-to-the-admin-group-via-command-line-3-0/"] +risk_score = 47 +rule_id = "565c2b44-7a21-4818-955f-8d4737967d2e" +severity = "medium" +tags = ["Elastic", "Host", "macOS", "Threat Detection", "Privilege Escalation"] +type = "query" + +query = ''' +event.category:process and event.type:(start or process_started) and + process.name:(dscl or dseditgroup) and process.args:(("/Groups/admin" or admin) and ("-a" or "-append")) +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1078" +name = "Valid Accounts" +reference = "https://attack.mitre.org/techniques/T1078/" +[[rule.threat.technique.subtechnique]] +id = "T1078.003" +name = "Local Accounts" +reference = "https://attack.mitre.org/techniques/T1078/003/" + + + +[rule.threat.tactic] +id = "TA0004" +name = "Privilege Escalation" +reference = "https://attack.mitre.org/tactics/TA0004/"