!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/sshd/   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:     save_users.cgi (3.63 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_users.cgi
# save user and group related sshd options

require './sshd-lib.pl';
&ReadParse();
&error_setup($text{'users_err'});
&lock_file($config{'sshd_config'});
$conf = &get_sshd_config();

if ($version{'type'} eq 'ssh' && $version{'number'} < 2) {
    if ($in{'expire_def'}) {
        &save_directive("AccountExpireWarningDays", $conf);
        }
    else {
        $in{'expire'} =~ /^\d+$/ || &error($text{'users_eexpire'});
        &save_directive("AccountExpireWarningDays", $conf,
                $in{'expire'});
        }
    }

if ($version{'type'} eq 'ssh' || $version{'number'} < 3.1) {
    &save_directive("CheckMail", $conf, $in{'mail'} ? 'yes' : 'no');
    }

#&save_directive("ForcedEmptyPasswdChange", $conf, $in{'empty'} ? 'yes' : 'no');
#
#&save_directive("ForcedPasswdChange", $conf, $in{'passwd'} ? 'yes' : 'no');

if ($version{'type'} eq 'ssh' && $version{'number'} < 2) {
    if ($in{'pexpire_def'}) {
        &save_directive("PasswdExpireWarningDays", $conf);
        }
    else {
        $in{'pexpire'} =~ /^\d+$/ || &error($text{'users_eexpire'});
        &save_directive("PasswdExpireWarningDays", $conf,
                $in{'pexpire'});
        }
    }

if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
    &save_directive("PasswordAuthentication", $conf,
            $in{'auth'} ? 'yes' : 'no');
    }

&save_directive("PermitEmptyPasswords", $conf, $in{'pempty'} ? 'yes' : 'no');

&save_directive("PermitRootLogin", $conf, $in{'root'});

if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
    &save_directive("RSAAuthentication", $conf, $in{'rsa'} ? 'yes' : 'no');
    }
if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
    &save_directive("PubkeyAuthentication", $conf,
            $in{'dsa'} ? 'yes' : 'no');
    }

&save_directive("StrictModes", $conf, $in{'strict'} ? 'yes' : 'no');

&save_directive("PrintMotd", $conf, $in{'motd'} ? 'yes' : 'no');

if ($version{'type'} eq 'openssh') {
    &save_directive("IgnoreUserKnownHosts", $conf,
            $in{'known'} ? 'yes' : 'no');

    if ($version{'number'} > 2.3) {
        if ($in{'banner_def'}) {
            &save_directive("Banner", $conf);
            }
        else {
            -r $in{'banner'} || &error($text{'users_ebanner'});
            &save_directive("Banner", $conf, $in{'banner'});
            }
        }
    }
elsif ($version{'type'} eq 'ssh' && $version{'number'} >= 2) {
    if ($in{'banner_def'}) {
        &save_directive("BannerMessageFile", $conf);
        }
    else {
        -r $in{'banner'} || &error($text{'users_ebanner'});
        &save_directive("BannerMessageFile", $conf, $in{'banner'});
        }
    }

if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
    if ($in{'authkeys_def'}) {
        &save_directive("AuthorizedKeysFile", $conf);
        }
    else {
        $in{'authkeys'} =~ /^\S+$/ || &error($text{'users_eauthkeys'});
        &save_directive("AuthorizedKeysFile", $conf, $in{'authkeys'});
        }
    }

if ($version{'type'} eq 'openssh' && $version{'number'} >= 5) {
    if ($in{'maxauthtries_def'}) {
        &save_directive("MaxAuthTries", $conf);
        }
    else {
        $in{'maxauthtries'} =~ /^\d+$/ && $in{'maxauthtries'} > 0 ||
            &error($text{'users_emaxauthtries'});
        &save_directive("MaxAuthTries", $conf, $in{'maxauthtries'});
        }
    }

if ($version{'type'} eq 'openssh' && $version{'number'} < 3.7 ||
    $version{'type'} eq 'ssh' && $version{'number'} < 2) {
    &save_directive("RhostsAuthentication", $conf,
            $in{'rhostsauth'} ? 'yes' : 'no');

    &save_directive("RhostsRSAAuthentication", $conf,
            $in{'rhostsrsa'} ? 'yes' : 'no');
    }

&save_directive("IgnoreRhosts", $conf, $in{'rhosts'} ? 'yes' : 'no');

if ($version{'type'} eq 'ssh') {
    if ($in{'rrhosts'} == -1) {
        &save_directive("IgnoreRootRhosts", $conf);
        }
    else {
        &save_directive("IgnoreRootRhosts", $conf,
                $in{'rrhosts'} ? 'yes' : 'no');
        }
    }

&flush_file_lines();
&unlock_file($config{'sshd_config'});
&webmin_log("users");
&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.0067 ]--