|
2 | 2 | creation_date = "2025/12/04" |
3 | 3 | integration = ["endpoint", "windows", "auditd_manager", "sentinel_one_cloud_funnel"] |
4 | 4 | maturity = "production" |
5 | | -updated_date = "2025/12/04" |
| 5 | +updated_date = "2025/12/05" |
6 | 6 |
|
7 | 7 | [rule] |
8 | 8 | author = ["Elastic"] |
@@ -77,14 +77,43 @@ tags = [ |
77 | 77 | timestamp_override = "event.ingested" |
78 | 78 | type = "eql" |
79 | 79 | query = ''' |
80 | | -process where event.type == "start" and event.action in ("exec", "executed", "process_started", "start", "ProcessRollup2") and |
81 | | -process.name in ("sh", "bash", "zsh", "curl", "wget", "id", "whoami", "uname", "cmd.exe", "cat", "powershell.exe") and |
82 | | -( |
83 | | - ?process.working_directory : ("*react-dom*", "*.next*", "*node_modules/next*", "*react-server*", "*bin/next*", "*--experimental-https*", "*app/server*", "*.pnpm/next*", "*/app/*", "*next/dist/server*", "*react-scripts*") or |
84 | | - |
85 | | - (process.parent.name in ("node", "bun", "node.exe", "bun.exe") and |
86 | | - process.parent.command_line : ("*react-dom*", "*.next*", "*node_modules/next*", "*react-server*", "*bin/next*", "*--experimental-https*", "*app/server*", "*.pnpm/next*", "*next start*", "*next dev*", "*react-scripts start*", "*next/dist/server*")) |
87 | | - ) |
| 80 | +process where event.type == "start" and event.action != "fork" and ( |
| 81 | + process.name in ( |
| 82 | + "sh", "bash", "zsh", "curl", "wget", "id", "whoami", "uname", "cmd.exe", "cat", "powershell.exe", "java", "rundll32.exe", "wget.exe", "certutil.exe", |
| 83 | + "nc", "ncat", "netcat", "nc.openbsd", "nc.traditional", "socat", "busybox", "mkfifo", "nohup", "setsid", "xterm" |
| 84 | + ) or |
| 85 | + (process.name : "python*" and process.args : "-c" and process.args : ( |
| 86 | + "*import*pty*spawn*", "*import*subprocess*call*" |
| 87 | + )) or |
| 88 | + (process.name : "perl*" and process.args : "-e" and process.args : "*socket*" and process.args : ( |
| 89 | + "*exec*", "*system*" |
| 90 | + )) or |
| 91 | + (process.name : "ruby*" and process.args : ("-e", "-rsocket") and process.args : ( |
| 92 | + "*TCPSocket.new*", "*TCPSocket.open*" |
| 93 | + )) or |
| 94 | + (process.name : "lua*" and process.args : "-e" and process.args : "*socket.tcp*" and process.args : ( |
| 95 | + "*io.popen*", "*os.execute*" |
| 96 | + )) or |
| 97 | + (process.name : "php*" and process.args : "-r" and process.args : "*fsockopen*" and process.args : "*/bin/*sh*") or |
| 98 | + (process.name == "node" and process.args == "-e" and process.args : "*spawn*sh*" and process.args : "*connect*") or |
| 99 | + (process.name : ("awk", "gawk", "mawk", "nawk") and process.args : "*/inet/tcp/*") or |
| 100 | + (process.name in ("rvim", "vim", "vimdiff", "rview", "view") and process.args == "-c" and process.args : "*socket*") |
| 101 | +) |
| 102 | +and ( |
| 103 | + ?process.working_directory : ( |
| 104 | + "*react-dom*", "*.next*", "*node_modules/next*", "*react-server*", "*bin/next*", "*--experimental-https*", "*app/server*", |
| 105 | + "*.pnpm/next*", "*/app/*", "*next/dist/server*", "*react-scripts*") or |
| 106 | + ( |
| 107 | + process.parent.name in ("node", "bun", "node.exe", "bun.exe") and |
| 108 | + process.parent.command_line : ( |
| 109 | + "*react-dom*", "*.next*", "*node_modules/next*", "*react-server*", "*next-server*", "*server.js*", "*bin/next*", |
| 110 | + "*--experimental-https*", "*app/server*", "*.pnpm/next*", "*next start*", "*next dev*", "*react-scripts start*", "*next/dist/server*" |
| 111 | + ) |
| 112 | + ) |
| 113 | +) and not ( |
| 114 | + ?process.parent.executable in ("./runc", "/opt/google/chrome/chrome") or |
| 115 | + process.command_line like "/bin/sh -c git config*" |
| 116 | +) |
88 | 117 | ''' |
89 | 118 |
|
90 | 119 | [[rule.threat]] |
|
0 commit comments