Linux web server spawning a shell or network download utility
Detects the post-exploitation step of AN0220 on Linux: a web server or an application server that answers requests from the Internet executing a shell, a download utility or a scripting interpreter. A daemon that serves HTTP has no ordinary reason to launch `sh` or `curl`, so this is the strongest single event in MITRE's chain; the request pattern, the 5xx or WAF burst and the outbound callback that bracket it are rate and correlation conditions Sigma cannot state, and no web access log is offered under this analytic in any case, so what is authored here is one link and not the chain. Two shaping notes. The parent match is split because php-fpm installs its binary with the version appended — `/usr/sbin/php-fpm8.2` — so an `endswith` term for it would never fire; that arm uses `contains` instead. And gunicorn and comparable Python-hosted servers are deliberately absent from MITRE's WebProcList as populated here: on an execve record the executable is the interpreter, so such a parent is reported as `/usr/bin/python3` and a name-based term for it is a selector that can never match. The same feed limits the rule elsewhere — the brief's source is auditd SYSCALL execve, which carries the parent as a pid only, so this rule needs a pipeline that resolves the parent's path into ParentImage before it can return anything at all. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0080, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
Sentinel · KQL
Run this as a search.
DeviceProcessEvents| where (((InitiatingProcessFolderPath endswith "/apache2" or InitiatingProcessFolderPath endswith "/httpd" or InitiatingProcessFolderPath endswith "/nginx" or InitiatingProcessFolderPath endswith "/lighttpd" or InitiatingProcessFolderPath endswith "/caddy" or InitiatingProcessFolderPath endswith "/node" or InitiatingProcessFolderPath endswith "/uwsgi") or InitiatingProcessFolderPath contains "/php-fpm") and (FolderPath endswith "/sh" or FolderPath endswith "/bash" or FolderPath endswith "/dash" or FolderPath endswith "/zsh" or FolderPath endswith "/ksh" or FolderPath endswith "/curl" or FolderPath endswith "/wget" or FolderPath endswith "/nc" or FolderPath endswith "/ncat" or FolderPath endswith "/netcat" or FolderPath endswith "/socat" or FolderPath endswith "/perl" or FolderPath endswith "/ruby" or FolderPath endswith "/python" or FolderPath endswith "/python3"))
Splunk · SPL
Run this as a search.
index=* (((ParentImage="*/apache2" OR ParentImage="*/httpd" OR ParentImage="*/nginx" OR ParentImage="*/lighttpd" OR ParentImage="*/caddy" OR ParentImage="*/node" OR ParentImage="*/uwsgi") OR ParentImage="*/php-fpm*") AND (Image="*/sh" OR Image="*/bash" OR Image="*/dash" OR Image="*/zsh" OR Image="*/ksh" OR Image="*/curl" OR Image="*/wget" OR Image="*/nc" OR Image="*/ncat" OR Image="*/netcat" OR Image="*/socat" OR Image="*/perl" OR Image="*/ruby" OR Image="*/python" OR Image="*/python3"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE (((TO_LOWER(process.parent.executable) LIKE "*/apache2" OR TO_LOWER(process.parent.executable) LIKE "*/httpd" OR TO_LOWER(process.parent.executable) LIKE "*/nginx" OR TO_LOWER(process.parent.executable) LIKE "*/lighttpd" OR TO_LOWER(process.parent.executable) LIKE "*/caddy" OR TO_LOWER(process.parent.executable) LIKE "*/node" OR TO_LOWER(process.parent.executable) LIKE "*/uwsgi") OR TO_LOWER(process.parent.executable) LIKE "*/php-fpm*") AND (TO_LOWER(process.executable) LIKE "*/sh" OR TO_LOWER(process.executable) LIKE "*/bash" OR TO_LOWER(process.executable) LIKE "*/dash" OR TO_LOWER(process.executable) LIKE "*/zsh" OR TO_LOWER(process.executable) LIKE "*/ksh" OR TO_LOWER(process.executable) LIKE "*/curl" OR TO_LOWER(process.executable) LIKE "*/wget" OR TO_LOWER(process.executable) LIKE "*/nc" OR TO_LOWER(process.executable) LIKE "*/ncat" OR TO_LOWER(process.executable) LIKE "*/netcat" OR TO_LOWER(process.executable) LIKE "*/socat" OR TO_LOWER(process.executable) LIKE "*/perl" OR TO_LOWER(process.executable) LIKE "*/ruby" OR TO_LOWER(process.executable) LIKE "*/python" OR TO_LOWER(process.executable) LIKE "*/python3"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,linux,process_creation,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="7"> <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. --> <field name="ParentImage" type="pcre2">(?i)((/apache2$|/httpd$|/nginx$|/lighttpd$|/caddy$|/node$|/uwsgi$)|/php-fpm)</field> <field name="Image" type="pcre2">(?i)(/sh$|/bash$|/dash$|/zsh$|/ksh$|/curl$|/wget$|/nc$|/ncat$|/netcat$|/socat$|/perl$|/ruby$|/python$|/python3$)</field> <description>Linux web server spawning a shell or network download utility</description> <mitre> <id>T1190</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.