The Horrors of C99.php
If you were a sysadmin a few years ago, and you had php on your servers, you’re probably already familiar with c99. In case you haven’t had the personal pleasure, c99, or specifically c99.php (hint: check the source), is the name of a script used by hackers to gain access to a web server running php using an exploit technique called Remote File Inclusion.
A Little History
See, back in the day some php developers were pretty stupid. (Admit it; you were stupid once too.) What other explanation could there be for writing code that allowed the injection of arbitrary routines into a program. Trivially easy too.
To be fair, PHP was to blame a little for this as well. Given PHP’s high adoption, and design, by, and for, newbie programmers allowing such a technique by default was just ill conceived, and maybe even a little negligent. I understand the desire, and sometime need, for a technique that could be dangerous but to enable the feature by default…. damn man…
So, the risk was known, yet code was still being written (like the below example) that allowed remote file inclusion to be possible. Mostly because of the aforementioned default setting.
<?php $color = 'blue'; if (isset( $_GET['COLOR'] ) ) { $color = $_GET['COLOR']; } require( $color . '.php' ); ?>
BTW, if you currently write code that does anything like the above, frankly, you’re an idiot. You aren’t nearly as smart and clever as you think you are. I promise you this will bite you. Bad too.
About C99.php
So, using a technique like the above opens you up to learning first hand about c99.php. Finding information about the program itself is a little tricky but there are a couple examples that highlight just how devastating it can be.
When malicious intruders compromise a web server, there’s an excellent chance a famous Russian PHP script, r57shell, will follow. The r57shell PHP script gives the intruder a number of capabilities, including, but not limited to: downloading files, uploading files, creating backdoors, setting up a spam relay, forging email, bouncing a connection to decrease the risk of being caught, and even taking control of SQL databases. All these functions become readily available through an easy to use web interface, but now you can fight back.
Using the above explanation, which I agree with, c99.php acts as an interface to control your server. Once it’s on your server an attacker has easy access to view all the files and their contents, make changes to the system, upload new files, manipulate the database(s) and more.
Quite the nasty little script but pretty elegant in how it’s implemented. c99 is a completely standalone script; even the images are embedded inside using base64!
Until a month ago I would have thought the risk of encountering c99.php in the wild would have been small these days. Then, SMACK!!, a client had a site get hacked (quick CYA; that I didn’t’ work on
) using c99. So be warned. It’s out there and if you’re not smart, or if you’re a lazy, lazy, coder, c99 will get you.

Email
Twitter
The irony is that I’m using that script as a admin control panel, just add a simple auth to it and it works like a charm, I would love to send a thank you letter lmao.
Hey littlebearz,
Check the code of your c99 file to make sure it’s not sending logs and location to an e-mail address of the author or previous owner of the script. The e-mail can be in plaintext or base64, so I would go line by line looking for it.
A php shell (c99 is only one of them), does not only “acts as an interface to control your server”, it can be used to “root” a server, and then not only one website gets compromised (if its a shared hosting), the hacker would have real control of the entire server, and thats where the fun starts
Scary, scary stuff man… fun, no doubt, but pretty scary.
It is very scary, what I would like to know is how to protect against it or stop it all together.
Thanks for the explanation. It is scary seeing c99.php requests on your logs.
Hello please i really need c99 and am just learning,……….please can someone tell me how to upload it into cpanel or how to hack it
1. Learn to use a CMS
2. Learn to really apply a search engine
3. Learn to code PHP
4. Learn to use c99.php
5. …
6. Profit?
And this is why you make sure to restrict file types in your upload scrips. As the age old saying goes, “never trust user submitted content.” Also be aware of nullbytes.
We are legion
we are
Ananymous
You are unable to spell…
RemoveHandler .php .phtml .php3
RemoveType .php .phtml .php3
php_flag engine off
and more even… find -name”*”
RemoveHandler .php .phtml .php3
RemoveType .php .phtml .php3
php_flag engine off
nuff said
this shell sucks there are much better shells bigger and better dont be scared of a shell they are a very clever thing
also c99.php has a back door in it and that sucks dont use this shell if you are ever going to test it out even to look at.