<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Modsecurity on Inliniac</title>
    <link>https://inliniac.net/blog/category/modsecurity/</link>
    <description>Recent content in Modsecurity on Inliniac</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 30 Jun 2010 08:47:54 +0000</lastBuildDate>
    <atom:link href="https://inliniac.net/blog/category/modsecurity/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Ohloh</title>
      <link>https://inliniac.net/blog/2010/06/30/ohloh/</link>
      <pubDate>Wed, 30 Jun 2010 08:47:54 +0000</pubDate>
      <guid>https://inliniac.net/blog/2010/06/30/ohloh/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.ohloh.net/&#34;&gt;Ohloh&lt;/a&gt; is a pretty cool site for keeping track of projects and programmers. It&amp;rsquo;s an easy way to keep track of the development in a project and gives a nice indication of how actively it&amp;rsquo;s being developed. It has some social networkish features too, such as individual developers giving each other &amp;ldquo;kudos&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;The code analysis is pretty nice: it gives statistics on code base size, growth, comment ratio, languages used, etc. Per developer it tracks quite a few stats as well.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Removing Trac ticket comment spam in Debian Lenny</title>
      <link>https://inliniac.net/blog/2010/04/23/removing-trac-ticket-comment-spam-in-debian-lenny/</link>
      <pubDate>Fri, 23 Apr 2010 10:23:20 +0000</pubDate>
      <guid>https://inliniac.net/blog/2010/04/23/removing-trac-ticket-comment-spam-in-debian-lenny/</guid>
      <description>&lt;p&gt;The Vuurmuur website runs Trac and overall I&amp;rsquo;m pretty happy with it. The only thing that Trac doesn&amp;rsquo;t do well, is dealing with spammers. Spammers target Trac a lot, so that&amp;rsquo;s a real problem.&lt;/p&gt;&#xA;&lt;p&gt;To prevent spammers from making it through, I run &lt;a href=&#34;http://projects.otaku42.de/wiki/ScallyWhack&#34;&gt;Scallywhack&lt;/a&gt; and a number of custom ModSecurity rules. So far, spams only made it through as new tickets in the ticket tracker, so I installed the &lt;a href=&#34;http://trac-hacks.org/wiki/TicketDeletePlugin&#34;&gt;TicketDeletePlugin&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Yesterday, I saw the first spam as a comment to an existing and valid ticket. Like tickets themselves, ticket comments can not be removed by Trac by default. Luckily, upstream Trac seems to have fixed this. I&amp;rsquo;m running Debian&amp;rsquo;s version of Trac 0.11.1 however, so I decided to patch that. The patches in the Trac ticket &lt;a href=&#34;http://trac.edgewall.org/ticket/454&#34;&gt;#454&lt;/a&gt; didn&amp;rsquo;t apply cleanly, so I had to patch it manually. To save others the work, it&amp;rsquo;s available here: &lt;a href=&#34;http://www.inliniac.net/files/trac_0.11.1-debian-comment_edit.patch&#34;&gt;http://www.inliniac.net/files/trac_0.11.1-debian-comment_edit.patch&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Book review: Magnus Mischel - ModSecurity 2.5</title>
      <link>https://inliniac.net/blog/2010/03/31/book-review-magnus-mischel-modsecurity-2-5/</link>
      <pubDate>Wed, 31 Mar 2010 13:15:38 +0000</pubDate>
      <guid>https://inliniac.net/blog/2010/03/31/book-review-magnus-mischel-modsecurity-2-5/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s been quite a while since I received my review copy of Magnus Mischel&amp;rsquo;s ModSecurity book titled &amp;ldquo;ModSecurity 2.5&amp;rdquo; but I finally found the time to read it and write up my review. As the title suggest it&amp;rsquo;s a book about the ModSecurity Web Application Firewall (WAF) module for Apache and about version 2.5 of it specifically. There are some books about the 1.x series of ModSecurity. It&amp;rsquo;s great that there is a book about the 2.x ModSecurity series now as ModSecurity 2.x is very different from the 1.x series.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Extracting bad url&#39;s from ModSecurity events in Sguil</title>
      <link>https://inliniac.net/blog/2009/01/15/extracting-bad-urls-from-modsecurity-events-in-sguil/</link>
      <pubDate>Wed, 14 Jan 2009 23:53:08 +0000</pubDate>
      <guid>https://inliniac.net/blog/2009/01/15/extracting-bad-urls-from-modsecurity-events-in-sguil/</guid>
      <description>&lt;p&gt;Running a PHP based blog, I see a lot of attempts to include code hosted elsewhere in requests. A long time ago I added a simple rule to block one type of the these attempts. A typical attempt looks like this:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;GET /blog/category/index.php?page=http://www.djrady.ru/includes/conf.txt?? HTTP/1.1&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Notice the trailing questionmarks? Turns out these are always present, so very easy to block on. I&amp;rsquo;m doing that for a long time now, never seen a single false positive. The rule looks like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Wordpress version 2.6 &amp;amp; ModSecurity</title>
      <link>https://inliniac.net/blog/2008/07/16/wordpress-version-26-modsecurity/</link>
      <pubDate>Wed, 16 Jul 2008 16:29:25 +0000</pubDate>
      <guid>https://inliniac.net/blog/2008/07/16/wordpress-version-26-modsecurity/</guid>
      <description>&lt;p&gt;Today I updated my Wordpress installation to version 2.6. The upgrade went smooth as usual. However afterwards I couldn&amp;rsquo;t login anymore because one of my ModSecurity rules was triggered at the login. Turns out the Wordpress developers changed the use of the &amp;lsquo;redirect_to&amp;rsquo; argument in wp-login.php. Wordpress uses it to redirect the browser to some part of the weblog software after a successful login. Some time ago there used to be a vulnerability in Wordpress as described here: &lt;a href=&#34;http://www.securityfocus.com/archive/1/463291&#34;&gt;http://www.securityfocus.com/archive/1/463291&lt;/a&gt;. To prevent exploitation on my box at the time I created the following rule:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Update to Modsec2sguil</title>
      <link>https://inliniac.net/blog/2008/03/26/update-to-modsec2sguil/</link>
      <pubDate>Wed, 26 Mar 2008 12:57:13 +0000</pubDate>
      <guid>https://inliniac.net/blog/2008/03/26/update-to-modsec2sguil/</guid>
      <description>&lt;p&gt;Yesterday the much anticipated Sguil 0.7.0 final was released, as was announced &lt;a href=&#34;http://sguil.sourceforge.net/news.html&#34;&gt;here&lt;/a&gt;. I&amp;rsquo;ve updated Modsec2sguil to support it. Next to this Ryan Cummings sent me a patch for supporting ModSecurity 2.5. So that is included as well. I haven&amp;rsquo;t given it much testing yet, but works on my boxes.&lt;/p&gt;&#xA;&lt;p&gt;Get the new release here: &lt;a href=&#34;http://www.inliniac.net/modsec2sguil/&#34;&gt;http://www.inliniac.net/modsec2sguil/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Thank you Ryan for your contribution!&lt;/p&gt;</description>
    </item>
    <item>
      <title>New security weblog by Ivan Ristic</title>
      <link>https://inliniac.net/blog/2008/01/22/new-security-weblog-by-ivan-ristic/</link>
      <pubDate>Tue, 22 Jan 2008 11:40:04 +0000</pubDate>
      <guid>https://inliniac.net/blog/2008/01/22/new-security-weblog-by-ivan-ristic/</guid>
      <description>&lt;p&gt;I just noticed that ModSecurity developer Ivan Ristic has started a new blog on computer security and open source. Check it out here: &lt;a href=&#34;http://blog.ivanristic.com/&#34;&gt;http://blog.ivanristic.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Great idea Ivan! :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity rules for Tikiwiki 1.x tiki-graph_formula.php Function Injection Vulnerability</title>
      <link>https://inliniac.net/blog/2007/10/11/modsecurity-rule-for-tikiwiki-tiki-graph_formulaphp-function-injection-vulnerability/</link>
      <pubDate>Thu, 11 Oct 2007 11:13:44 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/10/11/modsecurity-rule-for-tikiwiki-tiki-graph_formulaphp-function-injection-vulnerability/</guid>
      <description>&lt;p&gt;A new vulnerability has been found in Tikiwiki. Read more about it &lt;a href=&#34;http://secunia.com/advisories/27190/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve created the following ModSecurity rule to block it.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;SecDefaultAction &amp;ldquo;log,deny,phase:2,status:403,t:urlDecodeUni,t:lowercase&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;SecRule REQUEST_FILENAME &amp;ldquo;tiki-graph_formula.php&amp;rdquo; &amp;ldquo;chain,msg:&amp;lsquo;TIKIWIKI tiki-graph_formula.php link inclusion attempt&amp;rsquo;,severity:2&amp;rdquo;&#xA;SecRule ARGS:/^s*[a-z]+$/ &amp;ldquo;^(ht|f)tps?://&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;SecRule REQUEST_FILENAME &amp;ldquo;tiki-graph_formula.php&amp;rdquo; &amp;ldquo;chain,msg:&amp;lsquo;TIKIWIKI tiki-graph_formula.php f parameter Function Injection Vulnerability&amp;rsquo;,severity:2&amp;rdquo;&#xA;SecRule ARGS_NAMES &amp;ldquo;^s*f[.*]$&amp;rdquo;&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Ivan, I hope these rules survive your scrutiny ;-)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Updated at 13:50&lt;/strong&gt;: The first rule only covered the file inclusion in the title parameter which was what I was seeing in my logs. These rules should cover both the inclusion and the injection.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity rule for Tikiwiki XSS</title>
      <link>https://inliniac.net/blog/2007/08/27/modsecurity-rule-for-tikiwiki-xss/</link>
      <pubDate>Mon, 27 Aug 2007 15:06:22 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/08/27/modsecurity-rule-for-tikiwiki-xss/</guid>
      <description>&lt;p&gt;I just read about a Tikiwiki XSS here. Since the Vuurmuur wiki runs Tikiwiki I created a ModSecurity rule for it:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;SecDefaultAction &amp;ldquo;log,deny,phase:2,status:403,t:urlDecodeUni,t:lowercase&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;# XSS in remind password field&#xA;SecRule REQUEST_METHOD &amp;ldquo;^post$&amp;rdquo; &amp;ldquo;chain,msg:&amp;lsquo;TIKIWIKI lost password XSS&amp;rsquo;&amp;rdquo;&#xA;SecRule REQUEST_FILENAME &amp;ldquo;tiki-remind_password.php&amp;rdquo; &amp;ldquo;chain&amp;rdquo;&#xA;SecRule ARGS:/s*username/ &amp;ldquo;!^(:?[a-z0-9-_]{1,37})$&amp;rdquo;&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;This allows only valid usernames to be entered.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Ivan Ristic privately pointed me at some possible problems with the rule:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;the escaping of the - and _ chars is not needed, although it seems to be harmless.&lt;/li&gt;&#xA;&lt;li&gt;the $ at the end of the filename is dangerous, because Apache treats tiki-remind_password.php/xxx as tiki-remind_password.php. In this case the rule is evaded.&lt;/li&gt;&#xA;&lt;li&gt;PHP (which Tikiwiki uses) ignores leading spaces in request arguments. So it treats &amp;rsquo; username&amp;rsquo; the same as &amp;lsquo;username&amp;rsquo;. The rule needs to deal with that.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Thanks for your feedback Ivan!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Modsec2sguil for HTTP transaction logging</title>
      <link>https://inliniac.net/blog/2007/08/15/using-modsec2sguil-for-http-transaction-logging/</link>
      <pubDate>Wed, 15 Aug 2007 13:05:08 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/08/15/using-modsec2sguil-for-http-transaction-logging/</guid>
      <description>&lt;p&gt;Modsec2sguil is currently configured to send alerts to Sguil. ModSecurity can be configured to log any event or transaction, including 200 OK, 302 Redirect, etc. Modsec2sguil distinguishes between alerts and other events by only processing HTTP codes of 400 and higher. Since 0.8-dev2 there is a configuration directive to prevent certain codes, such as 404, from being treated as an alert.&lt;/p&gt;&#xA;&lt;p&gt;Now I have the following idea. Since ModSecurity can log all events with details of request headers, response headers and POST message body, it may be interesting to just send all these events to Sguil. They should not be appearing as alerts, but having them in the database can perhaps be interesting. I know using flow data and full packet captures the same data can be accessed, but having it in the database makes querying it a lot easier and longer available.&lt;/p&gt;</description>
    </item>
    <item>
      <title>First Modsec2sguil release for Sguil 0.7-CVS</title>
      <link>https://inliniac.net/blog/2007/08/14/first-modsec2sguil-release-for-sguil-07-cvs/</link>
      <pubDate>Mon, 13 Aug 2007 22:00:29 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/08/14/first-modsec2sguil-release-for-sguil-07-cvs/</guid>
      <description>&lt;p&gt;I just uploaded a new version of Modsec2sguil. I&amp;rsquo;ve been working on it the last weeks to get it updated to Sguil 0.7. The scripts are changed all over the place. This is because in the 0.7 framework, my scripts would no longer be a replacement for Barnyard only talking to the sensor_agent on the localhost, instead now it would become a full agent talking to the Sguil server directly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sguil 0.7 CVS installation on Debian Etch</title>
      <link>https://inliniac.net/blog/2007/06/12/sguil-07-cvs-installation-on-debian-etch/</link>
      <pubDate>Tue, 12 Jun 2007 21:58:51 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/06/12/sguil-07-cvs-installation-on-debian-etch/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://sguil.sourceforge.net/&#34;&gt;Sguil&lt;/a&gt; 0.7 is getting shape quite nicely. One of the most interesting new features is the splitting up of different types of agents and the option to create &amp;rsquo;net groups&amp;rsquo;. This are groups of agents that Sguil considers part of the same network. You can use this to spread the agents over multiple servers, but still use it from Sguil as if it was one single sensor. For example, this way you can easily create a Snort sensor and a separate full content logging capture server. When you request the full content for a Snort event in Sguil, it will know that it needs to request the packet data from the capture server. This way you can also have multiple Snort agents without the need for capturing the same sancp and full content data over and over again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity IRC channel</title>
      <link>https://inliniac.net/blog/2007/05/16/modsecurity-irc-channel/</link>
      <pubDate>Wed, 16 May 2007 09:29:44 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/05/16/modsecurity-irc-channel/</guid>
      <description>&lt;p&gt;Since a few weeks there is an active IRC channel for ModSecurity. It&amp;rsquo;s hosted on the Freenode network. The channelname is #modsecurity.&lt;/p&gt;&#xA;&lt;p&gt;Join us there! :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running IPv6 with Freenet6 when on the road</title>
      <link>https://inliniac.net/blog/2007/03/27/running-ipv6-with-freenet6-when-on-the-road/</link>
      <pubDate>Tue, 27 Mar 2007 18:25:33 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/03/27/running-ipv6-with-freenet6-when-on-the-road/</guid>
      <description>&lt;p&gt;I wrote about my experiments with IPv6 before. These were done for my home network where I have an ISP that offers an IPv6 tunnel broker. The last two months I have not been in my home, but instead using internet &amp;lsquo;on the road&amp;rsquo; mostly through wireless LANs. There are a number of techniques for using IPv6 if your provider doesn&amp;rsquo;t offer it, and today I stumbled on one in &lt;a href=&#34;http://www.networkworld.com/news/2007/032607-hexago-ipv6.html&#34;&gt;this NetworkWorld article&lt;/a&gt;, so I decided to give it a try.&lt;/p&gt;</description>
    </item>
    <item>
      <title>New WordPress issue &#43; Snort and ModSecurity rules</title>
      <link>https://inliniac.net/blog/2007/03/20/new-wordpress-issue-modsecurity-rule/</link>
      <pubDate>Tue, 20 Mar 2007 18:03:21 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/03/20/new-wordpress-issue-modsecurity-rule/</guid>
      <description>&lt;p&gt;I just read about a new issue with &lt;a href=&#34;http://www.wordpress.org/&#34;&gt;WordPress&lt;/a&gt; &lt;a href=&#34;http://www.securityfocus.com/archive/1/463291&#34;&gt;here&lt;/a&gt; at SecurityFocus. It&amp;rsquo;s a potential credential stealing vulnerability, so I quickly created these &lt;a href=&#34;http://www.modsecurity.org&#34;&gt;ModSecurity&lt;/a&gt; 2 rules:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;SecDefaultAction &amp;ldquo;log,deny,status:403,phase:2,t:lowercase,t:escapeSeqDecode&amp;rdquo;&lt;/strong&gt;&#xA;&lt;strong&gt;SecRule REQUEST_FILENAME &amp;ldquo;/wp-login.php$&amp;rdquo; &amp;ldquo;chain,msg:&amp;lsquo;WORDPRESS wp-login.php redirect_to credentials stealing attempt&amp;rsquo;,severity:2,t:normalisePath&amp;rdquo;&lt;/strong&gt;&#xA;&lt;strong&gt;SecRule ARGS_NAMES &amp;ldquo;^redirect_to$&amp;rdquo; &amp;ldquo;chain&amp;rdquo;&lt;/strong&gt;&#xA;&lt;strong&gt;SecRule ARGS:redirect_to &amp;ldquo;(ht|f)tps?://&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I can still login to my WordPress install, so it seems that the rule does no harm. Use at your own risk!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: I&amp;rsquo;ve created a Snort rule as well:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Modsec2sguil 0.7 released</title>
      <link>https://inliniac.net/blog/2007/03/18/modsec2sguil-07-released/</link>
      <pubDate>Sun, 18 Mar 2007 10:41:28 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/03/18/modsec2sguil-07-released/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve just released version 0.7 of Modsec2sguil, the set of perl scripts to feed ModSecurity alerts to the Sguil NSM system. The main change of this release is that it adds support for alerts produced by ModSecurity 2.x, while 1.9.x remains to be supported. Next to this the conversion between ModSecurity&amp;rsquo;s severity and Snort&amp;rsquo;s priority was fixed, so alerts should show up in the right pane in Sguil again.&lt;/p&gt;&#xA;&lt;p&gt;Please give this release a try and let me know how it works for you!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Experimenting with IPv6</title>
      <link>https://inliniac.net/blog/2007/03/13/experimenting-with-ipv6/</link>
      <pubDate>Tue, 13 Mar 2007 19:04:51 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/03/13/experimenting-with-ipv6/</guid>
      <description>&lt;p&gt;My &lt;a href=&#34;http://www.xs4all.nl/&#34;&gt;ISP&lt;/a&gt; is one of the few here in the Netherlands that provides a IPv6 tunnel broker. I have played with it some during the last year or so, but now decided to get a little more serious with it. So I&amp;rsquo;ve decided to enable it for my blog. When opening up my site to IPv6 one thing that is important is security. I will describe the status of IPv6 support of my current setup:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity evasion vulnerability</title>
      <link>https://inliniac.net/blog/2007/03/06/modsecurity-evasion-vulnerability/</link>
      <pubDate>Tue, 06 Mar 2007 17:35:09 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/03/06/modsecurity-evasion-vulnerability/</guid>
      <description>&lt;p&gt;ModSecurity author Ivan Ristic just reported that a ModSecurity evasion vulnerability has been published without him being notified in advance, so there is no update available yet. Check &lt;a href=&#34;http://permalink.gmane.org/gmane.comp.apache.mod-security.user/2697&#34;&gt;here&lt;/a&gt; for his announcement. And &lt;a href=&#34;http://www.php-security.org/MOPB/BONUS-12-2007.html&#34;&gt;here&lt;/a&gt; for the advisory. Ivan Ristic suggests everyone to use this workaround until an updated version of ModSecurity is released (put on a single line):&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;SecRule REQUEST_BODY &amp;ldquo;@validateByteRange 1-255&amp;rdquo; &amp;ldquo;log,deny,phase:2,t:none,msg:&amp;lsquo;ModSecurity ASCIIZ Evasion Attempt&amp;rsquo;&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve been using that rule for an hour or so, and have seen no false positives so far.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Update on using realtime blacklists with ModSecurity</title>
      <link>https://inliniac.net/blog/2007/03/01/update-on-using-realtime-blacklists-with-modsecurity/</link>
      <pubDate>Thu, 01 Mar 2007 08:04:55 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/03/01/update-on-using-realtime-blacklists-with-modsecurity/</guid>
      <description>&lt;p&gt;A few days ago I posted a blog article about stopping comment spam with ModSecurity using realtime blacklists (rbl). While the approach was working, I noted having problems with rules when I tried to match on POST methods in HTTP requests.&lt;/p&gt;&#xA;&lt;p&gt;Luckily, ModSecurity creator Ivan Ristic was quick to point out where the problem is. I&amp;rsquo;m using the Core Ruleset for ModSecurity, and one thing that ruleset does is use the &amp;rsquo;lowercase&amp;rsquo; transformation. This converts all text from arguments to lowercase, so my ^POST$ match would never be able to match. So like Ivan suggested, using ^post$ solved this part.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Blocking comment spam using ModSecurity and realtime blacklists</title>
      <link>https://inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists/</link>
      <pubDate>Thu, 22 Feb 2007 22:25:45 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists/</guid>
      <description>Spammers are known to use compromised hosts from all over the world to send their messages. Many people are blocking or scoring email spam based on realtime blacklist (rbl), which contain ipaddresses of these known bad hosts. In my experience this works fairly well for email. A while ago I noticed in the ModSecurity documentation for version 2.0 that ModSecurity features an operator called &lt;a href=&#34;http://modsecurity.org/documentation/modsecurity-apache/2.1.0-rc6/html-multipage/08-operators.html#N11490&#34;&gt;rbl&lt;/a&gt;, that can be used to check the ipaddress of a visitor with a rbl. So I decided to see if I could use the realtime blacklists to prevent comment spam on my blog. Turns out this works great! In this post I&amp;rsquo;ll show how to get it working.</description>
    </item>
    <item>
      <title>Migrating from ModSecurity 1.9.4 to 2.0.4</title>
      <link>https://inliniac.net/blog/2007/01/20/migrating-from-modsecurity-194-to-204/</link>
      <pubDate>Sat, 20 Jan 2007 10:34:05 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/01/20/migrating-from-modsecurity-194-to-204/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.modsecurity.org/&#34;&gt;ModSecurity&lt;/a&gt; 2 has been out for a while now, and although I have played with it some, I never found some time to upgrade my own servers. The upgrading generally went quite smooth, even though ModSecurity 2 changed quite a bit.&lt;/p&gt;&#xA;&lt;p&gt;First of all there are now 5 phases where you can filter. Actually, one of them only applies to the logging, so you can filter in 4 phases. The phases are headers and body for both request and response traffic. Filtering on specific URIs can be done in phase 1 (request headers), while inspecting a POST payload requires phase 2 (request body).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rules for reported Tikiwiki vulnerabilities</title>
      <link>https://inliniac.net/blog/2006/11/02/rules-for-reported-tikiwiki-vulnerabilities/</link>
      <pubDate>Thu, 02 Nov 2006 11:02:52 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/11/02/rules-for-reported-tikiwiki-vulnerabilities/</guid>
      <description>&lt;p&gt;Yesterday there was a mail to the bugtraq mailinglist about two types of vulnerabilties in Tikiwiki 1.9.5. The most serious is a claimed MySQL password disclosure through a special URI. The second is an XSS, also through an special URI. The message can be found &lt;a href=&#34;http://www.securityfocus.com/archive/1/450268/30/0&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I wrote &amp;lsquo;claimed password disclosure&amp;rsquo;, because on the Tikiwiki server I run, I could not reproduce it. With that I mean the password disclosure, since I do see that Tikiwiki gives an error that reveals other information, most notably the location of the website on the local filesystem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Modsec2sguil 0.6 released</title>
      <link>https://inliniac.net/blog/2006/10/07/modsec2sguil-06-released/</link>
      <pubDate>Fri, 06 Oct 2006 22:01:16 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/10/07/modsec2sguil-06-released/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve just release a new version of modsec2sguil, the set of Perl scripts that feeds ModSecurity alerts to Sguil. No new features, but many changes &amp;lsquo;under the hood&amp;rsquo;. I&amp;rsquo;ve created two modules, ModsecAlert and SguilBarnyardComms. These can be used in a Object Oriented way to parse ModSecurity events and communitcate a Sguil sensor agent.&lt;/p&gt;&#xA;&lt;p&gt;It would be interesting to see if the SguilBarnyardComms module could be connected with the work of Jason Brevnik of SourceFire, who wrote a &lt;a href=&#34;http://cerberus.sourcefire.com/~jbrvenik/unified_perl/&#34;&gt;Barnyard replacement&lt;/a&gt; in Perl. If I have some spare time, I will have a look at this.&lt;/p&gt;</description>
    </item>
    <item>
      <title>First (beta) release of modsec2sguil 0.5</title>
      <link>https://inliniac.net/blog/2006/09/20/first-beta-release-of-modsec2sguil-05/</link>
      <pubDate>Wed, 20 Sep 2006 20:26:03 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/09/20/first-beta-release-of-modsec2sguil-05/</guid>
      <description>&lt;p&gt;I have been writing about getting ModSecurity alerts into Sguil before. Today I can finally release a first public version. It&amp;rsquo;s pretty crude, but it WorksForMe(tm).&lt;/p&gt;&#xA;&lt;p&gt;The release can be found &lt;a href=&#34;http://www.inliniac.net/files/modsec2sguil-0.5.tar.gz&#34;&gt;here&lt;/a&gt;. If you are interested, please try it. There is some documentation in the archive.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sguil: adding support for ModSecurity alerts, continued</title>
      <link>https://inliniac.net/blog/2006/09/08/sguil-adding-support-for-mod_security-alerts-continued/</link>
      <pubDate>Thu, 07 Sep 2006 22:19:34 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/09/08/sguil-adding-support-for-mod_security-alerts-continued/</guid>
      <description>&lt;p&gt;After the successful test with the Perl script to add ModSecurity alerts to Sguil, I have been working on a more robust implementation, also in Perl. Let me first describe the basic setup. The setup works with two scripts. The first places links to event files into a special queue directory. The second reads the links from that directory, parses them and sends the alerts among these events to Sguil. After that, the links are removed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity: rule for latest Tikiwiki vulnerability</title>
      <link>https://inliniac.net/blog/2006/09/06/mod_security-rule-for-latest-tikiwiki-vulnerability/</link>
      <pubDate>Wed, 06 Sep 2006 13:02:57 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/09/06/mod_security-rule-for-latest-tikiwiki-vulnerability/</guid>
      <description>&lt;p&gt;A few days ago a new vulnerability was &lt;a href=&#34;http://isc.sans.org/diary.php?storyid=1672&#34;&gt;reported&lt;/a&gt; in &lt;a href=&#34;http://tikiwiki.org/tiki-index.php&#34;&gt;Tikiwiki&lt;/a&gt; 1.9.x, the software I use for the Vuurmuur Wiki. Luckily, the Snort.org Community rules quickly had &lt;a href=&#34;http://www.snort.org/pub-bin/snortnews.cgi#506&#34;&gt;a rule for detecting&lt;/a&gt; the attack. Because I also run ModSecurity on the webserver, i wanted to have protection there as well. This rule should block the attack:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;SecFilterSelective POST_PAYLOAD &amp;ldquo;jhot.php&amp;rdquo; &amp;ldquo;log,deny,status:403,msg:&amp;lsquo;LOCAL tikiwiki jhot.php attempt&amp;rsquo;&amp;rdquo;&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s see if I ever get a hit on it. An update for Tikiwiki as been released, so that should fix the issue completely.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sguil: adding support for ModSecurity alerts</title>
      <link>https://inliniac.net/blog/2006/08/30/sguil-adding-support-for-mod_security-alerts/</link>
      <pubDate>Wed, 30 Aug 2006 20:14:45 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/08/30/sguil-adding-support-for-mod_security-alerts/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m a huge fan of both Sguil and ModSecurity, but sadly the alerts generated by ModSecurity can&amp;rsquo;t show up in Sguil&amp;hellip; or&amp;hellip; can they? Well, if it all works out, soon they can!&lt;/p&gt;&#xA;&lt;p&gt;Today I have hacked together a perl script that emulates barnyard for ModSecurity. It very much in a proof-of-concept phase, but it somewhat works already, at least good enough so i can show this screenshot.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;http://www.inliniac.net/blog/blog/wp-content/uploads/2006/08/modsec_sguil_excerpt.png&#34; alt=&#34;Sguil screenshot showing experimental Mod_Security support&#34;&gt;&#xA;Nice huh? It is not ready for release yet, but when it is i&amp;rsquo;ll announce it here. I plan to release it under the GPL. Sguil author Bamm Visscher told me that the next release of Sguil will have support for having barnyard and PADS on the same sensor. By then, i hope that ModSecurity can be added to that list! :-)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sguil: using advanced queries to get more info on Snort events</title>
      <link>https://inliniac.net/blog/2006/08/28/sguil-using-advanced-queries-to-get-more-info-on-snort-events/</link>
      <pubDate>Mon, 28 Aug 2006 21:21:54 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/08/28/sguil-using-advanced-queries-to-get-more-info-on-snort-events/</guid>
      <description>&lt;p&gt;Today, &lt;a href=&#34;http://infosecpotpourri.blogspot.com/&#34;&gt;David Bianco&lt;/a&gt; showed me a way of creating SQL queries that I didn&amp;rsquo;t even know was possible. This is a technique with which it is possible to query the payload of Snort events in the Sguil database. These payloads are stored by Snort when it alerts and is the payload the actual rule triggered on. David showed a nice example of retrieving url&amp;rsquo;s for PHP url inclusion attacks.&lt;/p&gt;&#xA;&lt;p&gt;I have written before about my usage of Mod_Security. I let Mod_Security respond with a 403 Forbidden message. Sadly, the alert generated by Mod_Security can not be displayed in Sguil. As somewhat of a replacement for that, I let Snort alert on the 403 Forbidden messages, so i can see in Sguil that Mod_Security blocked something. The disadvantage of this is that the 403 alert in itself does not contain much info. The sheer number of 403&amp;rsquo;s makes inspecting every single one with requesting a transcript a bit to much work.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity: rules against comment spam</title>
      <link>https://inliniac.net/blog/2006/08/23/mod_security-rules-against-comment-spam/</link>
      <pubDate>Wed, 23 Aug 2006 08:07:40 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/08/23/mod_security-rules-against-comment-spam/</guid>
      <description>&lt;p&gt;Lately the &lt;a href=&#34;http://wiki.vuurmuur.org/&#34;&gt;wiki&lt;/a&gt; of my &lt;a href=&#34;http://www.vuurmuur.org/&#34;&gt;Vuurmuur project&lt;/a&gt; has been receiving quite a lot of comment spam. Although removing the spam manually is boring work, i still don&amp;rsquo;t really mind the spam, because it enables me to practice with ModSecurity rules to fight it off. So far, the spam seems to be following a pattern, in which the spam is posted by bots, and has the same general layout for longer periods of time. That makes it worthwhile to spend time on creating rules against it. Yesterday a new type of spam emerged on the wiki. The following audit_log is for one of them. I had to slightly edit it for layout reasons.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity: more security by obscurity</title>
      <link>https://inliniac.net/blog/2006/08/17/mod_security-more-security-by-obscurity/</link>
      <pubDate>Thu, 17 Aug 2006 07:27:13 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/08/17/mod_security-more-security-by-obscurity/</guid>
      <description>&lt;p&gt;Yesterday, Philippe Baumgart showed me that my obscurity setup is not yet perfect. In fact, he could very easily enter an URL that didn&amp;rsquo;t exist and caused the webserver behind my proxy to respond with a 404. In this 404 the name and the version of the webserver were exposed.&lt;/p&gt;&#xA;&lt;p&gt;After some testing i found that adding the following to my config worked very well.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;# enable output scanning in Mod Security.&#xA;SecFilterScanOutput On&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity: further improvements to the reverse proxy</title>
      <link>https://inliniac.net/blog/2006/08/14/mod_security-further-improvements-to-the-reverse-proxy/</link>
      <pubDate>Mon, 14 Aug 2006 08:52:55 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/08/14/mod_security-further-improvements-to-the-reverse-proxy/</guid>
      <description>&lt;p&gt;People can reach my webserver in three ways: by my domain inliniac.net, by the hostname connected to my dsl, and by my ipaddress. What i now wanted is setup the proxy in such a way, that only people visiting inliniac.net would be proxied to the webserver.&lt;/p&gt;&#xA;&lt;p&gt;Blocking requests that are IP based instead of name based have an important advantage. IP based requests are mostly used by scantools and other forms of malicious traffic that just attempt connecting to port 80 on large IP-ranges. So this way one should be able to keep a lot of crap like worm traffic out.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity: redirection</title>
      <link>https://inliniac.net/blog/2006/08/09/mod_security-redirection/</link>
      <pubDate>Tue, 08 Aug 2006 22:09:50 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/08/09/mod_security-redirection/</guid>
      <description>&lt;p&gt;Another nice feature of ModSecurity is rule based redirection. Lets say i want to block visitors of my website from opening the login page of wordpress, /blog/wp-login.php. I could of course just deny access to it, so the visitor gets a 403 error. This works fine, however sometimes you might want to use a more userfriendly message, for example: &amp;lsquo;Due to maintainance logins are currently disabled&amp;rsquo;.&lt;/p&gt;&#xA;&lt;p&gt;To do this i first created a very simple html file called nologin.html, and placed it in the webroot of the server. Then i added the following rules to Mod_Security:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity: directory hiding a.k.a. security by obscurity</title>
      <link>https://inliniac.net/blog/2006/08/06/mod_security-directory-hiding-aka-security-by-obscurity/</link>
      <pubDate>Sun, 06 Aug 2006 20:24:07 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/08/06/mod_security-directory-hiding-aka-security-by-obscurity/</guid>
      <description>&lt;p&gt;Ok, that&amp;rsquo;s a bit misleading, because i&amp;rsquo;m not just hiding, but also blocking and logging. What i wanted is this: I&amp;rsquo;m running awstats on my reverse proxy, but i don&amp;rsquo;t want anyone to know. So i just made the entire &amp;lsquo;cgi-bin&amp;rsquo; part forbidden for everyone, so that covers the script. The fact that my webserver has a cgi-bin directory is nothing special and won&amp;rsquo;t tell you i&amp;rsquo;m using awstats. However, awstats also uses icons, and these are by default in /awstats-icon/&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity: setting up a reverse proxy</title>
      <link>https://inliniac.net/blog/2006/08/05/mod_security-setting-up-a-reverse-proxy/</link>
      <pubDate>Sat, 05 Aug 2006 13:35:49 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/08/05/mod_security-setting-up-a-reverse-proxy/</guid>
      <description>&lt;p&gt;A few weeks ago i wrote that i wanted to investigate setting up a reverse web proxy with mod_security. I have now finally found a little time to do so. What surprised me was how easy it actually is!&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;lt;IfModule mod_proxy.c&amp;gt;&lt;/p&gt;&#xA;&lt;p&gt;#turning ProxyRequests on and allowing proxying from all may allow&#xA;#spammers to use your proxy to send email.&lt;/p&gt;&#xA;&lt;p&gt;ProxyRequests Off&lt;/p&gt;&#xA;&lt;p&gt;&amp;lt;Proxy *&amp;gt;&#xA;Order deny,allow&#xA;Allow from all&#xA;#Allow from .your_domain.com&#xA;&lt;/Proxy&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>ModSecurity: my first rules</title>
      <link>https://inliniac.net/blog/2006/07/11/mod_security-my-first-rules/</link>
      <pubDate>Tue, 11 Jul 2006 09:37:33 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/07/11/mod_security-my-first-rules/</guid>
      <description>&lt;p&gt;I have been using ModSecurity for quite some time now to protect a webserver, but i never felt the need to write my own rules. Recently though, my site got quite a lot of spam in the comments of my TikiWiki based site. Since i was not willing to disable the anonymous comment posting i decided to see if i could use Mod_Security to block the spam.&lt;/p&gt;&#xA;&lt;p&gt;The spam all looked alike with the following characteristics. It all contained a list uri&amp;rsquo;s with a pipe | before them. So decided to try the most easy way, by blocking all posts with this characteristic.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Books: Preventing Webattacks with Apache</title>
      <link>https://inliniac.net/blog/2006/07/10/books-preventing-webattacks-with-apache/</link>
      <pubDate>Mon, 10 Jul 2006 21:54:51 +0000</pubDate>
      <guid>https://inliniac.net/blog/2006/07/10/books-preventing-webattacks-with-apache/</guid>
      <description>&lt;p&gt;I just finished Preventing Webattacks with Apache by Ryan C. Barnett. Even though the title says it is about Apache it is really mostly about Mod_Security, and this is why i really love the book.&lt;/p&gt;&#xA;&lt;p&gt;Especially cool is the part of the book where the author challenges the user to setup his &amp;lsquo;Buggy Bank&amp;rsquo; example application to play with the vulnarebilities and with the possible counter measures.&lt;/p&gt;&#xA;&lt;p&gt;This book got me even more exited about Mod_Security, which I use already to protect one webserver. I plan to check out setting up a reverse filtering web proxy soon.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
