!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/ipsec/   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_secret.cgi (2.1 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Show one secret key

require './ipsec-lib.pl';
&ReadParse();
if ($in{'new'}) {
    &ui_print_header(undef, $text{'secret_title1'}, "");
    $sec = { 'type' => $in{'type'} };
    }
else {
    &ui_print_header(undef, $text{'secret_title2'}, "");
    @secs = &list_secrets();
    $sec = $secs[$in{'idx'}];
    }

print &ui_form_start("save_secret.cgi", "post");
print &ui_hidden("new", $in{'new'});
print &ui_hidden("type", $sec->{'type'});
print &ui_hidden("idx", $in{'idx'});
print &ui_table_start($text{'secret_header'}, "100%", 2);

print &ui_table_row($text{'secret_name'},
            &ui_radio("name_def", $sec->{'name'} ? 0 : 1,
                  [ [ 1, $text{'secrets_any'} ],
                [ 0, $text{'secret_for'} ] ])."\n".
            &ui_textbox("name", $sec->{'name'}, 30));

print &ui_table_row($text{'secret_type'},
            $text{'secrets_'.lc($sec->{'type'})} || uc($sec->{'type'}));

if (lc($sec->{'type'}) eq "psk") {
    # Shared key, with a password
    $pass = $sec->{'value'} =~ /"(.*)"/ ? $1 : $sec->{'value'};
    print &ui_table_row($text{'secret_pass'},
                &ui_textbox("pass", $pass, 20));
    }
elsif (lc($sec->{'type'}) eq "rsa") {
    # RSA key .. show all editable parts
    $val = $sec->{'value'};
    $val =~ s/^\s*{//;
    $val =~ s/{\s*$//;
    while($val =~ /^\s*(\S+):\s+(\S+)((.|\n)*)/) {
        $rsa{$1} = $2;
        $val = $3;
        }
    foreach $p (&unique(@rsa_attribs, keys(%rsa))) {
        print &ui_table_row(&text('secret_rsa', $p),
            $p eq "PublicExponent" ?
            &ui_textbox("rsa_$p", $rsa{$p}, 10) :
            &ui_textarea("rsa_$p", &split_line($rsa{$p}, 60),5,60));
        }
    }
else {
    # Unknown!!
    print &ui_table_row($text{'secret_value'},
                &ui_textarea("value", $sec->{'value'},
                     20, 60));
    }

print &ui_table_end();
if ($in{'new'}) {
    print &ui_form_end([ [ "create", $text{'create'} ] ]);
    }
else {
    print &ui_form_end([ [ "save", $text{'save'} ],
                 [ "delete", $text{'delete'} ] ], 100);
    }

&ui_print_footer("list_secrets.cgi", $text{'secrets_return'},
         "", $text{'index_return'});

sub split_line
{
local $str = $_[0];
local $rv;
while(length($str) > $_[1]) {
    $rv .= substr($str, 0, $_[1])."\n";
    $str = substr($str, $_[1]);
    }
$rv .= $str."\n";
return $rv;
}


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