<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Development on To Linux and beyond !</title>
    <link>https://home.regit.org/tags/development/</link>
    <description>Recent content in Development on To Linux and beyond !</description>
    <generator>Hugo</generator>
    <language>fr</language>
    <lastBuildDate>Wed, 18 Feb 2015 10:44:41 +0000</lastBuildDate>
    <atom:link href="https://home.regit.org/feed/tags/development/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Slides of my talks at Lecce</title>
      <link>https://home.regit.org/2015/02/slides-of-my-talks-at-lecce/</link>
      <pubDate>Wed, 18 Feb 2015 10:44:41 +0000</pubDate>
      <guid>https://home.regit.org/2015/02/slides-of-my-talks-at-lecce/</guid>
      <description>&lt;p&gt;I’ve been invited by &lt;a href=&#34;http://salug.it/Eric_Leblond/&#34;&gt;SaLUG&lt;/a&gt; to Lecce to give some talks during their Geek Evening. I’ve done a talk on nftables and one of suricata.&lt;figure id=&#34;attachment_2188&#34; aria-describedby=&#34;caption-attachment-2188&#34; style=&#34;width: 695px&#34; class=&#34;wp-caption aligncenter&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://home.regit.org/uploads/2015/02/DSC_5136_01.jpg&#34;&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; src=&#34;https://home.regit.org/uploads/2015/02/DSC_5136_01-1024x679.jpg&#34; alt=&#34;Lecce by night&#34; width=&#34;695&#34; height=&#34;460&#34; class=&#34;size-large wp-image-2188&#34; srcset=&#34;https://home.regit.org/uploads/2015/02/DSC_5136_01-1024x679.jpg 1024w, https://home.regit.org/uploads/2015/02/DSC_5136_01-300x199.jpg 300w, https://home.regit.org/uploads/2015/02/DSC_5136_01.jpg 2000w&#34; sizes=&#34;auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px&#34; /&gt;&lt;/a&gt;&lt;figcaption id=&#34;caption-attachment-2188&#34; class=&#34;wp-caption-text&#34;&gt;Lecce by night&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The nftables talk was about the motivation behind the change from iptables.&lt;/p&gt;
&lt;p&gt;Here are the slides: &lt;a href=&#34;https://home.regit.org/uploads/2015/02/nftables.pdf&#34;&gt;Nftables&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The talk on Suricata was explaining the different feature of Suricata and was showing how I’ve used it to make a study of SSH bruteforce.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Speeding up scapy packets sending</title>
      <link>https://home.regit.org/2014/04/speeding-up-scapy-packets-sending/</link>
      <pubDate>Thu, 17 Apr 2014 14:11:58 +0000</pubDate>
      <guid>https://home.regit.org/2014/04/speeding-up-scapy-packets-sending/</guid>
      <description>&lt;h4 id=&#34;sending-packets-with-scapy&#34;&gt;Sending packets with scapy&lt;/h4&gt;
