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


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

require './postfix-lib.pl';
$access{'master'} || &error($text{'master_ecannot'});
&ReadParse();
&error_setup($text{'master_err'});
$master = &get_master_config();
if ($in{'new'}) {
    $prog = { };
    }
else {
    ($prog) = grep { $_->{'name'} eq $in{'old'} &&
             $_->{'type'} eq $in{'oldtype'} &&
             $_->{'enabled'} == $in{'oldenabled'} } @$master;
    $prog || &error($text{'master_egone'});
    }
&lock_file($config{'postfix_master'});

if ($in{'delete'}) {
    # Just delete this one
    &delete_master($prog);
    }
else {
    # Validate and store inputs
    $prog->{'type'} = $in{'type'};
    $prog->{'enabled'} = $in{'enabled'};
    $in{'name'} =~ /^\S+$/ || &error($text{'master_ename'});
    if (!$in{'host_def'}) {
        &to_ipaddress($in{'host'}) || &error($text{'master_ehost'});
        $in{'type'} eq 'inet' || &error($text{'master_einet'});
        $prog->{'name'} = $in{'host'}.":".$in{'name'};
        }
    else {
        $prog->{'name'} = $in{'name'};
        }
    $in{'command'} =~ /^\S/ || &error($text{'master_ecommand'});
    $prog->{'command'} = $in{'command'};
    $prog->{'private'} = $in{'private'};
    $prog->{'unpriv'} = $in{'unpriv'};
    $prog->{'chroot'} = $in{'chroot'};
    if ($in{'wakeup'} == 0) {
        $prog->{'wakeup'} = '-';
        }
    elsif ($in{'wakeup'} == 1) {
        $prog->{'wakeup'} = '0';
        }
    else {
        $in{'wtime'} =~ /^\d+$/ || &error($text{'master_ewakeup'});
        $prog->{'wakeup'} = $in{'wtime'}.($in{'wused'} ? "?" : "");
        }
    if ($in{'maxprocs'} == 0) {
        $prog->{'maxprocs'} = '-';
        }
    elsif ($in{'maxprocs'} == 1) {
        $prog->{'maxprocs'} = '0';
        }
    else {
        $in{'procs'} =~ /^\d+$/ || &error($text{'master_emaxprocs'});
        $prog->{'maxprocs'} = $in{'procs'};
        }

    # Check for clash by name and type, but only between enabled servers
    if ($in{'enabled'}) {
        if ($in{'new'} || $in{'name'} ne $in{'old'} ||
                  $in{'type'} ne $in{'oldtype'}) {
            ($clash) = grep { $_->{'name'} eq $in{'name'} &&
                      $_->{'type'} eq $in{'type'} &&
                      $_->{'enabled'} } @$master;
            $clash && &error($text{'master_eclash'});
            }
        }

    # Save or update
    if ($in{'new'}) {
        &create_master($prog);
        }
    else {
        &modify_master($prog);
        }
    }
&unlock_file($config{'postfix_master'});

# Apply config
&reload_postfix();

&webmin_log($in{'delete'} ? "delete" : $in{'new'} ? "create" : "modify",
        "master", $prog->{'name'}, $prog);
&redirect("master.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.0109 ]--