|
| 1 | +[metadata] |
| 2 | +creation_date = "2023/07/26" |
| 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/26" |
| 8 | + |
| 9 | +[rule] |
| 10 | +author = ["Elastic"] |
| 11 | +description = """ |
| 12 | +Identifies the creation of a sudo binary located at /usr/bin/sudo. Attackers may hijack the default sudo binary and |
| 13 | +replace it with a custom binary or script that can read the user's password in clear text to escalate privileges or |
| 14 | +enable persistence onto the system every time the sudo binary is executed. |
| 15 | +""" |
| 16 | +from = "now-9m" |
| 17 | +index = ["logs-endpoint.events.*", "endgame-*"] |
| 18 | +language = "eql" |
| 19 | +license = "Elastic License v2" |
| 20 | +name = "Potential Sudo Hijacking Detected" |
| 21 | +references = ["https://eapolsniper.github.io/2020/08/17/Sudo-Hijacking/"] |
| 22 | +risk_score = 47 |
| 23 | +rule_id = "88fdcb8c-60e5-46ee-9206-2663adf1b1ce" |
| 24 | +severity = "medium" |
| 25 | +tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Privilege Escalation", "Tactic: Persistence", "Data Source: Elastic Endgame"] |
| 26 | +timestamp_override = "event.ingested" |
| 27 | +type = "eql" |
| 28 | +query = ''' |
| 29 | +file where event.type in ("creation", "file_create_event") and file.path == "/usr/bin/sudo" |
| 30 | +''' |
| 31 | + |
| 32 | +[[rule.threat]] |
| 33 | +framework = "MITRE ATT&CK" |
| 34 | + |
| 35 | +[[rule.threat.technique]] |
| 36 | +id = "T1548" |
| 37 | +name = "Abuse Elevation Control Mechanism" |
| 38 | +reference = "https://attack.mitre.org/techniques/T1548/" |
| 39 | + |
| 40 | +[[rule.threat.technique.subtechnique]] |
| 41 | +id = "T1548.003" |
| 42 | +name = "Sudo and Sudo Caching" |
| 43 | +reference = "https://attack.mitre.org/techniques/T1548/003/" |
| 44 | + |
| 45 | +[rule.threat.tactic] |
| 46 | +id = "TA0004" |
| 47 | +name = "Privilege Escalation" |
| 48 | +reference = "https://attack.mitre.org/tactics/TA0004/" |
| 49 | + |
| 50 | +[[rule.threat]] |
| 51 | +framework = "MITRE ATT&CK" |
| 52 | + |
| 53 | +[[rule.threat.technique]] |
| 54 | +id = "T1574" |
| 55 | +name = "Hijack Execution Flow" |
| 56 | +reference = "https://attack.mitre.org/techniques/T1574/" |
| 57 | + |
| 58 | +[rule.threat.tactic] |
| 59 | +id = "TA0003" |
| 60 | +name = "Persistence" |
| 61 | +reference = "https://attack.mitre.org/tactics/TA0003/" |
0 commit comments