Skip to content

Commit ee774b3

Browse files
Aegrahgithub-actions[bot]
authored andcommitted
[New Rule] Sudo Command Enumeration Detected (#2946)
* [New Rule] Sudo Command Enumeration Detected * Update discovery_sudo_allowed_command_enumeration.toml * revert endgame support due to unit testing fail * Update discovery_sudo_allowed_command_enumeration.toml * Update discovery_sudo_allowed_command_enumeration.toml * Update rules/linux/discovery_sudo_allowed_command_enumeration.toml Co-authored-by: Justin Ibarra <[email protected]> * Update rules/linux/discovery_sudo_allowed_command_enumeration.toml Co-authored-by: Justin Ibarra <[email protected]> --------- Co-authored-by: Justin Ibarra <[email protected]> (cherry picked from commit 18c2214)
1 parent 31bf0b4 commit ee774b3

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[metadata]
2+
creation_date = "2023/07/20"
3+
integration = ["endpoint"]
4+
maturity = "production"
5+
min_stack_comments = "New fields added: required_fields, related_integrations, setup"
6+
min_stack_version = "8.3.0"
7+
updated_date = "2023/07/24"
8+
9+
[rule]
10+
author = ["Elastic"]
11+
description = """
12+
This rule monitors for the usage of the sudo -l command, which is used to list the allowed and forbidden commands for
13+
the invoking user. Attackers may execute this command to enumerate commands allowed to be executed with sudo permissions,
14+
potentially allowing to escalate privileges to root.
15+
"""
16+
from = "now-9m"
17+
index = ["logs-endpoint.events.*"]
18+
language = "eql"
19+
license = "Elastic License v2"
20+
name = "Sudo Command Enumeration Detected"
21+
risk_score = 21
22+
rule_id = "28d39238-0c01-420a-b77a-24e5a7378663"
23+
severity = "low"
24+
tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Discovery"]
25+
timestamp_override = "event.ingested"
26+
type = "eql"
27+
query = '''
28+
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
29+
process.name == "sudo" and process.args == "-l" and
30+
process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
31+
not group.Ext.real.id : "0" and not user.Ext.real.id : "0"
32+
'''
33+
34+
[[rule.threat]]
35+
framework = "MITRE ATT&CK"
36+
37+
[[rule.threat.technique]]
38+
id = "T1033"
39+
name = "System Owner/User Discovery"
40+
reference = "https://attack.mitre.org/techniques/T1033/"
41+
42+
[rule.threat.tactic]
43+
id = "TA0007"
44+
name = "Discovery"
45+
reference = "https://attack.mitre.org/tactics/TA0007/"

0 commit comments

Comments
 (0)