!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/dhcpd/   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:     save_iface.cgi (3.44 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_ifaces.cgi
# Save network interfaces on which the DHCP server is started

require './dhcpd-lib.pl';
%access = &get_module_acl();
$access{'noconfig'} && &error($text{'iface_ecannot'});
&ReadParse();

# Save in config file
@iface = split(/\s+|\0/, $in{'iface'});
@iface || &error($text{'iface_enone'});
$iface = join(" ", @iface);
$config{'interfaces'} = join(" ", @iface);
&write_file("$module_config_directory/config", \%config);

if ($config{'interfaces_type'} eq 'mandrake') {
    if (-r "/etc/conf.linuxconf") {
        # Write to Mandrake linuxconf file
        local $lref = &read_file_lines("/etc/conf.linuxconf");
        for($i=0; $i<@$lref; $i++) {
            $secline = $i if ($lref->[$i] =~ /\[dhcpd\]/);
            $ifaceline = $i if ($lref->[$i] =~ /DHCP.interface/);
            }
        $line = "DHCP.interface $iface";
        if (defined($ifaceline)) {
            $lref->[$ifaceline] = $line;
            }
        elsif (defined($secline)) {
            splice(@$lref, $secline+1, 0, $line);
            }
        else {
            push(@$lref, "[dhcpd]", $line);
            }
        &flush_file_lines();
        }
    else {
        # Write to sysconfig file
        &read_env_file("/etc/sysconfig/dhcpd", \%dhcpd);
        $dhcpd{'INTERFACES'} = $iface;
        &write_env_file("/etc/sysconfig/dhcpd", \%dhcpd);
        }
    }
elsif ($config{'interfaces_type'} eq 'redhat') {
    # Write to the Redhat environment file
    &read_env_file("/etc/sysconfig/dhcpd", \%dhcpd);
    $dhcpd{'DHCPDARGS'} = $iface;
    &write_env_file("/etc/sysconfig/dhcpd", \%dhcpd);
    }
elsif ($config{'interfaces_type'} eq 'suse') {
    # Write to the SuSE/United environment file
    &read_env_file("/etc/sysconfig/dhcpd", \%dhcpd);
    $dhcpd{'DHCPD_INTERFACE'} = $iface;
    &write_env_file("/etc/sysconfig/dhcpd", \%dhcpd);
    }
elsif ($config{'interfaces_type'} eq 'debian') {
    if (-r "/etc/default/isc-dhcp-server") {
        # Write to Debian 6.0 environment file
        &read_env_file("/etc/default/isc-dhcp-server", \%dhcpd);
        $dhcpd{'INTERFACES'} = $iface;
        &write_env_file("/etc/default/isc-dhcp-server", \%dhcpd);
        }
    elsif (-r "/etc/default/dhcp") {
        # Write to Debian environment file
        &read_env_file("/etc/default/dhcp", \%dhcpd);
        $dhcpd{'INTERFACES'} = $iface;
        &write_env_file("/etc/default/dhcp", \%dhcpd);
        }
    elsif (-r "/etc/default/dhcp3-server") {
        # Write to Debian DHCPd 3 environment file
        &read_env_file("/etc/default/dhcp3-server", \%dhcpd);
        $dhcpd{'INTERFACES'} = $iface;
        &write_env_file("/etc/default/dhcp3-server", \%dhcpd);
        }
    else {
        # Write to the debian init script
        $lref = &read_file_lines("/etc/init.d/dhcp");
        for($i=0; $i<@$lref; $i++) {
            if ($lref->[$i] =~ /INTERFACES\s*=\s*'([^']+)'/ ||
                $lref->[$i] =~ /INTERFACES\s*=\s*"([^"]+)"/ ||
                $lref->[$i] =~ /INTERFACES\s*=\s*(\S+)/) {
                $lref->[$i] = "INTERFACES=\"$iface\"";
                }
            }
        &flush_file_lines("/etc/init.d/dhcp");
        }
    }
elsif ($config{'interfaces_type'} eq 'caldera') {
    # Interfaces are set in the Caldera daemons directory file
    &read_env_file("/etc/sysconfig/daemons/dhcpd", \%dhcpd);
    @other = grep { !/^(lo|[a-z]+\d+)$/ } split(/\s+/, $dhcpd{'OPTIONS'});
    $dhcpd{'OPTIONS'} = join(" ", @other).($iface ? " $iface" : "");
    &write_env_file("/etc/sysconfig/daemons/dhcpd", \%dhcpd);
    }
elsif ($config{'interfaces_type'} eq 'gentoo') {
    # Interfaces are set in a file on Gentoo
    &read_env_file("/etc/conf.d/dhcp", \%dhcp);
    $dhcp{'IFACE'} = $iface;
    &write_env_file("/etc/conf.d/dhcp", \%dhcp);
    }
elsif ($config{'interfaces_type'} eq 'freebsd') {
    # Update FreeBSD rc.conf file
    &foreign_require("init");
    &init::save_rc_conf('dhcpd_ifaces', $iface);
    }

&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.0109 ]--