Web Server Child Shell Spawn Detected via Defend for Containers

Last updated 5 days ago on 2026-02-06
Created 5 days ago on 2026-02-06

About

This rule detects the exploitation of a web server through the execution of a suspicious process by common web server user accounts. Attackers may upload a web shell to a web server to maintain access to the system.
Tags
Data Source: Elastic Defend for ContainersDomain: ContainerOS: LinuxUse Case: Threat DetectionTactic: PersistenceTactic: ExecutionTactic: Command and ControlLanguage: eql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Persistence (TA0003)(external, opens in a new tab or window)

Execution (TA0002)(external, opens in a new tab or window)

Command and Control (TA0011)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-cloud_defend.process*
Related Integrations

cloud_defend(external, opens in a new tab or window)

Query
text code block:
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and ( process.parent.name in ( "apache", "nginx", "apache2", "httpd", "lighttpd", "caddy", "mongrel_rails", "gunicorn", "uwsgi", "openresty", "cherokee", "h2o", "resin", "puma", "unicorn", "traefik", "tornado", "hypercorn", "daphne", "twistd", "yaws", "webfsd", "httpd.worker", "flask", "rails", "mongrel", "php-cgi", "php-fcgi", "php-cgi.cagefs", "catalina.sh", "hiawatha", "lswsctrl" ) or process.parent.name like "php-fpm*" or user.name in ("apache", "www-data", "httpd", "nginx", "lighttpd", "tomcat", "tomcat8", "tomcat9") or user.id in ("33", "498", "48") or (process.parent.name == "java" and process.parent.working_directory like "/u0?/*") or process.parent.working_directory like "/var/www/*" ) and ( (process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "busybox")) or (process.args in ( "bash", "/bin/bash", "/usr/bin/bash", "/usr/local/bin/bash", "dash", "/bin/dash", "/usr/bin/dash", "/usr/local/bin/dash", "sh", "/bin/sh", "/usr/bin/sh", "/usr/local/bin/sh", "tcsh", "/bin/tcsh", "/usr/bin/tcsh", "/usr/local/bin/tcsh", "csh", "/bin/csh", "/usr/bin/csh", "/usr/local/bin/csh", "zsh", "/bin/zsh", "/usr/bin/zsh", "/usr/local/bin/zsh", "ksh", "/bin/ksh", "/usr/bin/ksh", "/usr/local/bin/ksh", "fish", "/bin/fish", "/usr/bin/fish", "/usr/local/bin/fish", "busybox", "/bin/busybox", "/usr/bin/busybox", "/usr/local/bin/busybox" )) ) and process.args == "-c" and container.id like "?*"

Install detection rules in Elastic Security

Detect Web Server Child Shell Spawn Detected via Defend for Containers in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).