!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 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:     edit_euser.cgi (2.59 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_euser.cgi
# Edit an existing samba user

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

&error_setup("$text{'eacl_aviol'}ask_epass.cgi");
&error("$text{'eacl_np'} $text{'eacl_pvusers'}")
        unless $access{'view_users'};
# display        
&ui_print_header(undef, $text{'euser_title'}, "");
@ulist = &list_users();
$u = $ulist[$in{'idx'}];

print &ui_form_start("save_euser.cgi", "post");
print &ui_hidden("idx", $in{'idx'});
print &ui_table_start($text{'euser_title'}, undef, 2);

print &ui_table_row($text{'euser_name'},
    "<tt>".&html_escape($u->{'name'})."</tt>");

print &ui_table_row($text{'euser_uid'},
    &ui_textbox("uid", $u->{'uid'}, 6));

if ($samba_version >= 3) {
    # In the new Samba, the password field is not really used for locking
    # accounts any more, so don't both with the no access/no password
    # options.
    $pwfield = &ui_radio("ptype", 2,
                 [ [ 2, $text{'euser_currpw'} ],
                   [ 3, $text{'euser_newpw'}." ".
                    &ui_password("pass", undef, 20) ] ]);
    }
else {
    # In the old Samba, you can set the password to deny a login to the
    # account or allow logins without a password
    $locked = ($u->{'pass1'} eq ("X" x 32));
    $nopass = ($u->{'pass1'} =~ /^NO PASSWORD/);
    $pwfield = &ui_radio("ptype", $locked ? 0 : $nopass ? 1 : 2,
                 [ [ 0, $text{'euser_noaccess'} ],
                   [ 1, $text{'euser_nopw'} ],
                   [ 2, $text{'euser_currpw'} ],
                   [ 3, $text{'euser_newpw'}." ".
                    &ui_password("pass", undef, 20) ] ]);
    }
print &ui_table_row($text{'euser_passwd'}, $pwfield);

if (!$u->{'opts'}) {
    # Old-style samba user
    print &ui_table_row($text{'euser_realname'},
        &ui_textbox("realname", $u->{'real'}, 40));

    print &ui_table_row($text{'euser_homedir'},
        &ui_textbox("homedir", $u->{'home'}, 40));

    print &ui_table_row($text{'euser_shell'},
        &ui_textbox("shell", $u->{'shell'}, 15));
    }
else {
    # New-style samba user
    print &ui_hidden("new", 1);
    map { $opt{uc($_)}++ } @{$u->{'opts'}};
    @ol = ($text{'euser_normal'}, "U", $text{'euser_nopwrequired'}, "N",
           $text{'euser_disable'}, "D", $text{'euser_locked'}, "L" ,$text{'euser_noexpire'}, "X", $text{'euser_trust'}, "W");
    for($i=0; $i<@ol; $i+=2) {
        push(@checks, &ui_checkbox("opts", $ol[$i+1], $ol[$i],
                       $opt{$ol[$i+1]}));
        delete($opt{$ol[$i+1]});
        }
    print &ui_table_row($text{'euser_option'},
        join("<br>\n", @checks));
    foreach $oo (keys %opt) {
        print &ui_hidden("opts", $oo);
        }
    }

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

&ui_print_footer("edit_epass.cgi", $text{'index_userlist'},
    "", $text{'index_sharelist'});


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