!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/iscsi-client/   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:     delete_conns.cgi (2.21 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Remove one or more active connections

use strict;
use warnings;
require './iscsi-client-lib.pl';
our (%text, %in);
&ReadParse();
&error_setup($text{'dconns_err'});

# Get the connections
my $conns = &list_iscsi_connections();
ref($conns) || &error(&text('conns_elist', $conns));
my @d = split(/\0/, $in{'d'});
my @delconns;
foreach my $d (@d) {
    my ($conn) = grep { $_->{'num'} eq $d } @$conns;
    push(@delconns, $conn) if ($conn);
    }
@delconns || &error($text{'dconns_enone'});

if (!$in{'confirm'}) {
    &ui_print_header(undef, $text{'dconns_title'}, "");

    # Find users of each device
    my @users;
    foreach my $conn (@delconns) {
        push(@users, &get_connection_users($conn));
        }

    # Build table of users
    my $utable = "";
    if (@users) {
        $utable = $text{'dconns_users'}."<p>\n";
        $utable .= &ui_columns_start([
            $text{'conns_ip'},
            $text{'conns_target'},
            $text{'dconns_part'},
            $text{'dconns_use'} ]);
        foreach my $u (@users) {
            $utable .= &ui_columns_row([
                $u->[0]->{'ip'},
                $u->[0]->{'target'},
                &mount::device_name($u->[1]->{'device'}),
                &lvm::device_message($u->[2], $u->[3], $u->[4]),
                ], "50");
            }
        $utable .= &ui_columns_end();
        }

    # Ask the user if he is sure
    print &ui_confirmation_form(
        "delete_conns.cgi",
        @delconns == 1 && $delconns[0]->{'device'} ?
            &text('dconns_rusure2',
                  "<tt>".$delconns[0]->{'ip'}."</tt>",
                  "<tt>".$delconns[0]->{'device'}."</tt>") :
        @delconns == 1 ?
            &text('dconns_rusure1',
                  "<tt>".$delconns[0]->{'ip'}."</tt>") :
            &text('dconns_rusure', scalar(@delconns)),
        [ map { [ "d", $_ ] } @d ],
        [ [ "confirm", $text{'dconns_confirm'} ] ],
        $utable);

    &ui_print_footer("list_conns.cgi", $text{'conns_return'});
    }
else {
    # Delete each one
    foreach my $conn (@delconns) {
        my $err = &delete_iscsi_connection($conn);
        &error(&text('dconns_edelete', $conn->{'ip'},
                 $conn->{'target'}, $err)) if ($err);
        }

    if (@delconns == 1) {
        &webmin_log("delete", "connection", $delconns[0]->{'ip'},
                { 'host' => $delconns[0]->{'ip'},
                  'port' => $delconns[0]->{'port'},
                  'target' => $delconns[0]->{'target'} });
        }
    else {
        &webmin_log("delete", "connections", scalar(@delconns));
        }
    &redirect("list_conns.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.005 ]--