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


Viewing file:     edit_sec.cgi (3.06 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_sec.cgi
# Edit security options for some file or print share

require './samba-lib.pl';
&ReadParse();
# check acls

&error_setup("$text{'eacl_aviol'}ask_epass.cgi");
&error("$text{'eacl_np'} $text{'eacl_pvsec'}")
        unless &can('rs', \%access, $in{'share'});
# display
$s = $in{'share'};
if ($s eq "global") {
    &ui_print_header(undef, $text{'sec_index1'}, "");
    }
else {
    &ui_print_header(undef, $text{'sec_index2'}, "");
    print "<center><font size=+1>",&text('fmisc_for', $s), "</font></center>\n";
    }
&get_share($s);

print &ui_form_start("save_sec.cgi", "post");
print &ui_hidden("old_name", $s);
print &ui_hidden("printer", $in{'printer'});
print &ui_table_start($text{'share_security'}, undef, 2);

print &ui_table_row($text{'sec_writable'},
    &yesno_input("writeable"));

print &ui_table_row($text{'sec_guest'},
    &ui_radio("guest", &istrue("public") && &istrue("guest only") ? 2 :
               &istrue("public") && !&istrue("guest only") ? 1 : 0,
          [ [ 0, $text{'config_none'} ],
            [ 1, $text{'yes'} ],
            [ 2, $text{'sec_guestonly'} ] ]));

print &ui_table_row($text{'sec_guestaccount'},
    &username_input("guest account", "Default"));

print &ui_table_row($text{'sec_limit'},
    &yesno_input("only user"));

print &ui_table_row($text{'sec_allowhost'},
    &ui_opt_textbox("allow_hosts", &getval("allow hosts"), 60,
            $text{'config_all'}, $text{'sec_onlyallow'}));

print &ui_table_row($text{'sec_denyhost'},
    &ui_opt_textbox("deny_hosts", &getval("deny hosts"), 60,
            $text{'config_none'}, $text{'sec_onlydeny'}));

print &ui_table_row($text{'sec_revalidate'},
    &yesno_input("revalidate"));

foreach $f ("valid users", "invalid users") {
    @user = &split_users(&getval($f));
    ($uf = $f) =~ s/ /_/g;
    ($pfx) = split(/\s+/, $f);
    print &ui_table_row($text{'sec_'.$pfx.'user'},
        &ui_textbox($uf."_u",
                join(' ', grep { !/^@/ } @user), 60)." ".
        &user_chooser_button($uf."_u", 1));

    print &ui_table_row($text{'sec_'.$pfx.'group'},
        &ui_textbox($uf."_g", join(' ', map { s/@//; $_ } grep { /^@/ } @user), 60)." ".
        &group_chooser_button($uf."_g", 1));
    }

print &ui_table_hr();

foreach $fp ([ "user", "possible" ],
        [ "read list", "ro" ],
        [ "write list", "rw" ]) {
    ($f, $pfx) = @$fp;
    ($uf = $f) =~ s/ /_/g;
    @user = &split_users(&getval($f));
    print &ui_table_row($text{'sec_'.$pfx.'user'},
        &ui_textbox($uf."_u", join(' ', grep { !/^@/ } @user), 60)." ".
        &user_chooser_button($uf."_u", 1));
    print &ui_table_row($text{'sec_'.$pfx.'group'},
        &ui_textbox($uf."_g", join(' ', map { s/@//;$_ } grep { /^@/ } @user), 60)." ".
        &group_chooser_button($uf."_g", 1));
    }

print &ui_table_end();

if (&can('wS', \%access, $in{'share'})) {
    print &ui_form_end([ [ undef, $text{'save'} ] ]);
    }
else {
    print &ui_form_end();
    }

if (&istrue("printable") || $in{'printer'}) {
    &ui_print_footer("edit_pshare.cgi?share=".&urlize($s),
             $text{'index_printershare'},
             "", $text{'index_sharelist'});
    }
else {
    &ui_print_footer("edit_fshare.cgi?share=".&urlize($s),
             $text{'index_fileshare'},
             "", $text{'index_sharelist'});
    }


sub split_users
{
return split(/\s*,\s*/, $_[0]);
}


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