!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)

/usr/libexec/webmin/usermin/   drwxr-xr-x
Free 53.72 GB of 127.8 GB (42.03%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     install_mod.cgi (2.68 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# install_mod.cgi
# Download and install a usermin module

require './usermin-lib.pl';
$access{'umods'} || &error($text{'acl_ecannot'});
if ($ENV{REQUEST_METHOD} eq "POST") { &ReadParseMime(); }
else { &ReadParse(); $no_upload = 1; }

$| = 1;
$theme_no_table = 1 if ($in{'source'} == 2);
&ui_print_header(undef, $text{'install_title'}, "");

if ($in{'source'} == 0) {
    # from local file
    &error_setup(&text('install_err1', $in{'file'}));
    $file = $in{'file'};
    if (!(-r $file)) { &inst_error($text{'install_efile'}); }
    }
elsif ($in{'source'} == 1) {
    # from uploaded file
    &error_setup($text{'install_err2'});
    $file = &transname();
    $need_unlink = 1;
    if ($no_upload) {
                &inst_error($text{'install_ebrowser'});
                }
    &open_tempfile(MOD, ">$file", 0, 1);
    &print_tempfile(MOD, $in{'upload'});
    &close_tempfile(MOD);
    }
elsif ($in{'source'} == 2) {
    # from ftp or http url
    &error_setup(&text('install_err3', $in{'url'}));
    $file = &transname();
    $need_unlink = 1;
    local $error;
    $progress_callback_url = $in{'url'};
    if ($in{'url'} =~ /^(http|https):\/\/([^\/]+)(\/.*)$/) {
        $ssl = $1 eq 'https';
        $host = $2; $page = $3; $port = $ssl ? 443 : 80;
        if ($host =~ /^(.*):(\d+)$/) { $host = $1; $port = $2; }
        &http_download($host, $port, $page, $file, \$error,
                   \&progress_callback, $ssl);
        }
    elsif ($in{'url'} =~ /^ftp:\/\/([^\/]+)(:21)?\/(.*)$/) {
        $host = $1; $ffile = $3;
        &ftp_download($host, $ffile, $file, \$error, \&progress_callback);
        }
    else { &inst_error($text{'install_eurl'}); }
    &inst_error($error) if ($error);
    }

# Install the module(s)
$rv = &install_usermin_module($file, $need_unlink, $in{'nodeps'});
if (ref($rv)) {
        @mdescs = @{$rv->[0]};
        @mdirs = @{$rv->[1]};
        @msizes = @{$rv->[2]};
        }
else {
        &inst_error($rv);
        }

# Display something nice for the user
print "$text{'install_desc'} <p>\n";
print "<ul>\n";
for($i=0; $i<@mdescs; $i++) {
    $mdirs[$i] =~ /\/([^\/]+)$/;
    if (%minfo = &get_usermin_module_info($1)) {
        # Installed a module
        local $cat = $text{"category_".$minfo{'category'}};
        $cat = $text{"category_"} if (!$cat);
        print &text($minfo{'hidden'} ? 'install_line3' :
                'install_line2', "<b>$mdescs[$i]</b>",
                "<tt>$mdirs[$i]</tt>", $msizes[$i], $cat),
                "<br>\n";
        }
    elsif (%tinfo = &get_usermin_theme_info($1)) {
        # Installed a theme
        print &text('themes_line', "<b>$mdescs[$i]</b>",
                "<tt>$mdirs[$i]</tt>", $msizes[$i]),
                "<br>\n";
        }
    }
print "</ul><p>\n";
&ui_print_footer("edit_mods.cgi?mode=install", $text{'mods_return'},
         "", $text{'index_return'});

sub inst_error
{
print "<b>$whatfailed : $_[0]</b> <p>\n";
&ui_print_footer("", $text{'index_return'});
exit;
}


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