|
| 1 | +[metadata] |
| 2 | +creation_date = "2023/07/31" |
| 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/31" |
| 8 | + |
| 9 | +[rule] |
| 10 | +author = ["Elastic"] |
| 11 | +description = """ |
| 12 | +This rule monitors for the usage of the built-in Linux DebugFS utility to access a disk device without root permissions. |
| 13 | +Linux users that are part of the "disk" group have sufficient privileges to access all data inside of the machine through |
| 14 | +DebugFS. Attackers may leverage DebugFS in conjunction with "disk" permissions to read sensitive files owned by root, |
| 15 | +such as the shadow file, root ssh private keys or other sensitive files that may allow them to further escalate |
| 16 | +privileges. |
| 17 | +""" |
| 18 | +from = "now-9m" |
| 19 | +index = ["logs-endpoint.events.*", "endgame-*"] |
| 20 | +language = "eql" |
| 21 | +license = "Elastic License v2" |
| 22 | +name = "Potential Suspicious DebugFS Root Device Access" |
| 23 | +references = ["https://book.hacktricks.xyz/linux-hardening/privilege-escalation/interesting-groups-linux-pe#disk-group"] |
| 24 | +risk_score = 21 |
| 25 | +rule_id = "2605aa59-29ac-4662-afad-8d86257c7c91" |
| 26 | +severity = "low" |
| 27 | +tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Privilege Escalation", "Data Source: Elastic Endgame"] |
| 28 | +timestamp_override = "event.ingested" |
| 29 | +type = "eql" |
| 30 | +query = ''' |
| 31 | +process where host.os.type == "linux" and event.action in ("exec", "exec_event") and event.type == "start" and |
| 32 | +process.name == "debugfs" and process.args : "/dev/sd*" and not user.Ext.real.id == "0" and not group.Ext.real.id == "0" |
| 33 | +''' |
| 34 | + |
| 35 | +[[rule.threat]] |
| 36 | +framework = "MITRE ATT&CK" |
| 37 | + |
| 38 | +[[rule.threat.technique]] |
| 39 | +id = "T1078" |
| 40 | +name = "Valid Accounts" |
| 41 | +reference = "https://attack.mitre.org/techniques/T1078/" |
| 42 | + |
| 43 | +[[rule.threat.technique.subtechnique]] |
| 44 | +id = "T1078.003" |
| 45 | +name = "Local Accounts" |
| 46 | +reference = "https://attack.mitre.org/techniques/T1078/003/" |
| 47 | + |
| 48 | +[rule.threat.tactic] |
| 49 | +id = "TA0004" |
| 50 | +name = "Privilege Escalation" |
| 51 | +reference = "https://attack.mitre.org/tactics/TA0004/" |
0 commit comments