|
2 | 2 | creation_date = "2024/04/01" |
3 | 3 | integration = ["endpoint"] |
4 | 4 | maturity = "production" |
5 | | -updated_date = "2025/02/04" |
| 5 | +updated_date = "2025/11/14" |
6 | 6 |
|
7 | 7 | [rule] |
8 | 8 | author = ["Elastic"] |
@@ -35,19 +35,16 @@ tags = [ |
35 | 35 | ] |
36 | 36 | timestamp_override = "event.ingested" |
37 | 37 | type = "eql" |
38 | | - |
39 | 38 | query = ''' |
40 | | -sequence by host.id, user.id with maxspan=1s |
41 | | - [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and process.name == "sshd" and |
42 | | - process.args == "-D" and process.args == "-R"] by process.pid, process.entity_id |
43 | | - [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and process.parent.name == "sshd" and |
44 | | - process.executable != null and not ( |
45 | | - process.executable in ("/usr/sbin/sshd", "/usr/sbin/unix_chkpwd", "/usr/bin/google_authorized_keys", "/usr/bin/fipscheck") or |
46 | | - process.args like ("rsync*", "systemctl*", "/usr/sbin/unix_chkpwd", "/usr/bin/google_authorized_keys", "/usr/sbin/aad_certhandler*") or |
47 | | - process.command_line like "sh -c /usr/bin/env -i PATH=*" |
48 | | - )] by process.parent.pid, process.parent.entity_id |
49 | | - [process where host.os.type == "linux" and event.action == "end" and process.name == "sshd" and process.exit_code != 0] by process.pid, process.entity_id |
50 | | - [network where host.os.type == "linux" and event.type == "end" and event.action == "disconnect_received" and process.name == "sshd"] by process.pid, process.entity_id |
| 39 | +sequence by host.id with maxspan=1m |
| 40 | + [process where host.os.type == "linux" and event.action == "end" and process.name == "sshd" and process.exit_code != 0] by process.entity_id |
| 41 | + [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and |
| 42 | + process.parent.name == "sshd" and process.parent.args == "-D" and process.parent.args == "-R" and |
| 43 | + process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and |
| 44 | + not ( |
| 45 | + process.args like ("rsync*", "systemctl*", "/usr/sbin/unix_chkpwd", "/usr/bin/google_authorized_keys", "/usr/sbin/aad_certhandler*") or |
| 46 | + process.command_line like ("sh -c /usr/bin/env -i PATH=*", "sh -c -- /usr/bin/env -i PATH=*") |
| 47 | + )] by process.parent.entity_id |
51 | 48 | ''' |
52 | 49 | note = """## Triage and analysis |
53 | 50 |
|
|
0 commit comments