UPDATE - Jan 2020 The master branch over at https://github.com/PHPIDS/PHPIDS seems to be unmaintained for years. It is also broken due to a number of issues including the removal of the Log/ directory and associated PHPH files in one of the commits. I took the Log/ directory from v0.7 and made a few small modifications to get it working again. To get it up and running, follow the instructions in the Instructions section below. This has not been extensively tested so use at your own risk :)
PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application. The IDS neither strips, sanitizes nor filters any malicious input, it simply recognizes when an attacker tries to break your site and reacts in exactly the way you want it to. Based on a set of approved and heavily tested filter rules any attack is given a numerical impact rating which makes it easy to decide what kind of action should follow the hacking attempt. This could range from simple logging to sending out an emergency mail to the development team, displaying a warning message for the attacker or even ending the user’s session.
PHPIDS enables you to see who’s attacking your site and how and all without the tedious trawling of logfiles or searching hacker forums for your domain. Last but not least it’s licensed under the fair LGPL!
Make sure you have Composer installed and then run the following in the main directory:
composer dump-autoload -o
If you want to run the included example (docs/examples/example.php), you'll want to do the following:
mkdir lib/IDS/tmp
touch lib/IDS/tmp/phpids_log.txt
If you would like to contribute, please open a pull request. If you need something to do, have a look at our open issues.
The project was started by Christian Matthies ch0012@gmail.com and Mario Heiderich mario.heiderich@gmail.com. Mario spend a lot of time maintaining PHPIDS mostly on his own. Huge props for that. Currently Lars Strojny lars@strojny.net merges pull requests.
- LeverOne for his outstanding work, testing and XSS vectors from the depths of markup hell
- Kishor for providing cutting edge XSS and great help in the group
- Martin Hinks for great hints, the .NETIDS and help with false positives
- SirDarckCat for providing XSS so advanced it made us shiver
- Gareth Heyes for his help enhancing the rules and very creative XSS vectors
- Kevin Schroeder for the audit and great help on testing and enhancing the PHPIDS
- xorrer for his help optimizing the rules against his cryptic and sophisticated XSS vectors
- Johannes Dahse for his help optimizing the SQLI rules
- Roberto Salgado for helping hardening the SQLI rules with his SQL-Fu
- tx for even more outstanding SQLI stuff and almost magic PHP code injection vectors
- Giorgio Maone for redefining the word JavaScript with his vectors
- thornmaker for submitting smart and very hard to detect JavaScript concatenation vectors
- Martin Trauth for helping us with the design and giving hints on estate usability
- Ronald v.d. Heetkamp for helping on the SQLI and XSS detection issues
- Dan for helping i18n-ing the PHPIDS
- CrYpTiC_MauleR for providing great hints and XSS magic
- Robert Hansen for providing (sl|h)a.ckers.org and the XSS cheat sheet
- beford for providing great hints and esoteric but working XSS