Holes in most preg_match() filtersWednesday, April 4. 2007Wednesday, April 4. 2007 During the last week I was performing some audits and like so often it contained preg_match() filters that were not correct. Most PHP developers use ^ and $ within their regular expressions without actually reading the documentation about what they really achieve. You will find a lot of input filters like the following one. <?phpQuite common way to filter incoming data, isn't it? However the problem is, that the author of such a regular expression did not correctly read the documentation and mistakes the $ character for the definitive end of the subject. However the real meaning, as it is even documented in the PHP manual is that $ means the end of the subject OR not the real end but nearly, only followed by a single '\n' linebreak. This means that the following request will also pass the filter. http://server.tld/index.php?var=012345:XYZ%0aIn several circumstances a newline character can be dangerous. For example when you want to stop HTTP Response Splitting or Email Injection attacks. To correct the above regular expression it is necessary to add the D modifier to it that changes the meaning of the $ specifier to really mean the end of the subject. Here is the corrected example. <?phpI hope this tip helps getting rid of all these wrong filters once and for all. People using ext/filter should prepare for a recompile, too.
MOPB: First ReactionsMonday, March 5. 2007Monday, March 5. 2007 We are on day 5 of the Month of PHP Bugs, meanwhile details for 11 Vulnerabilities were disclosed, including 2 Bonus vulnerabilities covering local root vulnerabilities in the Zend Platform.
Suhosin Extension 0.9.17 releasedMonday, March 5. 2007Monday, March 5. 2007 Yesterday I released Suhosin 0.9.17 in response to a bug report by Ilia Alshanetsky and some crash problems with PHP 4 that were reported during the last weeks.
The Month of PHP Bugs - Day 1Thursday, March 1. 2007Thursday, March 1. 2007 You might have realised it already. March 2007 has begun and so has the long awaited Month of PHP Bugs. The initiative is hosted on dedicated servers, because serendipity cannot handle the traffic. You can reach it at http://www.php-security.org Open_basedir confusionThursday, February 15. 2007Thursday, February 15. 2007 From time to time I get the question why I recommend enabling open_basedir and on the other hand call it a solution flawed by design. This is actually a good question, because the untrained PHP user might get a little bit confused about this and might believe that I change my opinion on a daily basis.
Month of PHP Bugs and PHP 5.2.1Friday, February 9. 2007Friday, February 9. 2007 You might have heard about it from different places already. The Month for the "Month of PHP bugs" was choosen and it will be March. This means I will post every day in March information about one or more vulnerabilities within PHP.
Modsecurity vs. PHPTuesday, February 6. 2007Tuesday, February 6. 2007 There is a very funny posting at the modsecurity blog from yesterday that speaks a bit about the combination PHP and modsecurity. Basically the entry tries to excuse the fact that most of the modsecurity rules that are in use today to protect against known vulnerabilites can be bypassed easily by simple things like adding spaces infront of the variable name.
Wordpress Security UpdateFriday, January 5. 2007Friday, January 5. 2007 For all those not reading security mailinglists. It is time to upgrade your WordPress blog (if you are among those, not using Serendipity). Today WordPress 2.0.6 was released that fixes several security vulnerabilities. Among these security fixes are two dangerous vulnerabilities reported by us.
Universal XSS through Adobe PDF PluginWednesday, January 3. 2007Wednesday, January 3. 2007 It seems at the 23C3 Stefano Di Paola has disclosed a universal XSS vulnerability through the Adobe PDF Plugin. Due to this vulnerability it is possible to launch XSS attacks against any site having PDF files. An example is for example:
UPDATE: Just for the record. This issue has been fixed in the latest updates for the Adobe PDF Plugin.This does however not change the fact that the majority of users most probably still run vulnerable versions. Heuristic SQL Injection Detection for SuhosinThursday, December 28. 2006Thursday, December 28. 2006 Today I added a little simple SQL Injection Detection Heuristic to the development version of the Suhosin extension that can optionally log and block SQL queries. At the moment it is possible to log and/or block mysql(i) SQL queries that contain comments, comments that are not closed, queries with UNIONs or queries with multiple SELECT statements.
« previous page
(Page 3 of 10, totalling 92 entries)
» next page
|
Calendar
Archives Categories Syndicate This Blog |
|||||||||||||||||||||||||||||||||||||||||||||||||



