|
| 1 | +[metadata] |
| 2 | +creation_date = "2023/07/27" |
| 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/27" |
| 8 | + |
| 9 | +[rule] |
| 10 | +author = ["Elastic"] |
| 11 | +description = """ |
| 12 | +This rule monitors for the execution of the systemd-run command by a user with a UID that is larger than the maximum |
| 13 | +allowed UID size (INT_MAX). Some older Linux versions were affected by a bug which allows user accounts with a UID |
| 14 | +greater than INT_MAX to escalate privileges by spawning a shell through systemd-run. |
| 15 | +""" |
| 16 | +from = "now-9m" |
| 17 | +index = ["logs-endpoint.events.*"] |
| 18 | +language = "eql" |
| 19 | +license = "Elastic License v2" |
| 20 | +name = "Potential Privilege Escalation via UID INT_MAX Bug Detected" |
| 21 | +references = [ |
| 22 | + "https://twitter.com/paragonsec/status/1071152249529884674", |
| 23 | + "https://github.com/mirchr/security-research/blob/master/vulnerabilities/CVE-2018-19788.sh", |
| 24 | + "https://gitlab.freedesktop.org/polkit/polkit/-/issues/74"] |
| 25 | +risk_score = 47 |
| 26 | +rule_id = "d55436a8-719c-445f-92c4-c113ff2f9ba5" |
| 27 | +severity = "medium" |
| 28 | +tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Privilege Escalation"] |
| 29 | +timestamp_override = "event.ingested" |
| 30 | +type = "eql" |
| 31 | +query = ''' |
| 32 | +process where host.os.type == "linux" and event.action == "exec" and event.type == "start" and |
| 33 | +process.name == "systemd-run" and process.args == "-t" and process.args_count >= 3 and user.id >= "1000000000" |
| 34 | +''' |
| 35 | + |
| 36 | +[[rule.threat]] |
| 37 | +framework = "MITRE ATT&CK" |
| 38 | + |
| 39 | +[[rule.threat.technique]] |
| 40 | +id = "T1068" |
| 41 | +name = "Exploitation for Privilege Escalation" |
| 42 | +reference = "https://attack.mitre.org/techniques/T1068/" |
| 43 | + |
| 44 | +[rule.threat.tactic] |
| 45 | +id = "TA0004" |
| 46 | +name = "Privilege Escalation" |
| 47 | +reference = "https://attack.mitre.org/tactics/TA0004/" |
0 commit comments