diff --git a/rules/integrations/cloud_defend/privilege_escalation_potential_container_escape_via_modified_release_agent_file.toml b/rules/integrations/cloud_defend/privilege_escalation_potential_container_escape_via_modified_release_agent_file.toml new file mode 100644 index 000000000..5b9bb8a9d --- /dev/null +++ b/rules/integrations/cloud_defend/privilege_escalation_potential_container_escape_via_modified_release_agent_file.toml @@ -0,0 +1,59 @@ +[metadata] +creation_date = "2023/10/26" +integration = ["cloud_defend"] +maturity = "production" +min_stack_comments = "New Integration: Cloud Defend" +min_stack_version = "8.8.0" +updated_date = "2023/12/14" + +[rule] +author = ["Elastic"] +description = """ +This rule detects modification of the CGroup release_agent file from inside a privileged container. The release_agent is +a script that is executed at the termination of any process on that CGroup and is invoked from the host. A privileged +container with SYS_ADMIN capabilities, enables a threat actor to mount a CGroup directory and modify the release_agent +which could be used for further privilege escalation and container escapes to the host machine. +""" +from = "now-6m" +index = ["logs-cloud_defend*"] +interval = "5m" +language = "eql" +license = "Elastic License v2" +name = "Potential Container Escape via Modified release_agent File" +references = [ + "https://blog.aquasec.com/threat-alert-container-escape", + "https://sysdig.com/blog/detecting-mitigating-cve-2022-0492-sysdig/", + "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation#privileged-escape-abusing-existent-release_agent-cve-2022-0492-poc1", +] +risk_score = 47 +rule_id = "160896de-b66f-42cb-8fef-20f53a9006ea" +severity = "medium" +tags = [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", +] +timestamp_override = "event.ingested" +type = "eql" + +query = ''' +file where event.module == "cloud_defend" and event.action == "open" and +event.type == "change" and file.name : "release_agent" +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1611" +name = "Escape to Host" +reference = "https://attack.mitre.org/techniques/T1611/" + + +[rule.threat.tactic] +id = "TA0004" +name = "Privilege Escalation" +reference = "https://attack.mitre.org/tactics/TA0004/" +