!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 49.58 GB of 127.8 GB (38.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     edit_users.cgi (5.83 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_users.cgi
# Display user and group related SSHd options

require './sshd-lib.pl';
&ui_print_header(undef, $text{'users_title'}, "", "users");
$conf = &get_sshd_config();

print &ui_form_start("save_users.cgi", "post");
print &ui_table_start($text{'users_header'}, "width=100%", 2);

if ($version{'type'} eq 'ssh' && $version{'number'} < 2) {
    # Days before account expires to warn
    $expire = &find_value("AccountExpireWarningDays", $conf);
    print &ui_table_row($text{'users_expire'},
        &ui_opt_textbox("expire", $expire, 5,
                $text{'users_expire_def'}));
    }

# Notify users of new email
$mail = &find_value("CheckMail", $conf);
if ($version{'type'} eq 'ssh') {
    print &ui_table_row($text{'users_mail'},
        &ui_yesno_radio("mail", lc($mail) ne 'no'));
    }
elsif ($version{'number'} < 3.1) {
    print &ui_table_row($text{'users_mail'},
        &ui_yesno_radio("mail", lc($mail) eq 'yes'));
    }

if ($version{'type'} eq 'ssh' && $version{'number'} < 2) {
    # Days before password expires to warn
    $pexpire = &find_value("PasswordExpireWarningDays", $conf);
    print &ui_table_row($text{'users_pexpire'},
        &ui_opt_textbox("pexpire", $pexpire, 5,
                $text{'users_pexpire_def'}));
    }

if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
    # Allow password authentication?
    $auth = &find_value("PasswordAuthentication", $conf);
    print &ui_table_row($text{'users_auth'},
        &ui_yesno_radio("auth", lc($auth) ne 'no'));
    }

# Allow empty passwords?
$pempty = &find_value("PermitEmptyPasswords", $conf);
if ($version{'type'} eq 'ssh') {
    print &ui_table_row($text{'users_pempty'},
        &ui_yesno_radio("pempty", lc($pempty) ne 'no'));
    }
else {
    print &ui_table_row($text{'users_pempty'},
        &ui_yesno_radio("pempty", lc($pempty) eq 'yes'));
    }

# Allow logins by root
$root = &find_value("PermitRootLogin", $conf);
if (!$root) {
    # Default ways seems to be 'yes'
    $root = "yes";
    }
@opts = ( [ 'yes', $text{'yes'} ],
      [ 'no', $text{'no'} ] );
if ($version{'type'} eq 'ssh') {
    push(@opts, [ 'nopwd', $text{'users_nopwd'} ]);
    }
else {
    push(@opts, [ 'without-password', $text{'users_nopwd'} ]);
    if ($version{'number'} >= 2) {
        push(@opts, [ 'forced-commands-only', $text{'users_fcmd'} ]);
        }
    }
print "</select></td>\n";
print &ui_table_row($text{'users_root'},
    &ui_select("root", lc($root), \@opts));

# SSH 1 RSA authentication
if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
    $rsa = &find_value("RSAAuthentication", $conf);
    print &ui_table_row($text{'users_rsa'},
        &ui_yesno_radio('rsa', lc($rsa) ne 'no'));
    }

# SSH 2 DSA authentication
if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
    $dsa = &find_value("PubkeyAuthentication", $conf);
    print &ui_table_row($text{'users_dsa'},
        &ui_yesno_radio('dsa', lc($dsa) ne 'no'));
    }

# Strictly check permissions
$strict = &find_value("StrictModes", $conf);
print &ui_table_row($text{'users_strict'},
    &ui_yesno_radio('strict', lc($strict) ne 'no'));

# Show message of the day
$motd = &find_value("PrintMotd", $conf);
print &ui_table_row($text{'users_motd'},
    &ui_yesno_radio('motd', lc($motd) ne 'no'));

if ($version{'type'} eq 'openssh') {
    # Ignore known_hosts files
    $known = &find_value("IgnoreUserKnownHosts", $conf);
    print &ui_table_row($text{'users_known'},
        &ui_yesno_radio("known", lc($known) eq 'yes'));

    if ($version{'number'} > 2.3) {
        # Show login banner from file
        $banner = &find_value("Banner", $conf);
        print &ui_table_row($text{'users_banner'},
            &ui_opt_textbox("banner", $banner, 50,
                    $text{'users_banner_def'})." ".
            &file_chooser_button("banner"));
        }
    }
elsif ($version{'type'} eq 'ssh' && $version{'number'} >= 2) {
    # Show login banner from file
    $banner = &find_value("BannerMessageFile", $conf);
    print &ui_table_row($text{'users_banner'},
        &ui_opt_textbox("banner", $banner, 50,
                $text{'users_banner_def'})." ".
        &file_chooser_button("banner"));
    }

if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
    # Authorized keys file (under home)
    $authkeys = &find_value("AuthorizedKeysFile", $conf);
    print &ui_table_row($text{'users_authkeys'},
        &ui_opt_textbox("authkeys", $authkeys, 20,
                $text{'users_authkeys_def'},
                $text{'users_authkeys_set'}));
    }

if ($version{'type'} eq 'openssh' && $version{'number'} >= 5) {
    # Max login attempts
    $maxauthtries = &find_value("MaxAuthTries", $conf);
    print &ui_table_row($text{'users_maxauthtries'},
        &ui_opt_textbox("maxauthtries", $maxauthtries, 5,
                $text{'default'}." (6)"));
    }

print &ui_table_hr();

if ($version{'type'} eq 'openssh' && $version{'number'} < 3.7 ||
    $version{'type'} eq 'ssh' && $version{'number'} < 2) {
    # Allow rhosts file authentication?
    $rhostsauth = &find_value("RhostsAuthentication", $conf);
    print &ui_table_row($text{'users_rhostsauth'},
        &ui_yesno_radio("rhostsauth", lc($rhostsauth) eq 'yes'));

    # Allow RSA rhosts file authentication?
    $rhostsrsa = &find_value("RhostsRSAAuthentication", $conf);
    if ($version{'type'} eq 'ssh') {
        print &ui_table_row($text{'users_rhostsrsa'},
            &ui_yesno_radio("rhostsrsa", lc($rhostsrsa) ne 'no'));
        }
    else {
        print &ui_table_row($text{'users_rhostsrsa'},
            &ui_yesno_radio("rhostsrsa", lc($rhostsrsa) eq 'yes'));
        }
    }

# Ignore rhosts files?
$rhosts = &find_value("IgnoreRhosts", $conf);
if ($version{'type'} eq 'ssh') {
    print &ui_table_row($text{'users_rhosts'},
        &ui_yesno_radio("rhosts", lc($rhosts) eq 'yes'));
    }
else {
    print &ui_table_row($text{'users_rhosts'},
        &ui_yesno_radio("rhosts", lc($rhosts) ne 'no'));
    }

# Ignore root's rhosts file?
if ($version{'type'} eq 'ssh') {
    $rrhosts = &find_value("IgnoreRootRhosts", $conf);
    print &ui_table_row($text{'users_rrhosts'},
        &ui_radio("rrhosts", lc($rrhosts) eq 'yes' ? 1 :
                     lc($rrhosts) eq 'no' ? 0 : -1,
              [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ],
                [ -1, $text{'users_rrdef'} ] ]));
    }

print &ui_table_end();
print &ui_form_end([ [ undef, $text{'save'} ] ]);

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


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