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


Viewing file:     do_install_serial.cgi (3.55 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# do_install.cgi
# Install some package on all hosts, in parallel. If the package was
# downloaded from a URL, have the hosts do the same - otherwise, transfer
# it to each.

require './cluster-software-lib.pl';
&ReadParse();
@packages = &foreign_call("software", "file_packages", $in{'file'});
foreach $p (@packages) {
    local ($n, $d) = split(/\s+/, $p, 2);
    push(@names, $n); push(@descs, $d);
    }
-r $in{'file'} || &error($text{'do_edeleted'});
&ui_print_header(undef, $text{'do_title'}, "");
print "<b>",&text('do_header', join(" ", @names)),"</b><p>\n";

@hosts = &list_software_hosts();
@servers = &list_servers();
foreach $h (@hosts) {
    # Check if already installed
    local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
    local $d = $s->{'desc'} ? $s->{'desc'} : $s->{'host'};
    local ($a) = grep { &indexof($_->{'name'}, @names) >= 0 }
              @{$h->{'packages'}};
    #if ($a) {
    #    print &text('do_already', $d),"<br>\n";
    #    next;
    #    }

    &remote_foreign_require($s->{'host'}, "software", "software-lib.pl");
    local $rfile;
    local $need_unlink = 1;
    if (!$s->{'id'}) {
        # This host, so we already have the file
        $rfile = $in{'file'};
        $need_unlink = 0;
        }
    elsif ($in{'source'} == 2 && $in{'down'}) {
        # Ask the remote server to download the file
        $rfile = &remote_eval($s->{'host'}, "software", '&tempname()');
        if ($in{'ftpfile'}) {
            &remote_foreign_call($s->{'host'}, "software",
                "ftp_download", $in{'host'}, $in{'ftpfile'},
                $rfile);
            }
        else {
            &remote_foreign_call($s->{'host'}, "software",
                "http_download", $in{'host'}, $in{'port'},
                $in{'page'}, $rfile);
            }
        }
    else {
        # Need to copy the file across :(
        $rfile = &remote_write($s->{'host'}, $in{'file'});
        }

    # Do the install ..
    for($i=0; $i<@names; $i++) {
        local $error = &remote_foreign_call($s->{'host'}, "software",
                    "install_package", $rfile, $names[$i], \%in);
        if ($error) {
            print &text('do_failed', $d, $error),"<br>\n";
            }
        else {
            # Success .. get the package details and add to list
            print &text('do_success', $d),"<br>\n";
            if (!$pinfo[$i]) {
                $pinfo[$i] = [ &remote_foreign_call($s->{'host'}, "software",
                        "package_info", $names[$i]) ];
                }
            if (&indexof($names[$i], @{$h->{'packages'}}) < 0) {
                push(@{$h->{'packages'}},
                     { 'name' => $names[$i],
                       'desc' => $descs[$i],
                       'class' => $pinfo[$i]->[1] });
                &save_software_host($h);
                }
            }
        }
    &remote_eval($s->{'host'}, "software", "unlink('$rfile')") if ($need_unlink);
    }
unlink($in{'file'}) if ($in{'need_unlink'});
print "<p><b>$text{'do_done'}</b><p>\n";

for($i=0; $i<@names; $i++) {
    next if (!$pinfo[$i]);
    print "<table border width=100%>\n";
    print "<tr $tb> <td><b>$text{'do_details'}</b></td> </tr>\n";
    print "<tr $cb> <td><table width=100%>\n";
    print "<tr> <td valign=top width=20%><b>$text{'do_desc'}</b></td>\n";
    print "<td colspan=3><font size=+1><pre>$pinfo[$i]->[2]</pre></font></td> </tr>\n";

    print "<tr> <td width=20%><b>$text{'do_pack'}</b></td> <td>$pinfo[$i]->[0]</td>\n";
    print "<td width=20%><b>$text{'do_class'}</b></td> <td>",
        $pinfo[$i]->[1] ? $pinfo[$i]->[1] : $text{'do_none'},"</td> </tr>\n";

    print "<tr> <td width=20%><b>$text{'do_ver'}</b></td> <td>$pinfo[$i]->[4]</td>\n";
    print "<td width=20%><b>$text{'do_vend'}</b></td> <td>$pinfo[$i]->[5]</td> </tr>\n";

    print "<tr> <td width=20%><b>$text{'do_arch'}</b></td> <td>$pinfo[$i]->[3]</td>\n";
    print "<td width=20%><b>$text{'do_inst'}</b></td> <td>$pinfo[$i]->[6]</td> </tr>\n";
    print "</table></td></tr></table><p>\n";
    }

&remote_finished();
&ui_print_footer("", $text{'index_return'});


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