Persistence (TA0003)(external, opens in a new tab or window)
Initial Access (TA0001)(external, opens in a new tab or window)
Lateral Movement (TA0008)(external, opens in a new tab or window)
text code block:file where host.os.type == "linux" and event.action != "deletion" and /* Entropy threshold chosen to flag likely encoded/encrypted payload uploads while limiting false positives. */ file.Ext.entropy >= 6.0 and ( process.name in ( "nginx", "apache2", "httpd", "caddy", "lighttpd", "httpd.worker", "httpd-worker", "httpd-prefork", "php-cgi", "php-fcgi", "php-cgi.cagefs", "frankenphp", "lshttpd", "litespeed", "openlitespeed", "fcgiwrap", "uwsgi", "daphne", "uvicorn", "hypercorn", "granian", "waitress-serve", "flask", "puma", "unicorn", "unicorn_rails", "thin", "rackup", "mongrel_rails", "starman", "plackup", "twiggy", "hypnotoad", "starlet", "unitd", "unitd-debug" ) or process.name like ("php-fpm*", "lsphp*", "gunicorn*", "*.cgi", "*.fcgi") ) and file.extension in~ ( "php", "phtml", "pht", "php3", "php4", "php5", "php7", "phar", "asp", "aspx", "ashx", "asmx", "ascx", "cshtml", "razor", "jsp", "jspx", "jsx", "jspf", "tag", "tagx", "war", "ear", "js", "mjs", "cjs", "ts", "mts", "cts", "tsx", "py", "wsgi", "cgi", "fcgi", "pyc", "erb", "ru", "psgi", "lua", "luac", "sh", "elf", "bin" )
Install detection rules in Elastic Security
Detect File with High Entropy Created by Web Server 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).