|
| 1 | +[metadata] |
| 2 | +creation_date = "2024/11/04" |
| 3 | +integration = ["endpoint"] |
| 4 | +maturity = "production" |
| 5 | +updated_date = "2024/11/04" |
| 6 | + |
| 7 | +[rule] |
| 8 | +author = ["Elastic"] |
| 9 | +description = """ |
| 10 | +This rule monitors for the execution of commands that enable IPv4 and IPv6 forwarding on Linux systems. Enabling IP |
| 11 | +forwarding can be used to route network traffic between different network interfaces, potentially allowing attackers to |
| 12 | +pivot between networks, exfiltrate data, or establish command and control channels. |
| 13 | +""" |
| 14 | +from = "now-9m" |
| 15 | +index = ["logs-endpoint.events.*"] |
| 16 | +language = "eql" |
| 17 | +license = "Elastic License v2" |
| 18 | +name = "IPv4/IPv6 Forwarding Activity" |
| 19 | +risk_score = 21 |
| 20 | +rule_id = "5a138e2e-aec3-4240-9843-56825d0bc569" |
| 21 | +severity = "low" |
| 22 | +tags = [ |
| 23 | + "Domain: Endpoint", |
| 24 | + "OS: Linux", |
| 25 | + "Use Case: Threat Detection", |
| 26 | + "Tactic: Command and Control", |
| 27 | + "Data Source: Elastic Defend", |
| 28 | +] |
| 29 | +timestamp_override = "event.ingested" |
| 30 | +type = "eql" |
| 31 | +query = ''' |
| 32 | +process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and |
| 33 | +process.parent.executable != null and process.command_line like ( |
| 34 | + "*net.ipv4.ip_forward*", "*/proc/sys/net/ipv4/ip_forward*", "*net.ipv6.conf.all.forwarding*", |
| 35 | + "*/proc/sys/net/ipv6/conf/all/forwarding*" |
| 36 | +) and ( |
| 37 | + (process.name == "sysctl" and process.args like ("*-w*", "*--write*", "*=*")) or |
| 38 | + ( |
| 39 | + process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and |
| 40 | + process.command_line like "*echo *" |
| 41 | + ) |
| 42 | +) |
| 43 | +''' |
| 44 | + |
| 45 | +[[rule.threat]] |
| 46 | +framework = "MITRE ATT&CK" |
| 47 | + |
| 48 | +[[rule.threat.technique]] |
| 49 | +id = "T1572" |
| 50 | +name = "Protocol Tunneling" |
| 51 | +reference = "https://attack.mitre.org/techniques/T1572/" |
| 52 | + |
| 53 | +[rule.threat.tactic] |
| 54 | +id = "TA0011" |
| 55 | +name = "Command and Control" |
| 56 | +reference = "https://attack.mitre.org/tactics/TA0011/" |
0 commit comments