!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:     view_users.cgi (3.05 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# view_users.cgi
# Display users connected to a share

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

# check acls

&error_setup("$text{'eacl_aviol'}ask_epass.cgi");
if ($in{share}) { # this may be cracked very easy, don't know how to do better :    # per-share acls ...
    # per-share acls ...
    &error("$text{'eacl_np'} $text{'eacl_pconn'}") 
        unless &can('rv',\%access, $in{share});
    }
else {
    &error("$text{'eacl_np'} $text{'eacl_pconn_all'}") 
        unless $access{'view_all_con'};
    } 
&ui_print_header(undef, $text{'viewu_index'}, "");

if (!&has_command($config{samba_status_program})) {
    print &text('viewu_ecmd', $config{'samba_status_program'}, "$gconfig{'webprefix'}/config.cgi?$module_name");
    print "<p>\n";
    &ui_print_footer("", $text{'index_sharelist'});
    exit;
    }

if ($in{share}) {
    print &ui_subheading(&text('viewu_list',"<tt>$in{share}</tt>"));
    @cons = &list_connections($in{'share'});
    }
else {
    @cons = &list_connections();
    }
@locks = &list_locks();

@rightlinks = ( "<a href='view_users.cgi?$in'>".
        $text{'viewu_refresh'}."</a>" );
if (@cons) {
    print &ui_form_start("kill_users.cgi");
    print &ui_hidden("share", $in{'share'});
    @links = ( &select_all_link("d"),
           &select_invert_link("d") );
    print &ui_grid_table([ &ui_links_row(\@links),
                   &ui_links_row(\@rightlinks) ], 2, 100,
                 [ undef, "align=right" ]);

    # Show table header
    @tds = ( "width=5" );
    print &ui_columns_start([
        "",
        $text{'viewu_pid'},
        $in{'share'} ? ( ) : ( $text{'viewu_share'} ),
        $text{'viewu_user'},
        $text{'viewu_group'},
        $text{'viewu_from'},
        $text{'viewu_time'},
        $text{'viewu_locks'} ], 100, 0, \@tds);

    # Show each connected user
    foreach $c (@cons) {
        local @cols;
        push(@cols, "<a href=\"kill_user.cgi?share=$in{'share'}&pid=$c->[3]\">".&html_escape($c->[3])."</a>");
        if (!$in{'share'}) {
            push(@cols, &html_escape($c->[0]));
            }
        $p = undef;
        &get_share($c->[0]);
        $p = &getval("path");
        push(@cols, &html_escape($c->[1]));
        push(@cols, &html_escape($c->[2]));
        push(@cols, &html_escape($c->[4]));
        push(@cols, &html_escape($c->[5]));
        local $ulocks;
        @ulocks = grep { $_->[0] == $c->[3] } @locks;
        if ($p) {
            # Limit to files under share
            @ulocks = grep { $_->[4] =~ /^\Q$p\E\// } @ulocks;
            }
        foreach $l (@ulocks) {
            $ulocks .= &html_escape($l->[4])." (".
                         &html_escape($l->[1]).")<br>\n";
            }
        $ulocks ||= $text{'viewu_none'};
        push(@cols, $ulocks);
        print &ui_checked_columns_row(\@cols, \@tds, "d", $c->[3]);
        }
    print &ui_columns_end();
    print &ui_grid_table([ &ui_links_row(\@links),
                   &ui_links_row(\@rightlinks) ], 2, 100,
                 [ undef, "align=right" ]);
    print &ui_form_end([ [ "kill", $text{'viewu_kill'} ] ]);

    print $text{'viewu_msg1'},"<p>\n";
    }
else {
    print "<b>$text{'viewu_msg2'}</b><p>\n";
    print &ui_links_row(\@rightlinks);
    }
print "<p>\n";

if ($in{share}) {
    &ui_print_footer($in{printer} ? "edit_pshare.cgi?share=$in{share}"
                 : "edit_fshare.cgi?share=$in{share}",
        $text{'index_shareconf'},
        "", $text{'index_sharelist'});
    }
else { &ui_print_footer("", $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.0099 ]--