!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 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:     mass_update.cgi (2.78 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Change all instances of some IP 

require './bind8-lib.pl';
&ReadParse();
&error_setup($text{'umass_err'});

# Get the zones
foreach $d (split(/\0/, $in{'d'})) {
    ($zonename, $viewidx) = split(/\s+/, $d);
    $zone = &get_zone_name_or_error($zonename, $viewidx);
    $zone || &error($text{'umass_egone'});
    &can_edit_zone($zone) ||
        &error($text{'master_edelete'});
    push(@zones, $zone);
    }
$access{'ro'} && &error($text{'master_ero'});

# Validate inputs
$in{'old'} =~ s/\s+/ /g;
$in{'old_def'} || $in{'old'} || &error($text{'umass_eold'});
$in{'new'} || &error($text{'umass_enew'});
if ($in{'type'} eq 'A') {
    &check_ipaddress($in{'new'}) ||
        &error(&text('edit_eip', $in{'new'}));
    }
elsif ($in{'type'} eq 'AAAA') {
    &check_ip6address($in{'new'}) ||
        &error(&text('edit_eip6', $in{'new'}));
    }
elsif ($in{'type'} eq 'NS') {
    &valname($in{'new'}) ||
        &error(&text('edit_ens', $in{'new'}));
    }
elsif ($in{'type'} eq 'CNAME') {
    &valname($in{'new'}) || $in{'new'} eq '@' ||
        &error(&text('edit_ecname', $in{'new'}));
    }
elsif ($in{'type'} eq 'MX') {
    $in{'new'} =~ /^(\d+)\s+(\S+)$/ && &valname("$2") ||
        &error(&text('emass_emx', $in{'new'}));
    }
elsif ($in{'type'} eq 'TXT' || $in{'type'} eq 'SPF') {
    $in{'new'} = "\"$in{'new'}\"";
    }
elsif ($in{'type'} eq 'PTR') {
    &valname($in{'new'}) ||
        &error(&text('edit_eptr', $in{'new'}));
    }
elsif ($in{'type'} eq 'ttl') {
    $in{'new'} =~ /^\d+$/ || 
        &error(&text('master_edefttl', $in{'new'}));
    }

# Do each one
&ui_print_unbuffered_header(undef, $text{'umass_title'}, "");

foreach $zi (@zones) {
    print &text('umass_doing', "<tt>$zi->{'name'}</tt>"),"<br>\n";
    if ($zi->{'type'} ne 'master') {
        # Skip - not a master zone
        print $text{'umass_notmaster'},"<p>\n";
        next;
        }
    $rcount = 0;
    @recs = &read_zone_file($zi->{'file'}, $zi->{'name'});
    $realfile = &make_chroot(&absolute_path($zi->{'file'}));
    foreach $r (@recs) {
        $v = join(" ", @{$r->{'values'}});
        if ($r->{'type'} eq $in{'type'} &&
            ($v eq $in{'old'} || $in{'old_def'})) {
            # Found a regular record to fix
            &lock_file($realfile);
            &modify_record($zi->{'file'}, $r, $r->{'name'},
                       $r->{'ttl'}, $r->{'class'}, $r->{'type'},
                       $in{'new'}, $r->{'cmt'});
            $rcount++;
            }
        elsif ($in{'type'} eq 'ttl' && $r->{'defttl'}) {
            # Found default TTL to fix
            &lock_file($realfile);
            &modify_defttl($zi->{'file'}, $r, $in{'new'});
            $rcount++;
            }
        }
    if ($rcount) {
        &bump_soa_record($zi->{'file'}, \@recs);
        &sign_dnssec_zone_if_key($zi, \@recs);
        print &text('umass_done', $rcount, scalar(@recs)),"<p>\n";
        }
    else {
        print &text('umass_none', scalar(@recs)),"<p>\n";
        }
    }

&unlock_all_files();
&webmin_log("update", "zones", scalar(@zones));

&ui_print_footer("", $text{'index_return'});

# valname(name)
sub valname
{
return valdnsname($_[0], 0, $in{'origin'});
}


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