!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 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_mailer.cgi (1.83 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_mailer.cgi
# Save, create or delete a mailertable entry

require './sendmail-lib.pl';
require './mailers-lib.pl';
&ReadParse();
$access{'mailers'} || &error($text{'msave_ecannot'});
$conf = &get_sendmailcf();
$mfile = &mailers_file($conf);
&lock_file($mfile);
($mdbm,$mdbmtype) = &mailers_dbm($conf);
@mailers = &list_mailers($mfile);
foreach $ml (@mailers) { $already{$ml->{'domain'}}++; }
if (!$in{'new'}) { $m = $mailers[$in{'num'}]; }

if ($in{'delete'}) {
    # delete some mailer entry
    $logm = $m;
    &delete_mailer($m, $mfile, $mdbm, $mdbmtype);
    }
else {
    # Saving or creating.. check inputs
    &error_setup($text{'msave_err'});
    $domain = $in{'from_type'} == 1 ? ".".$in{'from_dom'} :
          $in{'from_type'} == 2 ? $in{'from_all'} : $in{'from_host'};
    $domain =~ /^[A-z0-9\-\.]+$/ ||
        &error(&text('msave_edomain', $domain));
    if ($already{$domain} && ($in{'new'} || $m->{'domain'} ne $domain)) {
        &error(&text('msave_edup', $domain));
        }
    if ($in{'new'} && $in{'from_type'} == 2 &&
        $already{".".$in{'from_all'}}) {
        &error(&text('msave_edup', $domain));
        }
    $mailer = $in{'mailer'};
    $dest = $in{'dest'};
    $dest =~ s/\s+/:/g;

    $newm{'domain'} = $domain;
    $newm{'mailer'} = $mailer;
    if ($in{'nomx'} && $mailer =~ /smtp|relay/) {
        $dest = join(":", map { "[".$_."]" } split(/:/, $dest));
        }
    $newm{'dest'} = $dest;
    $newm{'cmt'} = $in{'cmt'};
    if ($in{'new'}) {
        &create_mailer(\%newm, $mfile, $mdbm, $mdbmtype);
        if ($in{'from_type'} == 2) {
            # Add extra for hosts in domain
            $newm{'domain'} = ".".$in{'from_all'};
            &create_mailer(\%newm, $mfile, $mdbm, $mdbmtype);
            }
        }
    else {
        &modify_mailer($m, \%newm, $mfile, $mdbm, $mdbmtype);
        }
    $logm = \%newm;
    }
&unlock_file($mfile);
&webmin_log($in{'delete'} ? 'delete' : $in{'new'} ? 'create' : 'modify',
        "mailer", $logm->{'domain'}, $logm);
&redirect("list_mailers.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.0093 ]--