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


Viewing file:     save_simple.cgi (2.75 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Update simple tests

require './spam-lib.pl';
&ReadParse();
&set_config_file_in(\%in);
&can_use_check("header");
$conf = &get_config();
&error_setup($text{'simple_err'});
&execute_before("simple");

# Get existing rules
@simples = &get_simple_tests($conf);
@headers = &find("header", $conf);
@bodies = &find("body", $conf);
@fulls = &find("full", $conf);
@uris = &find("uri", $conf);
@scores = &find("score", $conf);
@describes = &find("describe", $conf);

# Parse and validate inputs
for($i=0; defined($name = $in{"name_$i"}); $i++) {
    $simple = $i < @simples ? $simples[$i] : undef;
    if ($simple) {
        # Take out the directives that would be replaced
        @headers = grep { $_ ne $simple->{'header_dir'} } @headers;
        @bodies = grep { $_ ne $simple->{'body_dir'} } @bodies;
        @fulls = grep { $_ ne $simple->{'full_dir'} } @fulls;
        @uris = grep { $_ ne $simple->{'uri_dir'} } @uris;
        @scores = grep { $_ ne $simple->{'score_dir'} } @scores;
        @describes = grep { $_ ne $simple->{'describe_dir'} } @describes;
        }

    if ($name) {
        $name =~ /^\S+$/ || &error(&text('header_ename', $name));
        $donename{$name}++ && &error(&text('header_eclash', $name));
        $header = $in{"header_$i"};
        $regexp = $in{"regexp_$i"};
        $regexp || &error(&text('header_eregexp2', $name));
        $flags = $in{"flags_$i"};
        $flags =~ /^[a-z]*$/ || &error(&text('header_eflags', $flags));
        $score = $in{"score_$i"};
        $score eq "" || $score =~ /^\-?\d+(\.\d+)?$/ ||
                $score =~ /^\-?\.\d+$/ ||
            &error(&text('score_epoints', $score));
        $describe = $in{"describe_$i"};

        # Update or add the actual directives
        if ($header eq "body") {
            push(@bodies, { 'name' => 'body',
                       'value' => "$name /$regexp/$flags" });
            }
        elsif ($header eq "full") {
            push(@fulls, { 'name' => 'full',
                       'value' => "$name /$regexp/$flags" });
            }
        elsif ($header eq "uri") {
            push(@uris, { 'name' => 'uri',
                       'value' => "$name /$regexp/$flags" });
            }
        else {
            my $ucheader = ucfirst($header);
            push(@headers, { 'name' => 'header',
                         'value' => "$name $ucheader =~ /$regexp/$flags" });
            }

        # Update the score and describe
        if ($score ne "") {
            push(@scores, { 'name' => 'score',
                    'value' => "$name $score" });
            }
        if ($describe ne "") {
            push(@describes, { 'name' => 'describe',
                       'value' => "$name $describe" });
            }
        }
    }

# Save the directives
&lock_spam_files();
&save_directives($conf, "header", \@headers, 0);
&save_directives($conf, "body", \@bodies, 0);
&save_directives($conf, "full", \@fulls, 0);
&save_directives($conf, "score", \@scores, 0);
&save_directives($conf, "describe", \@describes, 0);
&save_directives($conf, "uri", \@uris, 0);

&flush_file_lines();
&unlock_spam_files();
&execute_after("header");
&webmin_log("header");
&redirect($redirect_url);


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