|
| 1 | +[metadata] |
| 2 | +creation_date = "2023/07/24" |
| 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/24" |
| 8 | + |
| 9 | +[rule] |
| 10 | +author = ["Elastic"] |
| 11 | +description = """ |
| 12 | +This rule monitors for the usage of the "find" command in conjunction with SUID and SGUID permission arguments. SUID |
| 13 | +(Set User ID) and SGID (Set Group ID) are special permissions in Linux that allow a program to execute with the |
| 14 | +privileges of the file owner or group, respectively, rather than the privileges of the user running the program. In |
| 15 | +case an attacker is able to enumerate and find a binary that is misconfigured, they might be able to leverage this |
| 16 | +misconfiguration to escalate privileges by exploiting vulnerabilities or built-in features in the privileged program. |
| 17 | +""" |
| 18 | +from = "now-9m" |
| 19 | +index = ["logs-endpoint.events.*"] |
| 20 | +language = "eql" |
| 21 | +license = "Elastic License v2" |
| 22 | +name = "SUID/SGUID Enumeration Detected" |
| 23 | +risk_score = 21 |
| 24 | +rule_id = "5b06a27f-ad72-4499-91db-0c69667bffa5" |
| 25 | +severity = "low" |
| 26 | +tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Discovery", "Tactic: Privilege Escalation"] |
| 27 | +timestamp_override = "event.ingested" |
| 28 | +type = "eql" |
| 29 | +query = ''' |
| 30 | +process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and |
| 31 | +process.name == "find" and process.args : "-perm" and process.args : ( |
| 32 | + "/6000", "-6000", "/4000", "-4000", "/2000", "-2000", "/u=s", "-u=s", "/g=s", "-g=s", "/u=s,g=s", "/g=s,u=s" |
| 33 | +) and |
| 34 | +not user.Ext.real.id == "0" and not group.Ext.real.id == "0" |
| 35 | +''' |
| 36 | + |
| 37 | +[[rule.threat]] |
| 38 | +framework = "MITRE ATT&CK" |
| 39 | + |
| 40 | +[[rule.threat.technique]] |
| 41 | +id = "T1083" |
| 42 | +name = "File and Directory Discovery" |
| 43 | +reference = "https://attack.mitre.org/techniques/T1083/" |
| 44 | + |
| 45 | +[rule.threat.tactic] |
| 46 | +id = "TA0007" |
| 47 | +name = "Discovery" |
| 48 | +reference = "https://attack.mitre.org/tactics/TA0007/" |
| 49 | + |
| 50 | +[[rule.threat]] |
| 51 | +framework = "MITRE ATT&CK" |
| 52 | + |
| 53 | +[[rule.threat.technique]] |
| 54 | +id = "T1548" |
| 55 | +name = "Abuse Elevation Control Mechanism" |
| 56 | +reference = "https://attack.mitre.org/techniques/T1548/" |
| 57 | + |
| 58 | +[[rule.threat.technique.subtechnique]] |
| 59 | +id = "T1548.001" |
| 60 | +name = "Setuid and Setgid" |
| 61 | +reference = "https://attack.mitre.org/techniques/T1548/001/" |
| 62 | + |
| 63 | +[rule.threat.tactic] |
| 64 | +id = "TA0004" |
| 65 | +name = "Privilege Escalation" |
| 66 | +reference = "https://attack.mitre.org/tactics/TA0004/" |
| 67 | + |
| 68 | +[[rule.threat]] |
| 69 | +framework = "MITRE ATT&CK" |
| 70 | + |
| 71 | +[rule.threat.tactic] |
| 72 | +id = "TA0003" |
| 73 | +name = "Persistence" |
| 74 | +reference = "https://attack.mitre.org/tactics/TA0003/" |
0 commit comments