Potential Privilege Escalation via OverlayFS

Identifies an attempt to exploit a local privilege escalation (CVE-2023-2640 and CVE-2023-32629) via a flaw in Ubuntu's modifications to OverlayFS. These flaws allow the creation of specialized executables, which, upon execution, grant the ability to escalate privileges to root on the affected machine.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/07/28"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/07/28"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies an attempt to exploit a local privilege escalation (CVE-2023-2640 and CVE-2023-32629) via a flaw in Ubuntu's
13modifications to OverlayFS. These flaws allow the creation of specialized executables, which, upon execution, grant the
14ability to escalate privileges to root on the affected machine. 
15"""
16from = "now-9m"
17index = ["logs-endpoint.events.*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Potential Privilege Escalation via OverlayFS"
21references = [
22    "https://www.wiz.io/blog/ubuntu-overlayfs-vulnerability",
23    "https://twitter.com/liadeliyahu/status/1684841527959273472"]
24risk_score = 73
25rule_id = "b51dbc92-84e2-4af1-ba47-65183fcd0c57"
26severity = "high"
27tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Privilege Escalation", "Use Case: Vulnerability", "Data Source: Elastic Defend"]
28type = "eql"
29query = '''
30sequence by process.parent.entity_id, host.id with maxspan=5s
31  [process where host.os.type == "linux" and event.action == "exec" and event.type == "start" and 
32    process.name == "unshare" and process.args : ("-r", "-rm", "m") and process.args : "*cap_setuid*"  and user.id != "0"]
33  [process where host.os.type == "linux" and event.action == "uid_change" and event.type == "change" and 
34    user.id == "0"]
35'''
36
37[[rule.threat]]
38framework = "MITRE ATT&CK"
39
40[[rule.threat.technique]]
41id = "T1068"
42name = "Exploitation for Privilege Escalation"
43reference = "https://attack.mitre.org/techniques/T1068/"
44
45[rule.threat.tactic]
46id = "TA0004"
47name = "Privilege Escalation"
48reference = "https://attack.mitre.org/tactics/TA0004/"

References

Related rules

to-top