'php_eval_input',
'title' => 'eval() executes attacker-supplied input',
'severity' => 'critical',
'confidence' => 97,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\beval\s*\([^;]{0,200}\$_(?:GET|POST|REQUEST|COOKIE|SERVER|FILES)\b/i',
'description' => 'Code taken directly from the request is executed with eval(). This is a remote code execution backdoor.',
);
$r[] = array(
'id' => 'php_exec_input',
'title' => 'Shell command built from request input',
'severity' => 'critical',
'confidence' => 96,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\b(?:system|exec|shell_exec|passthru|popen|proc_open|pcntl_exec)\s*\([^;]{0,200}(?:\$_(?:GET|POST|REQUEST|COOKIE)\b|base64_decode\s*\(|stripslashes\s*\(\s*\$_)/i',
'description' => 'A system shell function receives attacker-controlled input. This is the signature of a web shell.',
);
$r[] = array(
'id' => 'php_assert_input',
'title' => 'assert() used as a code-execution backdoor',
'severity' => 'critical',
'confidence' => 94,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\bassert\s*\([^;]{0,200}(?:\$_(?:GET|POST|REQUEST|COOKIE)\b|base64_decode\s*\(|stripslashes\s*\()/i',
'description' => 'assert() evaluates a string as PHP code; feeding it request data or decoded payloads is a classic backdoor.',
);
$r[] = array(
'id' => 'php_input_as_function',
'title' => 'Request parameter called as a function',
'severity' => 'critical',
'confidence' => 93,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\$_(?:GET|POST|REQUEST|COOKIE)\s*\[[^\]]+\]\s*\(/i',
'description' => 'A value from the request is used as the function name (e.g. $_GET["f"]($_GET["a"])). Attackers can call any PHP function.',
);
$r[] = array(
'id' => 'php_callback_exec',
'title' => 'Callback function points at eval/assert/system',
'severity' => 'critical',
'confidence' => 92,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\b(?:array_map|array_filter|array_walk|usort|uasort|uksort|call_user_func(?:_array)?|register_shutdown_function|ob_start|array_reduce|iterator_apply|preg_replace_callback)\s*\(\s*[\'"]?\s*(?:assert|eval|system|exec|passthru|shell_exec|create_function|popen|proc_open)\b/i',
'description' => 'Dangerous functions are smuggled in as string callbacks to evade simple scanners.',
);
$r[] = array(
'id' => 'php_preg_replace_e',
'title' => 'preg_replace() with the /e modifier (code execution)',
'severity' => 'critical',
'confidence' => 90,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\bpreg_replace\s*\(\s*[\'"](?:[^\'"\\\\]|\\\\.)*\/[a-zA-Z]*e[a-zA-Z]*[\'"]\s*,/',
'description' => 'The deprecated /e modifier evaluates the replacement as PHP code. It is only ever seen in legacy malware.',
);
$r[] = array(
'id' => 'php_backtick_input',
'title' => 'Backtick shell execution of request data',
'severity' => 'critical',
'confidence' => 92,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'code_only' => true,
'pattern' => '/`[^`\n]{0,100}\$_(?:GET|POST|REQUEST|COOKIE)[^`\n]{0,100}`/',
'description' => 'Backticks run the enclosed string as a shell command; here it contains request input.',
);
$r[] = array(
'id' => 'php_base64_input',
'title' => 'Request data is base64-decoded before use',
'severity' => 'critical',
'confidence' => 88,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\bbase64_decode\s*\(\s*(?:stripslashes\s*\(\s*)?\$_(?:GET|POST|REQUEST|COOKIE)\b/i',
'description' => 'Decoding attacker input is how backdoors receive hidden commands.',
);
$r[] = array(
'id' => 'php_md5_password_gate',
'title' => 'Password-protected backdoor (hashed secret compared with request)',
'severity' => 'critical',
'confidence' => 90,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\b(?:md5|sha1|crc32|hash)\s*\(\s*\$_(?:GET|POST|COOKIE|REQUEST)\s*\[[^\]]+\]\s*\)\s*[!=]==?\s*[\'"][a-f0-9]{8,}[\'"]/i',
'description' => 'A hashed secret from the request gates access; this is how web shells authenticate their operator.',
);
$r[] = array(
'id' => 'php_cookie_backdoor',
'title' => 'Cookie value compared with a hard-coded hash',
'severity' => 'critical',
'confidence' => 85,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\$_COOKIE\s*\[[^\]]+\]\s*\)?\s*===?\s*[\'"][a-f0-9]{32}[\'"]/i',
'description' => 'Backdoors frequently authenticate through a secret cookie.',
);
$r[] = array(
'id' => 'php_known_shell',
'title' => 'Known web shell family detected',
'severity' => 'critical',
'confidence' => 98,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php', 'text' ),
'pattern' => '/\b(?:c99shell|c99madshell|r57shell|b374k|FilesMan|WSO\s?[0-9.]+|IndoXploit|AnonymousFox|AlfaShell|ALFA TEAM|Mister Spy|K2ll33d|Priv8 Shell|Sh3ll|TryagShell|wso\.php|Web Shell by|Mini Shell|P\.A\.S\. v|uname\s*-a;\s*w;\s*id|safe_mode_bypass)\b/i',
'description' => 'The file identifies itself as a known web shell (c99, r57, WSO, b374k, AnonymousFox, Alfa, IndoXploit...).',
);
$r[] = array(
'id' => 'php_shell_ui',
'title' => 'Command execution form (web shell UI)',
'severity' => 'critical',
'confidence' => 90,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/]+name\s*=\s*[\'"]?(?:cmd|command|shell|exec|c)[\'"]?[^>]*>/i',
'requires' => array( '/\b(?:system|exec|shell_exec|passthru|popen|proc_open)\s*\(/i' ),
'description' => 'An HTML form posts a command to a shell function: an interactive web shell.',
);
$r[] = array(
'id' => 'php_wpvcd',
'title' => 'WP-VCD malware family',
'severity' => 'critical',
'confidence' => 97,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php', 'any' ),
'pattern' => '/\b(?:wp-vcd|wp_vcd|wp-tmp\.php|wp-feed\.php|class\.wp\.php|class\.theme-modules\.php|wp_cd_code|wp_class_check|theme_temp_setup|wp_temp_setupx)\b/i',
'description' => 'Strings unique to the WP-VCD family (spread through nulled themes/plugins; creates hidden admins and injects spam).',
);
$r[] = array(
'id' => 'php_reversed_funcs',
'title' => 'Reversed function names (strrev obfuscation)',
'severity' => 'critical',
'confidence' => 93,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php', 'js' ),
'pattern' => '/\b(?:edoced_46esab|etalfnizg|ecalper_gerp|tressa|lave|noitcnuf_etaerc|sserpmocnuzg|31tor_rts)\b/',
'description' => 'base64_decode, gzinflate, eval etc. written backwards so simple greps miss them.',
);
$r[] = array(
'id' => 'php_hidden_admin_creation',
'title' => 'Hidden administrator account creation',
'severity' => 'critical',
'confidence' => 88,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\b(?:wp_insert_user|wp_create_user)\s*\([^;]{0,400}?(?:administrator|[\'"]role[\'"]\s*=>\s*[\'"]administrator)/is',
'requires' => array( '/[\'"]user_pass[\'"]\s*=>\s*[\'"][^\'"]{3,}[\'"]|wp_create_user\s*\(\s*[\'"][^\'"]+[\'"]\s*,\s*[\'"][^\'"]+[\'"]/i' ),
'description' => 'An administrator is created with a hard-coded password. Legitimate code never ships admin credentials.',
);
$r[] = array(
'id' => 'php_auto_login',
'title' => 'Automatic login as a privileged user',
'severity' => 'high',
'confidence' => 65,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'escalate' => array( 'upload' => 90, 'root' => 88, 'theme' => 88, 'other' => 88, 'dropin' => 85, 'mu' => 80 ),
'escalate_severity' => 'critical',
'escalate_verdict' => 'confirmed',
'types' => array( 'php' ),
'pattern' => '/\bwp_set_auth_cookie\s*\(\s*(?:1|\$_(?:GET|POST|REQUEST|COOKIE)[^)]*|\$(?:admin|user)s?\s*(?:\[\s*0\s*\])?\s*->\s*ID)\s*[,)]/i',
'requires' => array( '/\$_(?:GET|POST|REQUEST|COOKIE)\s*\[[^\]]+\]\s*[!=]==?|wp_set_current_user\s*\(\s*1\s*\)|get_users\s*\(\s*(?:array\s*\(|\[)[^)]*administrator/i' ),
'description' => 'A secret request parameter logs the visitor in as an administrator without a password (backdoor login).',
);
$r[] = array(
'id' => 'php_hide_users_filter',
'title' => 'Users hidden from the admin user list',
'severity' => 'critical',
'confidence' => 86,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/add_(?:action|filter)\s*\(\s*[\'"](?:pre_user_query|views_users|wp_count_users|users_list_table_query_args)[\'"]/i',
'requires' => array( '/user_login\s*(?:!=|<>|NOT\s+IN)|->query_where\s*\.=|->query_where\s*=\s*str_replace/i' ),
'description' => 'Code rewrites the users query to hide a specific account from Users > All Users: this hides a rogue admin.',
);
$r[] = array(
'id' => 'php_hide_plugin',
'title' => 'Plugin hides itself from the plugin list',
'severity' => 'high',
'confidence' => 60,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/add_filter\s*\(\s*[\'"]all_plugins[\'"]/i',
'requires' => array( '/\bunset\s*\(\s*\$\w+\s*\[/i' ),
'description' => 'The all_plugins filter is used to remove an entry from Plugins. Some management plugins do this, malware does it to hide.',
);
$r[] = array(
'id' => 'php_remote_include',
'title' => 'Remote file inclusion',
'severity' => 'critical',
'confidence' => 92,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\b(?:include|require)(?:_once)?\s*\(?\s*[\'"](?:https?|ftps?|php):\/\//i',
'description' => 'PHP code is loaded from a remote URL or a php:// stream wrapper.',
);
$r[] = array(
'id' => 'php_include_media',
'title' => 'PHP include of an image/text/icon file (hidden payload loader)',
'severity' => 'critical',
'confidence' => 92,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'code_only' => true,
'pattern' => '/(?:\'"-])(?:include|require)(?:_once)?\b\s*\(?[^;\n]{0,200}?\.(?:ico|png|jpe?g|gif|bmp|webp|txt|log|css|svg|dat|tmp|bak|zip)[\'"]\s*\)?\s*;/i',
'description' => 'Malware hides PHP inside files with harmless extensions (.ico, .png, .txt) and includes them from a loader.',
);
$r[] = array(
'id' => 'php_include_uploads',
'title' => 'PHP include from the uploads directory',
'severity' => 'high',
'confidence' => 75,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\b(?:include|require)(?:_once)?\s*\(?[^;]{0,200}uploads\/[^;]{0,120}\.php/i',
'description' => 'Executable code is loaded from the uploads folder, which should only hold media.',
);
$r[] = array(
'id' => 'php_dropper',
'title' => 'Writes a PHP file from request data (dropper)',
'severity' => 'high',
'confidence' => 60,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'escalate' => array( 'upload' => 90, 'root' => 88, 'theme' => 88, 'other' => 88, 'dropin' => 85, 'mu' => 80 ),
'escalate_severity' => 'critical',
'escalate_verdict' => 'confirmed',
'types' => array( 'php' ),
'pattern' => '/\b(?:file_put_contents|fwrite|fputs)\s*\([^;]{0,300}(? array( '/\$_(?:GET|POST|REQUEST|COOKIE|FILES)\b|base64_decode\s*\(|curl_exec\s*\(|file_get_contents\s*\(\s*[\'"]https?:/i' ),
'description' => 'Code writes a .php file whose content comes from the request or a remote server.',
);
$r[] = array(
'id' => 'php_upload_handler',
'title' => 'Unrestricted file upload handler',
'severity' => 'high',
'confidence' => 70,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\bmove_uploaded_file\s*\(\s*\$_FILES\s*\[[^\]]+\]\s*\[\s*[\'"]tmp_name[\'"]\s*\]\s*,[^;]{0,120}\$_FILES\s*\[[^\]]+\]\s*\[\s*[\'"]name[\'"]\s*\]/i',
'description' => 'An uploaded file is saved under its original name with no validation: attackers use this to plant shells.',
);
$r[] = array(
'id' => 'php_extract_input',
'title' => 'extract() of request variables',
'severity' => 'high',
'confidence' => 65,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\bextract\s*\(\s*\$_(?:GET|POST|REQUEST|COOKIE)\b/i',
'description' => 'extract() turns every request parameter into a variable; backdoors use it to receive commands.',
);
$r[] = array(
'id' => 'php_unserialize_input',
'title' => 'unserialize() of untrusted input',
'severity' => 'high',
'confidence' => 70,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\bunserialize\s*\(\s*(?:base64_decode\s*\(\s*)?(?:stripslashes\s*\(\s*)?\$_(?:GET|POST|REQUEST|COOKIE)\b/i',
'description' => 'PHP object injection: attacker-controlled serialized data is unserialized.',
);
$r[] = array(
'id' => 'php_mailer_script',
'title' => 'Spam mailer script',
'severity' => 'high',
'confidence' => 78,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\b(?:mail|wp_mail)\s*\(\s*(?:\$_(?:POST|GET|REQUEST)\s*\[|\$(?:to|email|recipient)s?\s*,\s*\$_(?:POST|GET|REQUEST))/i',
'description' => 'Email recipient and content come straight from the request: a classic spam relay.',
);
$r[] = array(
'id' => 'php_reverse_shell',
'title' => 'Reverse shell / socket connection to a shell',
'severity' => 'critical',
'confidence' => 85,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\b(?:fsockopen|stream_socket_client|socket_create)\s*\(/i',
'requires' => array( '/\/bin\/(?:ba)?sh|proc_open\s*\(|popen\s*\(|exec\s*\(\s*[\'"](?:\/bin|cmd)/i' ),
'description' => 'A network socket is wired to a system shell: an attacker gets an interactive shell on the server.',
);
$r[] = array(
'id' => 'php_cron_payload',
'title' => 'Scheduled task fetches and runs remote code',
'severity' => 'high',
'confidence' => 55,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'escalate' => array( 'upload' => 90, 'root' => 86, 'theme' => 86, 'other' => 86, 'dropin' => 84, 'mu' => 80 ),
'escalate_severity' => 'critical',
'escalate_verdict' => 'confirmed',
'types' => array( 'php' ),
'pattern' => '/\bwp_schedule_(?:single_)?event\s*\(|add_action\s*\(\s*[\'"](?:init|wp_loaded|shutdown)[\'"]/i',
'requires' => array( '/\b(?:wp_remote_get|wp_remote_post|file_get_contents|curl_exec)\s*\([^;]{0,200}/i', '/\b(?:eval|assert|base64_decode|gzinflate|str_rot13|create_function)\s*\(/i' ),
'description' => 'A hook or cron job downloads content from a remote server and executes decoded code.',
);
/* ------------------------------------------------------------------
* Obfuscation & encoded payloads
* ---------------------------------------------------------------- */
$r[] = array(
'id' => 'php_eval_decode',
'title' => 'eval() of an encoded/compressed payload',
'severity' => 'critical',
'confidence' => 92,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\b(?:eval|assert)\s*\(\s*(?:@\s*)?(?:base64_decode|gzinflate|gzuncompress|gzdecode|str_rot13|strrev|hex2bin|rawurldecode|urldecode|convert_uu(?:en|de)code|pack)\s*\(/i',
'description' => 'Executing code only after decoding it has no legitimate purpose; it hides the real payload from reviewers.',
);
$r[] = array(
'id' => 'php_layered_decode',
'title' => 'Layered decoding chain (gzinflate/base64/rot13)',
'severity' => 'high',
'confidence' => 80,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\b(?:gzinflate|gzuncompress|gzdecode|str_rot13|strrev|hex2bin)\s*\(\s*(?:base64_decode|str_rot13|strrev|gzinflate|hex2bin)\s*\(/i',
'description' => 'Multiple decoding layers are stacked, a common way to hide payloads.',
);
$r[] = array(
'id' => 'php_long_base64_decode',
'title' => 'Large base64 blob is decoded at runtime',
'severity' => 'high',
'confidence' => 70,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/[\'"][A-Za-z0-9+\/=]{400,}[\'"]/',
'requires' => array( '/\bbase64_decode\s*\(/i' ),
'description' => 'A long base64 string combined with base64_decode() usually hides code. (Embedded images without decode are not flagged.)',
);
$r[] = array(
'id' => 'php_hex_strings',
'title' => 'Hex-escaped strings hide function names',
'severity' => 'high',
'confidence' => 75,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/(?:\\\\x[0-9a-fA-F]{2}){8,}|(?:\\\\[0-7]{3}){8,}/',
'description' => 'Long runs of \\x.. or octal escapes are used to spell out eval/base64_decode without writing them.',
);
$r[] = array(
'id' => 'php_chr_chain',
'title' => 'String rebuilt character by character',
'severity' => 'high',
'confidence' => 78,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/(?:chr\s*\(\s*\d+\s*\)\s*\.\s*){6,}/i',
'description' => 'chr(101).chr(118)... reconstructs words like "eval" at runtime to defeat pattern matching.',
);
$r[] = array(
'id' => 'php_obfuscated_vars',
'title' => 'Obfuscated variable names',
'severity' => 'high',
'confidence' => 72,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\$(?:[O0]{4,}|[Il1]{4,}|_0x[0-9a-fA-F]{3,}|[a-zA-Z]{1,2}[0-9]{5,})\b/',
'min_count' => 4,
'description' => 'Variables named like $O0O0O, $IlIl1 or $_0x1a2b are produced by obfuscators, not by developers.',
);
$r[] = array(
'id' => 'php_globals_trick',
'title' => '${"GLOBALS"} obfuscation',
'severity' => 'high',
'confidence' => 72,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\$\{\s*[\'"]GLOBALS[\'"]\s*\}\s*\[|\$GLOBALS\s*\[\s*\$GLOBALS\s*\[/',
'description' => 'Variable-variable tricks through $GLOBALS are a hallmark of obfuscated malware.',
);
$r[] = array(
'id' => 'php_concat_function_name',
'title' => 'Function name assembled from string fragments',
'severity' => 'medium',
'confidence' => 60,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\$\w+\s*=\s*(?:[\'"][a-zA-Z0-9_]{1,4}[\'"]\s*\.\s*){4,}[\'"][a-zA-Z0-9_]{1,4}[\'"]\s*;/',
'requires' => array( '/\$\w+\s*\(\s*(?:\$\w+|[\'"])/' ),
'description' => '"ba"."se6"."4_de"."code" style concatenation followed by a variable function call.',
);
$r[] = array(
'id' => 'php_create_function_decode',
'title' => 'create_function() with decoded body',
'severity' => 'critical',
'confidence' => 90,
'verdict' => 'confirmed',
'remediation' => 'delete',
'types' => array( 'php' ),
'pattern' => '/\bcreate_function\s*\([^;]{0,200}(?:base64_decode|gzinflate|str_rot13|strrev|hex2bin)\s*\(/i',
'description' => 'create_function() compiles a decoded string into a function: an eval in disguise.',
);
$r[] = array(
'id' => 'php_variable_function_input',
'title' => 'Variable function called with request data',
'severity' => 'high',
'confidence' => 68,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\$[a-zA-Z_]\w*\s*\(\s*(?:stripslashes\s*\(\s*)?\$_(?:GET|POST|REQUEST|COOKIE)\s*\[/i',
'description' => 'A function whose name is stored in a variable receives raw request input.',
);
$r[] = array(
'id' => 'php_error_prelude',
'title' => 'Error-suppression prelude typical of malware',
'severity' => 'medium',
'confidence' => 55,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/@?error_reporting\s*\(\s*0\s*\)\s*;\s*@?ini_set\s*\(\s*[\'"]display_errors[\'"]\s*,\s*[\'"]?(?:0|off|false)[\'"]?\s*\)/i',
'requires' => array( '/\b(?:eval|assert|base64_decode|gzinflate|str_rot13|create_function|\$_(?:GET|POST|COOKIE|REQUEST))\b/i' ),
'description' => 'Malware silences all errors first so it never reveals itself in logs. Only reported together with other indicators.',
);
$r[] = array(
'id' => 'php_encoded_loader',
'title' => 'Encoded PHP loader (ion' . 'Cube / Zend Guard / SourceGuardian)',
'severity' => 'info',
'confidence' => 20,
'verdict' => 'suspicious',
'remediation' => 'manual_review',
'types' => array( 'php' ),
'pattern' => '/\b(?:ion[C]ube Loader|Zend Guard|SourceGuardian|extension_loaded\s*\(\s*[\'"]ion[C]ube)/i',
'description' => 'The file is commercially encoded and cannot be inspected. Confirm it belongs to a plugin you bought.',
);
/* ------------------------------------------------------------------
* SEO spam, redirects, injected JavaScript
* ---------------------------------------------------------------- */
$r[] = array(
'id' => 'spam_keywords',
'title' => 'SEO spam keywords (pharma / casino / adult / essay)',
'severity' => 'medium',
'confidence' => 45,
'verdict' => 'suspicious',
'remediation' => 'remove_spam',
'escalate' => array( 'upload' => 80, 'root' => 75, 'theme' => 72, 'other' => 72, 'db' => 70, 'core' => 80 ),
'types' => array( 'php', 'js', 'html', 'text', 'db' ),
'pattern' => '/\b' . self::SPAM_WORDS . '\b/i',
'min_count' => 3,
'description' => 'Repeated gambling, pharmacy, adult or essay-writing keywords indicate injected SEO spam.',
);
$r[] = array(
'id' => 'hidden_links',
'title' => 'Hidden links (display:none / off-screen)',
'severity' => 'high',
'confidence' => 80,
'verdict' => 'confirmed',
'remediation' => 'remove_spam',
'types' => array( 'php', 'html', 'js', 'db' ),
'pattern' => '/<(?:div|span|p|ul|li)[^>]+style\s*=\s*[\'"][^\'"]*(?:display\s*:\s*none|visibility\s*:\s*hidden|position\s*:\s*absolute\s*;\s*(?:left|top)\s*:\s*-\d{3,}|text-indent\s*:\s*-\d{3,}|font-size\s*:\s*0|opacity\s*:\s*0)[^\'"]*[\'"][^>]*>\s*(?:<[^>]+>\s*){0,3} 'Links wrapped in invisible containers only exist to manipulate search engines.',
);
$r[] = array(
'id' => 'hidden_iframe',
'title' => 'Hidden or zero-size iframe',
'severity' => 'high',
'confidence' => 82,
'verdict' => 'confirmed',
'remediation' => 'remove_js',
'types' => array( 'php', 'html', 'js', 'db' ),
'pattern' => '/