&lt;p&gt;I’m currently doing some code based on &lt;a href=&#34;http://www.secdev.org/projects/scapy/&#34;&gt;scapy&lt;/a&gt;. This code reads data from a possibly huge file and send a packet for each line in the file using the contained information.&lt;br&gt;
So the code contains a simple loop and uses sendp because the frame must be sent at layer 2.&lt;/p&gt;
&lt;pre&gt;def run(self):
         filedesc = open(self.filename, &#39;r&#39;)
         # loop on read line
         for line in filedesc:
             # Build and send packet
             sendp(pkt, iface = self.iface, verbose = verbose)
             # Inter packet treatment
&lt;/pre&gt;
&lt;p&gt;Doing that the performance are a bit deceptive. For 18 packets, we’ve got:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using linux perf tools for Suricata performance analysis</title>
      <link>https://home.regit.org/2013/11/using-linux-perf-tools-for-suricata-performance-analysis/</link>
      <pubDate>Mon, 18 Nov 2013 12:59:59 +0000</pubDate>
      <guid>https://home.regit.org/2013/11/using-linux-perf-tools-for-suricata-performance-analysis/</guid>
      <description>&lt;h4 id=&#34;introduction&#34;&gt;Introduction&lt;/h4&gt;
&lt;p&gt;&lt;a href=&#34;https://perf.wiki.kernel.org/index.php/Main_Page&#34;&gt;Perf&lt;/a&gt; is a great tool to analyse performances on Linux boxes. For example, &lt;em&gt;perf top&lt;/em&gt; will give you this type of output on a box running &lt;a href=&#34;http://suricata-ids.org/&#34;&gt;Suricata&lt;/a&gt; on a high speed network:&lt;/p&gt;
&lt;pre&gt;Events: 32K cycles                                                                                                                                                                                                                            
 28.41%  suricata            [.] SCACSearch
 19.86%  libc-2.15.so        [.] tolower
 17.83%  suricata            [.] SigMatchSignaturesBuildMatchArray
  6.11%  suricata            [.] SigMatchSignaturesBuildMatchArrayAddSignature
  2.06%  suricata            [.] tolower@plt
  1.70%  libpthread-2.15.so  [.] pthread_mutex_trylock
  1.17%  suricata            [.] StreamTcpGetFlowState
  1.10%  libc-2.15.so        [.] __memcpy_ssse3_back
  0.90%  libpthread-2.15.so  [.] pthread_mutex_lock&lt;/pre&gt;
&lt;p&gt;The functions are sorted by CPU consumption. Using arrow key it is possible to jump into the annotated code to see where most CPU cycles are used.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Adding a force build to all builders</title>
      <link>https://home.regit.org/2013/09/adding-a-force-build-to-all-builders/</link>
      <pubDate>Fri, 20 Sep 2013 10:56:26 +0000</pubDate>
      <guid>https://home.regit.org/2013/09/adding-a-force-build-to-all-builders/</guid>
      <description>&lt;p&gt;Recent versions of &lt;a href=&#34;http://buildbot.net/&#34;&gt;buildbot&lt;/a&gt;, the continuous integration framework don’t allow by default the force build feature.&lt;br&gt;
This feature can be used to start a build on demand. It is really useful when you’ve updated the build procedure or when you want to test new branches.&lt;/p&gt;
&lt;p&gt;It was a little tricky to add it, so I decided to share it. If &lt;em&gt;c&lt;/em&gt; is the name of the configuration you build in your master.cfg, you can add after all builders declarations:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ulogd 2.0.2, my first release as maintainer</title>
      <link>https://home.regit.org/2013/03/ulogd-2-0-2-my-first-release-as-maintainer/</link>
      <pubDate>Mon, 04 Mar 2013 00:13:13 +0000</pubDate>
      <guid>https://home.regit.org/2013/03/ulogd-2-0-2-my-first-release-as-maintainer/</guid>
      <description>&lt;h4 id=&#34;objectives-of-this-release&#34;&gt;Objectives of this release&lt;/h4&gt;
&lt;p&gt;So it is my first ulogd2 release as maintainer. I’ve been in charge of the project since 2012 October 30th and this was an opportunity for me to increase my developments on the project. Roadmap was almost empty so I’ve decided to work on issues that were bothering me as a user of the project. I’ve also included two features which are connection tracking event filtering and a Graphite output module. Ulogd is available on &lt;a href=&#34;http://netfilter.org/projects/ulogd/downloads.html&#34;&gt;Netfilter web site&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Coccigrep improved func operation</title>
      <link>https://home.regit.org/2012/09/coccigrep-improved-func-operation/</link>
      <pubDate>Mon, 10 Sep 2012 15:22:02 +0000</pubDate>
      <guid>https://home.regit.org/2012/09/coccigrep-improved-func-operation/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://home.regit.org/software/coccigrep/&#34;&gt;Coccigrep 1.11&lt;/a&gt; is now available and mainly features some improvements related to the &lt;em&gt;func&lt;/em&gt; search. The &lt;em&gt;func&lt;/em&gt; operation can be used to search when a structure is used as argument of a function. For example, to search where the Packet structures are freed inside Suricata project, one can run:&lt;/p&gt;
&lt;pre&gt;$ coccigrep -t Packet -a &#34;SCFree&#34; -o func src/
src/alert-unified2-alert.c:1156 (Packet *p):         SCFree(p);
src/alert-unified2-alert.c:1161 (Packet *p):         SCFree(p);
...
src/alert-unified2-alert.c:1368 (Packet *pkt):         SCFree(pkt);
&lt;/pre&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Run a build on all commits in a git branch</title>
      <link>https://home.regit.org/2012/08/run-a-build-on-all-commits-in-a-git-branch/</link>
      <pubDate>Tue, 07 Aug 2012 09:37:15 +0000</pubDate>
      <guid>https://home.regit.org/2012/08/run-a-build-on-all-commits-in-a-git-branch/</guid>
      <description>&lt;p&gt;Sometime, you need to check that all the commits in a branch are building correctly. For example, when a rebase has been done, it is possible you or diff has made a mistake during the operation. The building operation can be run against all commits of the current branch with the following one-liner (splitted here for more readability):&lt;/p&gt;
&lt;pre&gt;for COMMIT in $(git log --reverse --format=format:%H origin/master..HEAD); do
    git checkout ${COMMIT} ;
    make -j8 1&gt;/dev/null || { echo &#34;Commit $COMMIT don&#39;t build&#34;;  break; }
done
&lt;/pre&gt;
&lt;p&gt;The idea is trivial, we build the list of commits with &lt;em&gt;git log&lt;/em&gt; using a simple format string (to get only the hash). We add the reverse tag to start from the oldest commit.&lt;br&gt;
For each commit, we checkout and run the build command. If the build fails, we exit from the loop.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Set or unset define variables in Coccigrep</title>
      <link>https://home.regit.org/2012/07/set-or-unset-define-variables-in-coccigrep/</link>
      <pubDate>Tue, 31 Jul 2012 09:10:09 +0000</pubDate>
      <guid>https://home.regit.org/2012/07/set-or-unset-define-variables-in-coccigrep/</guid>
      <description>&lt;p&gt;Following a discussion with the great Julia Lawall, she added a new feature in &lt;a href=&#34;http://coccinelle.lip6.fr/&#34; target=&#34;_&#34;&gt;coccinelle&lt;/a&gt;: it is now possible to define as set or unset some variables. This option has been added in coccigrep 1.9 and requires coccinelle 1.0-rc14.&lt;/p&gt;
&lt;p&gt;For example, let’s have a code like Suricata where a lot of unit tests are implemented. The structure of the code is the following:&lt;/p&gt;
&lt;pre&gt;REGULAR CODE

#ifdef UNITTESTS
 TEST CODE
#endif
&lt;/pre&gt;
&lt;p&gt;When doing search in the regular code, you don’t want to be bothered by results found in the test code. To obtain this result, you can pass the &lt;em&gt;-U UNITTESTS&lt;/em&gt; option to coccigrep to tell him to consider UNITTESTS variable as undefined. If you want to define a variable, you can use the &lt;em&gt;-D&lt;/em&gt; flag.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What’s new in coccigrep 1.6?</title>
      <link>https://home.regit.org/2011/11/whats-new-in-coccigrep-1-6/</link>
      <pubDate>Mon, 07 Nov 2011 23:07:29 +0000</pubDate>
      <guid>https://home.regit.org/2011/11/whats-new-in-coccigrep-1-6/</guid>
      <description>&lt;p&gt;I did not write any article on &lt;a href=&#34;http://home.regit.org/software/coccigrep/&#34;&gt;coccigrep&lt;/a&gt; since the 1.0 release. Here is an update on what has been added to the software since that release.&lt;/p&gt;
&lt;h2 id=&#34;c-support&#34;&gt;C++ support&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;http://coccinelle.lip6.fr/&#34;&gt;Coccinelle&lt;/a&gt; has a basic C++ support which can be activated by using the &lt;em&gt;–cpp&lt;/em&gt; flag in &lt;/em&gt;coccigrep&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&#34;patches-information&#34;&gt;Patches information&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;-L -v&lt;/em&gt; options on command line will display a description of the match available on the system.&lt;/p&gt;
&lt;pre&gt;$ coccigrep -L -v
set: Search where a given attribute of structure &#39;type&#39; is set
 * Confidence: 80%
 * Author: Eric Leblond &amp;lt;eric@regit.org&gt;
 * Arguments: type, attribute
 * Revision: 2&lt;/pre&gt;
&lt;p&gt;For the developer, this is obtained from structured comments put at the start of the cocci file:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Acquisition systems and running modes evolution of Suricata</title>
      <link>https://home.regit.org/2011/10/suricata-new-feature/</link>
      <pubDate>Thu, 06 Oct 2011 23:06:24 +0000</pubDate>
      <guid>https://home.regit.org/2011/10/suricata-new-feature/</guid>
      <description>&lt;p&gt;Some new features have recently reach &lt;a href=&#34;https://redmine.openinfosecfoundation.org/projects/suricata/repository&#34;&gt;Suricata’s git tree&lt;/a&gt; and will be available in the next development release. I’ve worked on some of them that I will describe here.&lt;/p&gt;
&lt;h2 id=&#34;multi-interfaces-support-and-new-running-modes&#34;&gt;Multi interfaces support and new running modes&lt;/h2&gt;
&lt;h3 id=&#34;configuration-update&#34;&gt;Configuration update&lt;/h3&gt;
&lt;p&gt;IDS live mode in &lt;a href=&#34;http://www.openinfosecfoundation.org/&#34;&gt;suricata&lt;/a&gt; (pcap, pf_ring, af_packet) now supports the capture on multiple interfaces. The syntax of the YAML configuration file has evolved and it is now possible to set per-interface variables.&lt;/p&gt;
&lt;p&gt;For example, it is possible to define &lt;code&gt;pfring&lt;/code&gt; configuration with the following syntax:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Playing a bit with vim macros</title>
      <link>https://home.regit.org/2011/06/playing-a-bit-with-vim-macros/</link>
      <pubDate>Mon, 27 Jun 2011 06:31:31 +0000</pubDate>
      <guid>https://home.regit.org/2011/06/playing-a-bit-with-vim-macros/</guid>
      <description>&lt;p&gt;During one of my recent coding, I had to modify a signature file for suricata. The file was looking like this:&lt;/p&gt;
&lt;pre&gt;alert pkthdr any any -&gt; any any (msg:&#34;SURICATA ICMPv4 unknown code&#34;; decode-event:icmpv4.unknown_code; sid:2200024; rev:1;)
alert pkthdr any any -&gt; any any (msg:&#34;SURICATA ICMPv4 truncated packet&#34;; decode-event:icmpv4.ipv4_trunc_pkt; sid:2200025; rev:1;)
alert pkthdr any any -&gt; any any (msg:&#34;SURICATA ICMPv4 unknown version&#34;; decode-event:icmpv4.ipv4_unknown_ver; sid:2200026; rev:1;)
alert pkthdr any any -&gt; any any (msg:&#34;SURICATA ICMPv6 packet too small&#34;; decode-event:icmpv6.pkt_too_small; sid:2200027; rev:1;)
alert pkthdr any any -&gt; any any (msg:&#34;SURICATA ICMPv6 unknown type&#34;; decode-event:icmpv6.unknown_type; sid:2200028; rev:1;)
alert pkthdr any any -&gt; any any (msg:&#34;SURICATA ICMPv6 unknown code&#34;; decode-event:icmpv6.unknown_code; sid:2200029; rev:1;)&lt;/pre&gt;
&lt;p&gt;The modification was to decrease the number behind &amp;lt;em&amp;lt;sid&lt;/em&gt; by 24 for each signatures.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
