<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Suspekt... &#187; Projects</title>
	<atom:link href="http://www.suspekt.org/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.suspekt.org</link>
	<description>A Blog About Code, Information Security, PHP And More</description>
	<pubDate>Wed, 05 Nov 2008 15:11:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Suhosin - Picture - Logo?</title>
		<link>http://www.suspekt.org/2008/09/04/suhosin-picture-logo/</link>
		<comments>http://www.suspekt.org/2008/09/04/suhosin-picture-logo/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 00:38:33 +0000</pubDate>
		<dc:creator>Stefan Esser</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[fotos]]></category>

		<category><![CDATA[logo]]></category>

		<category><![CDATA[pictures]]></category>

		<category><![CDATA[suhosin]]></category>

		<guid isPermaLink="false">http://www.suspekt.org/?p=142</guid>
		<description><![CDATA[The first questions regarding Suhosin are where the name comes from and what it actually means. I usually explain that Suhosin is similar to a guardian angel. Some ghost or god protecting a village from dark ghosts.
Yesterday I was able to take this picture of two of the guardian ghosts that are called Suhosin over [...]]]></description>
			<content:encoded><![CDATA[<p>The first questions regarding Suhosin are where the name comes from and what it actually means. I usually explain that Suhosin is similar to a guardian angel. Some ghost or god protecting a village from dark ghosts.</p>
<p>Yesterday I was able to take this picture of two of the guardian ghosts that are called Suhosin over here in Korea. This might help designing a long overdue logo for Suhosin.</p>
<p><center><a href="http://www.suspekt.org/wp-content/uploads/2008/09/img_0170.jpg"><img class="aligncenter size-medium wp-image-143" title="Suhosin" src="http://www.suspekt.org/wp-content/uploads/2008/09/img_0170.jpg" border="1" alt="" width="225" height="300" /></a></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.suspekt.org/2008/09/04/suhosin-picture-logo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Suhosin 0.9.26 - Improved Randomness</title>
		<link>http://www.suspekt.org/2008/08/22/suhosin-0926-improved-randomness/</link>
		<comments>http://www.suspekt.org/2008/08/22/suhosin-0926-improved-randomness/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 15:27:14 +0000</pubDate>
		<dc:creator>Stefan Esser</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.suspekt.org/?p=134</guid>
		<description><![CDATA[I just released Suhosin 0.9.26 which among bugfixes contains new features. The full changelog is

Fixed problem with suhosin.perdir
Thanks to Hosteurope for tracking this down
Fixed problems with ext/uploadprogress
Reported by: Christian Stocker
Added suhosin.srand.ignore and suhosin.mt_srand.ignore (default: on)
Modified rand()/srand() to use the Mersenne Twister algorithm with separate state
Added better internal seeding of rand() and mt_rand()

The last three items [...]]]></description>
			<content:encoded><![CDATA[<p>I just released Suhosin 0.9.26 which among bugfixes contains new features. The full changelog is</p>
<ul>
<li>Fixed problem with suhosin.perdir<br />
Thanks to Hosteurope for tracking this down</li>
<li>Fixed problems with ext/uploadprogress<br />
Reported by: Christian Stocker</li>
<li>Added suhosin.srand.ignore and suhosin.mt_srand.ignore (default: on)</li>
<li>Modified rand()/srand() to use the Mersenne Twister algorithm with separate state</li>
<li>Added better internal seeding of rand() and mt_rand()</li>
</ul>
<p>The last three items in the changelog mean that the randomness of PHP&#8217;s rand() and mt_rand() functions have been greatly improved over vanilla PHP. This means when the Suhosin extension is installed on a server all the attacks described in my previous blogpost about <a href="http://www.suspekt.org/2008/08/17/mt_srand-and-not-so-random-numbers/">PHP&#8217;s random number generators</a> are no longer possible. This adds another generic protection to kill a whole class of bugs at once.</p>
<p>As usual you can grab your copy at</p>
<p><a href="http://www.suhosin.org">http://www.suhosin.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.suspekt.org/2008/08/22/suhosin-0926-improved-randomness/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MySQL-Proxy learning to block SQL-Injection</title>
		<link>http://www.suspekt.org/2008/08/15/mysql-proxy-learning-to-block-sql-injection/</link>
		<comments>http://www.suspekt.org/2008/08/15/mysql-proxy-learning-to-block-sql-injection/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 09:32:41 +0000</pubDate>
		<dc:creator>Stefan Esser</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.suspekt.org/?p=94</guid>
		<description><![CDATA[I previously reported about my joy with MySQL-Proxy and a simple SQL-Injection detection based on a simple heuristic.
Today I present the more interesting approach that I promised to publish after my webinar yesterday. This approach is based on the idea that SQL queries issued by an application always have a certain structure. This structure can [...]]]></description>
			<content:encoded><![CDATA[<p>I previously reported about <a href="http://www.suspekt.org/2008/08/05/mysql-proxy-heuristic-sql-injection-detection/">my joy with MySQL-Proxy</a> and a simple SQL-Injection detection based on a simple heuristic.</p>
<p>Today I present the more interesting approach that I promised to publish after my webinar yesterday. This approach is based on the idea that SQL queries issued by an application always have a certain structure. This structure can be learned and remembered by <a href="http://forge.mysql.com/wiki/MySQL_Proxy">MySQL-Proxy</a>. Any SQL query that has a different structure can then be considered an attack.</p>
<h3>Training Mode</h3>
<p>The first Lua script <a href="http://www.suspekt.org/downloads/learn_sql_queries.lua.gz">learn_sql_queries.lua</a> uses MySQL-Proxy&#8217;s read_query hook to catch COM_INIT_DB and COM_QUERY packets. COM_INIT_DB packets are issued when the database is changed and COM_QUERY packets contain normal queries.</p>
<p>When a change of database is detected a CREATE TABLE is injected into the communication to create a table called &#8216;allowed_queries&#8217; in the newly selected database. This table consist of only on column called &#8216;query&#8217;. Within this column normalized queries are collected.</p>
<p>When a normal query is received it is first tokenized by MySQL-Proxy&#8217;s tokenizer. The tokens are then used to recreate a normalized version of the query where all data values are replaced by the &#8216;?&#8217; placeholder. Additionally IN ( ?, ?, ?, &#8230;) statements are compressed to IN ( ? ) to allow arbitrary length IN value lists without having to learn all possibilities. The normalized query is then learned by inserting it into the table.</p>
<p>When all queries have been learned (maybe during development) the blocking mode can be started.</p>
<h3>Blocking Mode</h3>
<p>The second Lua script <a href="http://www.suspekt.org/downloads/block_unknown_queries.lua.gz">block_unknown_queries.lua</a> also uses MySQL-Proxy&#8217;s read_query hook to catch COM_INIT_DB and COM_QUERY packets.</p>
<p>When a change of database is detected a SELECT statement is injected into the communication that loads the table &#8216;allowed_queries&#8217; into a Lua-Table. The queries become the indices so that they can be found fast.</p>
<p>When a normal query is received it is first tokenized and normalized. The normalized Query is then searched in the Lua-Table which is just a key lookup. If the query is found in the table it is one of the known query structures that are allowed. The query is then executed as normally.</p>
<p>If the query is not found in the table it is either a query that was not learned by mistake or it is an SQL-Injection attack. The query is not executed and a database error &#8220;Possible SQL Injection&#8221; is returned.</p>
<p>Both proof of concept examples are released as GPL. Therefore feel free to modify them for your needs. You might prefer to just log SQL-Injection attempts instead of blocking them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suspekt.org/2008/08/15/mysql-proxy-learning-to-block-sql-injection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP 4 - Requiescat In Pace</title>
		<link>http://www.suspekt.org/2008/08/08/php-4-requiescat-in-pace/</link>
		<comments>http://www.suspekt.org/2008/08/08/php-4-requiescat-in-pace/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 08:50:44 +0000</pubDate>
		<dc:creator>Stefan Esser</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[dead]]></category>

		<category><![CDATA[rip]]></category>

		<category><![CDATA[suhosin]]></category>

		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.suspekt.org/?p=92</guid>
		<description><![CDATA[Since last night PHP 4 is finally dead&#8230;
Is it?
Well not really, because there are still millions of servers running PHP 4 that haven&#8217;t upgraded to the faster, more stable and more secure PHP 5 and most of them will continue to use it. So PHP 4 will still be around a while.
However last night PHP [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Since last night PHP 4 is finally dead&#8230;</strong></p>
<p><em>Is it?</em></p>
<p>Well not really, because there are still millions of servers running PHP 4 that haven&#8217;t upgraded to the faster, more stable and more secure PHP 5 and most of them will continue to use it. So PHP 4 will still be around a while.</p>
<p>However last night <a href="http://www.php.net/archive/2008.php#id2008-08-07-1">PHP 4.4.9</a> was released which is the final security update by the PHP development team. This means from now on not only normal support (which was dropped at the end of 2007) but also security support for PHP 4 has ended. It is therefore recommended to finally upgrade.</p>
<p>Because I know that upgrading is sometimes not that easy <a href="http://www.suhosin.org">Suhosin</a> will continue to support PHP 4 for a while. This means the current Suhosin-Patch 0.9.6 will be ported to PHP 4.4.9 and also the next release of Suhosin-Patch will still support recent PHP 4 versions. However at the end of 2008 I will also discontinue Suhosin-Patch for PHP 4 and new features to the Suhosin-Extension will only be implemented for PHP 5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suspekt.org/2008/08/08/php-4-requiescat-in-pace/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Suhosin 0.9.25</title>
		<link>http://www.suspekt.org/2008/08/06/suhosin-0925/</link>
		<comments>http://www.suspekt.org/2008/08/06/suhosin-0925/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 12:00:22 +0000</pubDate>
		<dc:creator>Stefan Esser</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.suspekt.org/?p=88</guid>
		<description><![CDATA[I just released a long overdue update to the Suhosin extension. There are only a few changes in it. The full changelog is

Fixed PHP 4 compilation problem introduced in 0.9.24
Fixed PHP 5.3 compilation problem
Changed PHP default POST handler to PHP&#8217;s current handler

As usual you can grab your copy at
http://www.suhosin.org/
]]></description>
			<content:encoded><![CDATA[<p>I just released a long overdue update to the <a href="http://www.suhosin.org">Suhosin</a> extension. There are only a few changes in it. The full changelog is</p>
<ul>
<li>Fixed PHP 4 compilation problem introduced in 0.9.24</li>
<li>Fixed PHP 5.3 compilation problem</li>
<li>Changed PHP default POST handler to PHP&#8217;s current handler</li>
</ul>
<p>As usual you can grab your copy at</p>
<p><a href="http://www.suhosin.org">http://www.suhosin.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.suspekt.org/2008/08/06/suhosin-0925/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mysql-Proxy Heuristic SQL Injection Detection</title>
		<link>http://www.suspekt.org/2008/08/05/mysql-proxy-heuristic-sql-injection-detection/</link>
		<comments>http://www.suspekt.org/2008/08/05/mysql-proxy-heuristic-sql-injection-detection/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 14:48:04 +0000</pubDate>
		<dc:creator>Stefan Esser</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[sql injection]]></category>

		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://www.suspekt.org/?p=83</guid>
		<description><![CDATA[“MySQL Proxy is a simple program that sits between your client and MySQL server(s) that can monitor, analyze or transform their communication. Its flexibility allows for unlimited uses; common ones include: load balancing; failover; query analysis; query filtering and modification; and many more.”
The flexibility of MySQL Proxy is based on the fact that every aspect [...]]]></description>
			<content:encoded><![CDATA[<p>“<a href="http://forge.mysql.com/wiki/MySQL_Proxy">MySQL Proxy</a> is a simple program that sits between your client and MySQL server(s) that can monitor, analyze or transform their communication. Its flexibility allows for unlimited uses; common ones include: load balancing; failover; query analysis; query filtering and modification; and many more.”</p>
<p>The flexibility of MySQL Proxy is based on the fact that every aspect is scriptable with <a href="http://www.lua.org">Lua</a>. Because I am new to MySQL Proxy and the <a href="http://www.lua.org">Lua</a> language I tried to implement a very simple script that waits for incoming SQL queries, tokenizes them and tries to detect SQL Injection heuristically by searching for certain disallowed SQL functions, databases, tables, statements or comments. When an SQL query is believed to contain an SQL injection is it not executed and a <em>&#8220;Possible SQL injection&#8221;</em> error is returned.</p>
<p>You can grab the detect_sql_injection.lua script at</p>
<p><a href="http://www.suspekt.org/downloads/detect_sql_injection.lua.gz">http://www.suspekt.org/downloads/detect_sql_injection.lua.gz</a></p>
<p>If you are interested in this and german speaking you might also be interested in next week&#8217;s MySQL webinar <a href="http://www.mysql.de/news-and-events/web-seminars/display-171.html">&#8220;Bau sicherer LAMP Anwendungen&#8221;</a> where I will not only discuss this little Lua script but also another one that implements SQL injection detection by query structure learning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suspekt.org/2008/08/05/mysql-proxy-heuristic-sql-injection-detection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Switch Table Extension</title>
		<link>http://www.suspekt.org/2008/07/31/switch-table-extension/</link>
		<comments>http://www.suspekt.org/2008/07/31/switch-table-extension/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 19:32:13 +0000</pubDate>
		<dc:creator>Stefan Esser</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.suspekt.org/?p=56</guid>
		<description><![CDATA[A quite long time ago I stopped blogging in my previous blog at php-security.org because I wanted to move to a new domain to be able to finally blog about other things than PHP (or web application) security. Now after months of silence I start a new blog over here at suspekt.org that will no [...]]]></description>
			<content:encoded><![CDATA[<p>A quite long time ago I stopped blogging in my previous blog at <a href="http://blog.php-security.org">php-security.org</a> because I wanted to move to a new domain to be able to finally blog about other things than PHP (or web application) security. Now after months of silence I start a new blog over here at <a href="http://www.suspekt.org">suspekt.org</a> that will no longer concentrate on PHP security but also cover other topics that interest me.</p>
<p>Today I start with announcing the <a href="http://www.suspekt.org/switchtable/">Switch Table Extension</a> that I released yesterday with a short announcement on the PHP Internals mailinglist. The purpose of this experimental extension is to speed up the execution of repeated <em>switch()</em> statements. To understand how this achieved and why this is necessary read the documentation <a href="http://www.suspekt.org/switchtable/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suspekt.org/2008/07/31/switch-table-extension/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
