Persistence (TA0003)(external, opens in a new tab or window)
Initial Access (TA0001)(external, opens in a new tab or window)
text code block:file where host.os.type == "linux" and event.type in ("creation", "change") and ( process.name in ( "nginx", "apache2", "httpd", "php-cgi", "php-fcgi", "php-cgi.cagefs", "sw-engine-fpm", "wget", "curl", "bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "mksh", "busybox" ) or process.name like ("php-fpm*", "lsphp*", "*.cgi", "*.fcgi") ) and file.path like~ "*/wp-content/plugins/*.php*"
Install detection rules in Elastic Security
Detect PHP File Creation in WordPress Plugin Directory 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).