<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Flowint on Inliniac</title>
    <link>https://inliniac.net/blog/tag/flowint/</link>
    <description>Recent content in Flowint on Inliniac</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 23 Apr 2013 10:17:52 +0000</lastBuildDate>
    <atom:link href="https://inliniac.net/blog/tag/flowint/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>More on Suricata lua flowints</title>
      <link>https://inliniac.net/blog/2013/04/23/more-on-suricata-lua-flowints/</link>
      <pubDate>Tue, 23 Apr 2013 10:17:52 +0000</pubDate>
      <guid>https://inliniac.net/blog/2013/04/23/more-on-suricata-lua-flowints/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://inliniac.net/blog/blog/wp-content/uploads/2012/09/lua.gif&#34; alt=&#34;&#34;&gt;This morning I added flowint lua functions for incrementing and decrementing flowints. From the &lt;a href=&#34;https://github.com/inliniac/suricata/commit/9571091e53a2103cbc9926242fa2cb003eb412ec&#34;&gt;commit&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Add flowint lua functions for incrementing and decrementing flowints.&lt;/p&gt;&#xA;&lt;p&gt;First use creates the var and inits to 0. So a call:&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;    a = ScFlowintIncr(0)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Results in a == 1.&lt;/p&gt;&#xA;&lt;p&gt;If the var reached UINT_MAX (2^32), it&amp;rsquo;s not further incremented. If the&#xA;var reaches 0 it&amp;rsquo;s not decremented further.&lt;/p&gt;&#xA;&lt;p&gt;Calling ScFlowintDecr on a uninitialized var will init it to 0.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Suricata Lua scripting flowint access</title>
      <link>https://inliniac.net/blog/2013/04/22/suricata-lua-scripting-flowint-access/</link>
      <pubDate>Mon, 22 Apr 2013 16:16:30 +0000</pubDate>
      <guid>https://inliniac.net/blog/2013/04/22/suricata-lua-scripting-flowint-access/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://inliniac.net/blog/blog/wp-content/uploads/2012/09/lua.gif&#34; alt=&#34;&#34;&gt;A few days ago I wrote about my Emerging Threats sponsored &lt;a href=&#34;https://inliniac.net/blog/2013/04/18/suricata-lua-scripting-flowvar-access/&#34; title=&#34;Suricata Lua scripting flowvar access&#34;&gt;work&lt;/a&gt; to support flowvars from Lua scripts in Suricata.&lt;/p&gt;&#xA;&lt;p&gt;Today, I updated that support. Flowvar &amp;lsquo;sets&amp;rsquo; are now real time. This was needed to fix some issues where a script was invoked multiple times in single rule, which can happen with some buffers, like HTTP headers.&lt;/p&gt;&#xA;&lt;p&gt;Also, I implemented flowint support. Flowints in Suricata are integers stored in the flow context.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Suricata Lua scripting flowvar access</title>
      <link>https://inliniac.net/blog/2013/04/18/suricata-lua-scripting-flowvar-access/</link>
      <pubDate>Thu, 18 Apr 2013 16:36:56 +0000</pubDate>
      <guid>https://inliniac.net/blog/2013/04/18/suricata-lua-scripting-flowvar-access/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://inliniac.net/blog/blog/wp-content/uploads/2012/09/lua.gif&#34; alt=&#34;&#34;&gt;Funded by Emerging Threats, I&amp;rsquo;ve been working on giving the lua scripts access to flowvars.&lt;/p&gt;&#xA;&lt;p&gt;Currently only &amp;ldquo;flowvars&amp;rdquo; are done, &amp;ldquo;flowints&amp;rdquo; will be next. Please review the code at:&#xA;&lt;a href=&#34;https://github.com/inliniac/suricata/tree/dev-lua-flowvar&#34;&gt;https://github.com/inliniac/suricata/tree/dev-lua-flowvar&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Pcre based flowvar capturing is done in a post-match fashion. If the rule containing the &amp;ldquo;capture&amp;rdquo; matches, the var is stored in the flow.&lt;/p&gt;&#xA;&lt;p&gt;For lua scripting, this wasn&amp;rsquo;t what the rule writers wanted. In this case, the flowvars are stored in the flow regardless of a rule match.&lt;/p&gt;</description>
    </item>
    <item>
      <title>HTTP parsing events in Suricata</title>
      <link>https://inliniac.net/blog/2012/01/11/http-parsing-events-in-suricata/</link>
      <pubDate>Wed, 11 Jan 2012 19:09:17 +0000</pubDate>
      <guid>https://inliniac.net/blog/2012/01/11/http-parsing-events-in-suricata/</guid>
      <description>&lt;p&gt;With the 1.2rc1 release you will notice no more HTTP errors on the screen. Or SMTP errors. This output has been disabled finally. This was a long time annoyance.&lt;/p&gt;&#xA;&lt;p&gt;As you may still be interested in the errors they are now available through the rule language. In rules/http-events.rules and rules/smtp-events.rules rules for all possible events/errors can be found.&lt;/p&gt;&#xA;&lt;p&gt;Example:&#xA;&lt;code&gt;app-layer-event:http.missing_host_header;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;This will match on HTTP/1.1 requests without a Host header.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
