[FR] Generate investigation guides (#4358)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
creation_date = "2022/05/06"
|
||||
integration = ["endpoint"]
|
||||
maturity = "production"
|
||||
updated_date = "2024/09/23"
|
||||
updated_date = "2025/01/17"
|
||||
|
||||
[rule]
|
||||
author = ["Elastic"]
|
||||
@@ -18,7 +18,7 @@ license = "Elastic License v2"
|
||||
name = "Linux Restricted Shell Breakout via Linux Binary(s)"
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating Shell Evasion via Linux Utilities
|
||||
### Investigating Linux Restricted Shell Breakout via Linux Binary(s)
|
||||
Detection alerts from this rule indicate that a Linux utility has been abused to breakout of restricted shells or
|
||||
environments by spawning an interactive system shell.
|
||||
Here are some possible avenues of investigation:
|
||||
@@ -133,6 +133,7 @@ tags = [
|
||||
"Tactic: Execution",
|
||||
"Data Source: Elastic Endgame",
|
||||
"Data Source: Elastic Defend",
|
||||
"Resources: Investigation Guide",
|
||||
]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "eql"
|
||||
@@ -142,13 +143,13 @@ process where host.os.type == "linux" and event.type == "start" and
|
||||
(
|
||||
/* launching shell from capsh */
|
||||
(process.name == "capsh" and process.args == "--") or
|
||||
|
||||
|
||||
/* launching shells from unusual parents or parent+arg combos */
|
||||
(process.name in ("bash", "dash", "ash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and (
|
||||
(process.parent.name : "*awk" and process.parent.args : "BEGIN {system(*)}") or
|
||||
(process.parent.name == "git" and process.parent.args : ("*PAGER*", "!*sh", "exec *sh") or
|
||||
(process.parent.name == "git" and process.parent.args : ("*PAGER*", "!*sh", "exec *sh") or
|
||||
process.args : ("*PAGER*", "!*sh", "exec *sh") and not process.name == "ssh" ) or
|
||||
(process.parent.name : ("byebug", "ftp", "strace", "zip", "tar") and
|
||||
(process.parent.name : ("byebug", "ftp", "strace", "zip", "tar") and
|
||||
(
|
||||
process.parent.args : "BEGIN {system(*)}" or
|
||||
(process.parent.args : ("*PAGER*", "!*sh", "exec *sh") or process.args : ("*PAGER*", "!*sh", "exec *sh")) or
|
||||
@@ -158,14 +159,14 @@ process where host.os.type == "linux" and event.type == "start" and
|
||||
)
|
||||
)
|
||||
) or
|
||||
|
||||
|
||||
/* shells specified in parent args */
|
||||
/* nice rule is broken in 8.2 */
|
||||
(process.parent.args : "*sh" and
|
||||
(
|
||||
(process.parent.name == "nice") or
|
||||
(process.parent.name == "cpulimit" and process.parent.args == "-f") or
|
||||
(process.parent.name == "find" and process.parent.args == "." and process.parent.args == "-exec" and
|
||||
(process.parent.name == "find" and process.parent.args == "." and process.parent.args == "-exec" and
|
||||
process.parent.args == ";" and process.parent.args : "/bin/*sh") or
|
||||
(process.parent.name == "flock" and process.parent.args == "-u" and process.parent.args == "/")
|
||||
)
|
||||
@@ -177,9 +178,9 @@ process where host.os.type == "linux" and event.type == "start" and
|
||||
(process.parent.name == "crash" and process.parent.args == "-h") or
|
||||
(process.name == "sensible-pager" and process.parent.name in ("apt", "apt-get") and process.parent.args == "changelog")
|
||||
/* scope to include more sensible-pager invoked shells with different parent process to reduce noise and remove false positives */
|
||||
|
||||
|
||||
)) or
|
||||
(process.name == "busybox" and event.action == "exec" and process.args_count == 2 and process.args : "*sh" and not
|
||||
(process.name == "busybox" and event.action == "exec" and process.args_count == 2 and process.args : "*sh" and not
|
||||
process.executable : "/var/lib/docker/overlay2/*/merged/bin/busybox" and not (process.parent.args == "init" and
|
||||
process.parent.args == "runc") and not process.parent.args in ("ls-remote", "push", "fetch") and not process.parent.name == "mkinitramfs") or
|
||||
(process.name == "env" and process.args_count == 2 and process.args : "*sh") or
|
||||
|
||||
Reference in New Issue
Block a user