!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/wuftpd/   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:     save_message.cgi (2.5 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_message.cgi
# Save messages, banners and other options

require './wuftpd-lib.pl';
&error_setup($text{'message_err'});
&ReadParse();

&lock_file($config{'ftpaccess'});
$conf = &get_ftpaccess();
foreach $c (&find_value('class', $conf)) {
    $hasclass{$c->[0]}++;
    }

# Save messages 
for($i=0; defined($path = $in{"mpath_$i"}); $i++) {
    next if (!$path);
    $path =~ /^\S+$/ || &error(&text('message_epath', $path));
    if ($in{"mwhen_$i"} == 0) {
        $when = "login";
        }
    elsif ($in{"mwhen_$i"} == 1) {
        $when = "cwd=*";
        }
    else {
        $in{"mcwd_$i"} =~ /^\S+$/ ||
            &error(&text('message_ecwd', $path));
        $when = "cwd=".$in{"mcwd_$i"};
        }
    @classes = split(/\s+/, $in{"mclasses_$i"});
    foreach $c (@classes) {
        $hasclass{$c} || &error(&text('message_eclass', $c));
        }
    push(@message, { 'name' => 'message',
             'values' => [ $path, $when, @classes ] } );
    }
&save_directive($conf, 'message', \@message);

# Save readme's
for($i=0; defined($path = $in{"rpath_$i"}); $i++) {
    next if (!$path);
    $path =~ /^\S+$/ || &error(&text('message_epath', $path));
    if ($in{"rwhen_$i"} == 0) {
        $when = "login";
        }
    elsif ($in{"rwhen_$i"} == 1) {
        $when = "cwd=*";
        }
    else {
        $in{"rcwd_$i"} =~ /^\S+$/ ||
            &error(&text('message_ecwd', $path));
        $when = "cwd=".$in{"rcwd_$i"};
        }
    @classes = split(/\s+/, $in{"rclasses_$i"});
    foreach $c (@classes) {
        $hasclass{$c} || &error(&text('message_eclass', $c));
        }
    push(@readme, { 'name' => 'readme',
             'values' => [ $path, $when, @classes ] } );
    }
&save_directive($conf, 'readme', \@readme);

# save other options
&save_directive($conf, 'greeting', [ { 'name' => 'greeting',
                       'values' => [ $in{'greeting'} ] } ]);
if ($in{'banner_def'}) {
    &save_directive($conf, 'banner', [ ]);
    }
else {
    -r $in{'banner'} || &error(&text('message_ebanner', $in{'banner'}));
    &save_directive($conf, 'banner', [ { 'name' => 'banner',
                         'values' => [ $in{'banner'} ] } ]);
    }
if ($in{'hostname_def'}) {
    &save_directive($conf, 'hostname', [ ]);
    }
else {
    $in{'hostname'} =~ /^\S+$/ || &error($text{'message_ehostname'});
    &save_directive($conf, 'hostname',
            [ { 'name' => 'hostname',
                'values' => [ $in{'hostname'} ] } ]);
    }
if ($in{'email_def'}) {
    &save_directive($conf, 'email', [ ]);
    }
else {
    $in{'email'} =~ /^\S+$/ || &error($text{'message_eemail'});
    &save_directive($conf, 'email', [ { 'name' => 'email',
                        'values' => [ $in{'email'} ] } ]);
    }


&flush_file_lines();
&unlock_file($config{'ftpaccess'});
&webmin_log("message", undef, undef, \%in);
&redirect("");


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