!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/qmailadmin/   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:     edit_ffile.cgi (2.02 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_ffile.cgi
# Allow editing of a filter config file

require (-r 'sendmail-lib.pl' ? './sendmail-lib.pl' :
     -r 'qmail-lib.pl' ? './qmail-lib.pl' :
                 './postfix-lib.pl');
&ReadParse();
if (substr($in{'file'}, 0, length($access{'apath'})) ne $access{'apath'}) {
    &error(&text('ffile_efile', $in{'file'}));
    }

&ui_print_header(undef, $text{'ffile_title'}, "");
&open_readfile(FILE, $in{'file'});
while(<FILE>) {
    s/\r|\n//g;
    if (/^(\S+)\s+(\S+)\s+(\S+)\s+(.*)$/) {
        push(@filter, [ $1, $2, $3, $4 ]);
        }
    elsif (/^(2)\s+(\S+)$/) {
        $other = $2;
        }
    }
close(FILE);

print "<b>",&text('ffile_desc', "<tt>$in{'file'}</tt>"),"</b><p>\n";

print "<form action=save_ffile.cgi method=post enctype=multipart/form-data>\n";
print "<input type=hidden name=file value=\"$in{'file'}\">\n";
print "<input type=hidden name=num value=\"$in{'num'}\">\n";
print "<input type=hidden name=name value=\"$in{'name'}\">\n";

$i = 0;
foreach $f (@filter, [ 1, '', '', '' ],
             [ 1, '', '', '' ],
             [ 1, '', '', '' ],
             [ 1, '', '', '' ],
             [ 1, '', '', '' ]) {
    $field = "<select name=field_$i>\n";
    foreach $ft ('', 'from', 'to', 'subject', 'cc', 'body') {
        $field .= sprintf "<option value='%s' %s>%s\n",
            $ft, $f->[2] eq $ft ? "selected" : "",
            $ft ? $text{"ffile_$ft"} : "&nbsp";
        }
    $field .= "</select>\n";

    $what = "<select name=what_$i>\n";
    $what .= sprintf "<option value=0 %s>%s\n",
        $f->[0] == 0 ? "selected" : "", $text{"ffile_what0"};
    $what .= sprintf "<option value=1 %s>%s\n",
        $f->[0] == 1 ? "selected" : "", $text{"ffile_what1"};
    $what .= "</select>\n";

    $match = "<input name=match_$i size=20 value='$f->[3]'>\n";

    $action = "<input name=action_$i size=30 value='$f->[1]'>\n";

    print &text('ffile_line', $field, $what, $match, $action),"<br>\n";
    $i++;
    }
print &text('ffile_other',
        "<input name=other size=30 value='$other'>"),"<br>\n";

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

&ui_print_footer("edit_alias.cgi?name=$in{'name'}&num=$in{'num'}", $text{'aform_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.0102 ]--