codeRedKiller: Apache CodeRed Countermeasures with PHP
Submitted by charlie.collins on Sat, 08/18/2001 - 07:41
Tagged:
Code Red is a pain even for Apache administrators. It takes up time and space even to send a 404. Wouldn't it be nice to be able to help alleviate the problem rather than just trying to bear it? Countermeasures? You bet, here's how to do it with PHP and bash (and note that this could easily be adapted to whatever you regularly employ, perl, jsp, etc.) The following is an explanation of the solution with source code and explicit instructions included below (PHP and bash).
First off let me explain the premise. My goals are not to be malicious and to waste even more space and time dealing with the problem (ie, don't kill the offending server and the solution needs to have less overhead than a 404 or it there is no sense in doing it).
I use PHP regularly so I decided to employ it again in this case to catch the "default.ida" requests (which for the uninitiated are what CodeRed requests) and then pass them to a shell script to "deal" with them (again, this could be done with any server side language). This first part is trivial. Simply edit the apache httpd.conf file to add a type (AddType) for the .ida files to establish this extension as a php mime type alias. Here is an example:
- AddType application/x-httpd-php .ida







Comments
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Nice idea but there is a flaw.
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Nice idea but there is a flaw.
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Nice idea but there is a flaw.
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Nice idea but there is a flaw.
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures
Re: Apache CodeRed Countermeasures