Skip to content

Commit 7cc841c

Browse files
Aegrahbrokensound77DefSecSentinel
authored
[New Rule] PE via UID INT_MAX Bug (#2971)
* [New Rule] PE via UID INT_MAX Bug * changed file name * Should be more decisive * fix * Update rules/linux/privilege_escalation_linux_uid_int_max_bug.toml Co-authored-by: Justin Ibarra <[email protected]> * Update rules/linux/privilege_escalation_linux_uid_int_max_bug.toml Co-authored-by: Justin Ibarra <[email protected]> * Update rules/linux/privilege_escalation_linux_uid_int_max_bug.toml Co-authored-by: Justin Ibarra <[email protected]> --------- Co-authored-by: Justin Ibarra <[email protected]> Co-authored-by: Colson Wilhoit <[email protected]>
1 parent ef1fa94 commit 7cc841c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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

Comments
 (0)