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


Viewing file:     index.cgi (3.93 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# index.cgi
# Display all existing SSL tunnels

require './stunnel-lib.pl';

# Check if stunnel is installed
if (!-x $config{'stunnel_path'}) {
    &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1);
    print &text('index_estunnel', "<tt>$config{'stunnel_path'}</tt>",
            "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
    &ui_print_footer("/", $text{"index"});
    exit;
    }

# Check if inetd or xinetd is installed
if (!$has_inetd && !$has_xinetd) {
    &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1);
    print "$text{'index_einetd'}<p>\n";
    &ui_print_footer("/", $text{"index"});
    exit;
    }

# Get the version
$ver = &get_stunnel_version(\$out);
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
    &help_search_link("stunnel", "man", "doc"), undef, undef,
    &text('index_version', $ver));
#if ($ver >= 4) {
#    print "<p>",&text('index_eversion', $ver, 4.0),"<p>\n";
#    print &ui_hr();
#    &ui_print_footer("/", $text{'index'});
#    exit;
#    }

# List all tunnels currently setup in inetd
@tunnels = &list_stunnels();
@links = ( &select_all_link("d"),
       &select_invert_link("d"),
       "<a href='edit_stunnel.cgi?new=1'>$text{'index_add'}</a>" );
if (@tunnels) {
    print &ui_form_start("delete_tunnels.cgi", "post");
    @tds = ( "width=5" );
    print &ui_links_row(\@links);
    print &ui_columns_start([ "",
                  $text{'index_name'},
                  $text{'index_port'},
                  $text{'index_active'},
                  $text{'index_action'} ], 100, 0, \@tds); 
    foreach $t (@tunnels) {
        local @cols;
        if ($ver > 4) {
            # Parse new-style stunnel config file
            if ($t->{'args'} =~ /^(\S+)\s+(\S+)/) {
                $cfile = $2;
                @conf = &get_stunnel_config($cfile);
                ($conf) = grep { !$_->{'name'} } @conf;
                }
            }
        if ($ver > 4 && !$cfile) {
            push(@cols, &html_escape($t->{'name'}));
            }
        else {
            push(@cols,
                "<a href='edit_stunnel.cgi?idx=$t->{'index'}'>".
                &html_escape($t->{'name'})."</a>");
            }
        push(@cols, &html_escape($t->{'port'}));
        push(@cols, $t->{'active'} ? $text{'yes'} :
            "<font color=#ff0000>$text{'no'}</font>");
        if ($ver > 4) {
            # Parse new-style stunnel config file
            if ($exec = $conf->{'values'}->{'exec'}) {
                $args = $conf->{'values'}->{'execargs'};
                push(@cols, &text('index_cmd',
                   $args ? "<tt>".&html_escape($args)."</tt>"
                         : "<tt>".&html_escape($exec)."</tt>"));
                }
            elsif ($conn = $conf->{'values'}->{'connect'}) {
                push(@cols, &text('index_remote',
                    "<tt>".&html_escape($conn)."</tt>"));
                }
            elsif ($cfile) {
                push(@cols, &text('index_conf',
                    "<tt>$cfile</tt>"));
                }
            else {
                push(@cols, $text{'index_noconf'});
                }
            }
        else {
            # Parse old-style stunnel args
            if ($t->{'args'} =~ /\s*-([lL])\s+(\S+)\s+--\s+(.*)/ ||
                $t->{'args'} =~ /\s*-([lL])\s+(\S+)/) {
                push(@cols, &text('index_cmd',
                    $3 ? "<tt>".&html_escape($3)."</tt>"
                       : "<tt>".&html_escape($2)."</tt>"));
                }
            elsif ($t->{'args'} =~ /-r\s+(\S+):(\d+)/) {
                push(@cols, &text('index_remote',
                    "<tt>".&html_escape("$1:$2")."</tt>"));
                }
            elsif ($t->{'args'} =~ /-r\s+(\d+)/) {
                push(@cols, &text('index_rport',
                    "<tt>".&html_escape($1)."</tt>"));
                }
            else {
                push(@cols,
                    "<tt>".&html_escape($t->{'args'})."</tt>");
                }
            }
        print &ui_checked_columns_row(\@cols, \@tds, "d",$t->{'index'});
        }
    print &ui_columns_end();
    print &ui_links_row(\@links);
    print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]);
    }
else {
    print "<b>$text{'index_none'}</b><p>\n";
    print &ui_links_row([ $links[2] ]);
    }

print &ui_hr();
print "<table width=100%><tr>\n";
print "<form action=apply.cgi>\n";
print "<td><input type=submit value='$text{'index_apply'}'></td>\n";
if ($has_inetd && $has_xinetd) {
    print "<td>$text{'index_applymsg1'}</td>\n";
    }
elsif ($has_inetd) {
    print "<td>$text{'index_applymsg2'}</td>\n";
    }
else {
    print "<td>$text{'index_applymsg3'}</td>\n";
    }
print "</form></tr></table>\n";

&ui_print_footer("/", $text{'index'});


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