<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vulnerability on Inliniac</title>
    <link>https://inliniac.net/blog/category/vulnerability/</link>
    <description>Recent content in Vulnerability on Inliniac</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 08 Apr 2014 12:16:17 +0000</lastBuildDate>
    <atom:link href="https://inliniac.net/blog/category/vulnerability/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Detecting OpenSSL Heartbleed with Suricata</title>
      <link>https://inliniac.net/blog/2014/04/08/detecting-openssl-heartbleed-with-suricata/</link>
      <pubDate>Tue, 08 Apr 2014 12:16:17 +0000</pubDate>
      <guid>https://inliniac.net/blog/2014/04/08/detecting-openssl-heartbleed-with-suricata/</guid>
      <description>&lt;p&gt;The OpenSSL heartbleed vulnerability is a pretty serious weakness in OpenSSL that can lead to information disclosure, in some cases even to to private key leaking. Please see this post here &lt;a href=&#34;http://blog.existentialize.com/diagnosis-of-the-openssl-heartbleed-bug.html&#34;&gt;http://blog.existentialize.com/diagnosis-of-the-openssl-heartbleed-bug.html&lt;/a&gt; for more info.&lt;/p&gt;&#xA;&lt;p&gt;This is a case where an IDS is able to detect the vuln, even though we&amp;rsquo;re talking about TLS.&lt;/p&gt;&#xA;&lt;h2 id=&#34;lua&#34;&gt;LUA&lt;/h2&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve written a quick and dirty LUA script to detect it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alert tls any any -&amp;gt; any any ( \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    msg:&amp;#34;TLS HEARTBLEED malformed heartbeat record&amp;#34;; \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    flow:established,to_server; dsize:&amp;gt;7; \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    content:&amp;#34;|18 03|&amp;#34;; depth:2; lua:tls-heartbleed.lua; \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    classtype:misc-attack; sid:3000001; rev:1;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The script:&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>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>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>Snort_inline in svn updated to 2.6.1.3</title>
      <link>https://inliniac.net/blog/2007/02/22/snort_inline-in-svn-updated-to-2613/</link>
      <pubDate>Thu, 22 Feb 2007 07:59:05 +0000</pubDate>
      <guid>https://inliniac.net/blog/2007/02/22/snort_inline-in-svn-updated-to-2613/</guid>
      <description>&lt;p&gt;This week &lt;a href=&#34;http://www.sourcefire.com/&#34;&gt;SourceFire&lt;/a&gt; published a &lt;a href=&#34;http://www.snort.org/docs/advisory-2007-02-19.html&#34;&gt;security advisory&lt;/a&gt; for (among others) &lt;a href=&#34;http://www.snort.org&#34;&gt;Snort&lt;/a&gt; version 2.6.1.2, on which Snort_inline is based. So I took some time to update Snort_inline. Normally this would have taken Will and me quite some time, but since we switched to using svn those days are gone. I was able to update it in under a hour. I was very happy I blogged about the procedure to follow, since I had already forgotten about it ;-)&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
