dataset = xdr_data | filter event_type = ENUM.FILE and (event_sub_type = ENUM.FILE_CREATE_NEW or event_sub_type = ENUM.FILE_WRITE or event_sub_type = ENUM.FILE_RENAME) | filter (lowercase(actor_process_image_name) ~= "^(php-fpm|php-cgi|lsphp)[0-9.]*(.exe)?$" or lowercase(actor_process_image_name) in ("frankenphp", "apache2", "httpd", "httpd.exe")) and lowercase(action_file_extension) in ("php", "phtml", "phar", "php5", "php7") and not (lowercase(action_file_path) contains "/cache/" or lowercase(action_file_path) contains "/compiled/" or lowercase(action_file_path) contains "/templates_c/" or lowercase(action_file_path) contains "/twig/" or lowercase(action_file_path) contains "/storage/framework/views/" or lowercase(action_file_path) contains "/wp-content/upgrade/") | fields _time, agent_hostname, actor_effective_username, actor_process_image_name, actor_process_command_line, action_file_path, action_file_sha256, causality_actor_process_image_name | sort desc _time