Techniques
Sample rules
PHP File Creation in WordPress Plugin Directory
- source: elastic
- technicques:
- T1059
- T1190
- T1505
Description
Detects the creation of a PHP file in the WordPress plugin directory, which is a common technique used by attackers to establish persistence on a compromised web server. Attackers may upload a malicious PHP file and call it from a web browser to gain remote access to the server.
Detection logic
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*"