|
| 1 | +[metadata] |
| 2 | +creation_date = "2023/07/28" |
| 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/28" |
| 8 | + |
| 9 | +[rule] |
| 10 | +author = ["Elastic"] |
| 11 | +description = """ |
| 12 | +This rule monitors for the execution of a set of linux binaries, that are potentially vulnerable to wildcard injection, |
| 13 | +with suspicious command line flags followed by a shell spawn event. Linux wildcard injection is a type of security |
| 14 | +vulnerability where attackers manipulate commands or input containing wildcards (e.g., *, ?, []) to execute unintended |
| 15 | +operations or access sensitive data by tricking the system into interpreting the wildcard characters in unexpected ways. |
| 16 | +""" |
| 17 | +from = "now-9m" |
| 18 | +index = ["logs-endpoint.events.*"] |
| 19 | +language = "eql" |
| 20 | +license = "Elastic License v2" |
| 21 | +name = "Potential Shell via Wildcard Injection Detected" |
| 22 | +references = ["https://www.exploit-db.com/papers/33930"] |
| 23 | +risk_score = 47 |
| 24 | +rule_id = "0b803267-74c5-444d-ae29-32b5db2d562a" |
| 25 | +severity = "medium" |
| 26 | +tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Privilege Escalation", "Tactic: Execution"] |
| 27 | +type = "eql" |
| 28 | +query = ''' |
| 29 | +sequence by host.id with maxspan=1s |
| 30 | + [process where host.os.type == "linux" and event.action == "exec" and event.type == "start" and ( |
| 31 | + (process.name == "tar" and process.args : "--checkpoint=*" and process.args : "--checkpoint-action=*") or |
| 32 | + (process.name == "rsync" and process.args : "-e*") or |
| 33 | + (process.name == "zip" and process.args == "--unzip-command") )] by process.entity_id |
| 34 | + [process where host.os.type == "linux" and event.action == "exec" and event.type == "start" and |
| 35 | + process.parent.name : ("tar", "rsync", "zip") and |
| 36 | + process.name : ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")] by process.parent.entity_id |
| 37 | +''' |
| 38 | + |
| 39 | +[[rule.threat]] |
| 40 | +framework = "MITRE ATT&CK" |
| 41 | + |
| 42 | +[[rule.threat.technique]] |
| 43 | +id = "T1068" |
| 44 | +name = "Exploitation for Privilege Escalation" |
| 45 | +reference = "https://attack.mitre.org/techniques/T1068/" |
| 46 | + |
| 47 | +[rule.threat.tactic] |
| 48 | +id = "TA0004" |
| 49 | +name = "Privilege Escalation" |
| 50 | +reference = "https://attack.mitre.org/tactics/TA0004/" |
| 51 | + |
| 52 | +[[rule.threat]] |
| 53 | +framework = "MITRE ATT&CK" |
| 54 | + |
| 55 | +[[rule.threat.technique]] |
| 56 | +id = "T1059" |
| 57 | +name = "Command and Scripting Interpreter" |
| 58 | +reference = "https://attack.mitre.org/techniques/T1059/" |
| 59 | + |
| 60 | +[rule.threat.tactic] |
| 61 | +id = "TA0002" |
| 62 | +name = "Execution" |
| 63 | +reference = "https://attack.mitre.org/tactics/TA0002/" |
0 commit comments