<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Work Together For The Benefit Of All ManKind...</title>
	<atom:link href="http://www.gamelinux.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.gamelinux.org</link>
	<description>OSS and Security @ WORK</description>
	<lastBuildDate>Tue, 01 Jan 2013 21:01:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PassiveDNS version 1.0</title>
		<link>http://www.gamelinux.org/?p=574</link>
		<comments>http://www.gamelinux.org/?p=574#comments</comments>
		<pubDate>Mon, 31 Dec 2012 23:01:22 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[passivedns]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=574</guid>
		<description><![CDATA[Im happy to announce that my PassiveDNS has reach version 1.0 (stable)!
For those of you who has played with earlier versions, the biggest changes in the last tags is the log output format:

Old:
1341819126&#124;&#124;1.2.3.4&#124;&#124;8.8.8.8&#124;&#124;IN&#124;&#124;www.google.com.&#124;&#124;A&#124;&#124;173.194.32.7&#124;&#124;300
New:
1341819126.845527&#124;&#124;1.2.3.4&#124;&#124;8.8.8.8&#124;&#124;IN&#124;&#124;www.google.com.&#124;&#124;A&#124;&#124;173.194.32.7&#124;&#124;300&#124;&#124;17

I added microseconds to the unix timestamps, and also added a count field (the last field). The count field outputs how many times [...]]]></description>
			<content:encoded><![CDATA[<p>Im happy to announce that my PassiveDNS has reach version <strong>1.0</strong> (stable)!</p>
<p>For those of you who has played with earlier versions, the biggest changes in the last tags is the log output format:</p>
<blockquote><p>
<strong>Old:</strong><br />
1341819126||1.2.3.4||8.8.8.8||IN||www.google.com.||A||173.194.32.7||300</p>
<p><strong>New:</strong><br />
1341819126<strong>.845527</strong>||1.2.3.4||8.8.8.8||IN||www.google.com.||A||173.194.32.7||300<strong>||17</strong>
</p></blockquote>
<p>I added <strong>microseconds</strong> to the unix timestamps, and also added a <strong>count</strong> field (the last field). The count field outputs how many times it has seen a query answer since it last printed it as PassiveDNS if you use caching. If you run PassiveDNS with <em>-P 0</em> (No caching), it should always output 1.</p>
<p>Running PassiveDNS with default options, it will look something like this for a domain:</p>
<blockquote><p>
1341500304.265705||1.2.3.4||8.8.8.8||IN||www.facebook.com.||A||69.171.247.21||45||1<br />
&#8230;<br />
1341779965.656576||1.2.3.4||8.8.8.8||IN||www.facebook.com.||A||69.171.247.21||107||11
</p></blockquote>
<p>This means that in the time PassiveDNS was running, a query for www.facebook.com. returned 69.171.247.21 12 times in total. 11 of the entries happened between the configured &#8220;print time&#8221;. (   -P <sec>        Seconds between printing duplicate DNS info (default 86400).  )</p>
<p>So if you have any custom tools for parsing the output, you probably need to update it, before you upgrade to v1.0. <strong>pdns2db.pl</strong> which you will find in the <em>tools/</em> dir has patched to handle the change.</p>
<p>Now that v1.0 is out, I will work with releasing new versions of PassiveDNS. In versions to come, I will make it so that you can customize the output fields via the command line.</p>
<p>BTW, I have also added a bit more statistics when passivedns 1.0 ends. It looks something like this:</p>
<blockquote><p>
&#8211; Total DNS records allocated            :       15726<br />
&#8211; Total DNS assets allocated             :       23259<br />
&#8211; Total DNS packets over IPv4/TCP        :           0<br />
&#8211; Total DNS packets over IPv6/TCP        :           0<br />
&#8211; Total DNS packets over TCP decoded     :           0<br />
&#8211; Total DNS packets over TCP failed      :           0<br />
&#8211; Total DNS packets over IPv4/UDP        :      222139<br />
&#8211; Total DNS packets over IPv6/UDP        :           0<br />
&#8211; Total DNS packets over UDP decoded     :      222133<br />
&#8211; Total DNS packets over UDP failed      :           6<br />
&#8211; Total packets received from libpcap    :      463374<br />
&#8211; Total Ethernet packets received        :      463374<br />
&#8211; Total VLAN packets received            :           0
</p></blockquote>
<p>You can download the 1.0 release in <a href="https://github.com/gamelinux/passivedns/archive/1.0.tar.gz">tar.gz</a> or in <a href="https://github.com/gamelinux/passivedns/archive/1.0.zip">zip</a>.</p>
<p>Or you can find the project on <a href="https://github.com/gamelinux/passivedns">github</a>.</p>
<p>Version 1.0 has been tested extensively and should be considered stable and production ready. But if you find any issues, please don&#8217;t hesitate to report your findings <a href="https://github.com/gamelinux/passivedns/issues">here</a>.</p>
<p>Hacky New Year by the way!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=574</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pdns-ui &#8211; by Philipp Hunold</title>
		<link>http://www.gamelinux.org/?p=561</link>
		<comments>http://www.gamelinux.org/?p=561#comments</comments>
		<pubDate>Wed, 23 May 2012 19:01:16 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[passivedns]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=561</guid>
		<description><![CDATA[A great thing about open source software, is that you can make something that works for you, and someone else might add stuff that works for them, and combined, you might have something all in all more powerful&#8230;
pdns.ui &#8211; A Minimalistic WebUI for PassiveDNS
phunold (Philipp Hunold) has made a webgui for my PassiveDNS   [...]]]></description>
			<content:encoded><![CDATA[<p>A great thing about open source software, is that you can make something that works for you, and someone else might add stuff that works for them, and combined, you might have something all in all more powerful&#8230;</p>
<p><strong><a href="https://github.com/phunold/pdns-ui">pdns.ui</a> &#8211; A Minimalistic WebUI for PassiveDNS</strong></p>
<p><strong><a href="https://github.com/phunold">phunold</a> (Philipp Hunold)</strong> has made a webgui for my <a href="https://github.com/gamelinux/passivedns">PassiveDNS</a> <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I cloned it on git and have it up and running here at home. I&#8217;m not a webcoder, so seeing that someone made a GUI for my PassiveDNS makes me happy! (As I would have spent too much time on doing it than it would be worth). I&#8217;ve emailed with Philipp and I know that pdns-ui is in an early stage, but I would like to let other people know about the UI so that they can use it instead of making their own and maybe come with suggestions on how to improve it, come with patches etc.</p>
<p><img src="http://download.gamelinux.org/gamelinux/pic/pdns-ui.png" alt="Right click and view to show pdns-ui in bigger picture" /></p>
<p>So for people who wants a web-frontend to their PassiveDNS DB, try it out and give the feedback to <a href="https://github.com/phunold/pdns-ui/issues">Philipp</a>!</p>
<p>Big thanks Philipp <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=561</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PassiveDNS 0.5.0</title>
		<link>http://www.gamelinux.org/?p=543</link>
		<comments>http://www.gamelinux.org/?p=543#comments</comments>
		<pubDate>Thu, 29 Mar 2012 15:18:45 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[passivedns]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=543</guid>
		<description><![CDATA[I have pushed PassiveDNS version 0.5.0.
According to the roadmap, I have been at 0.5.0 for a while, and even started to implement stuff for the 1.5.0 version. But my real aim is the 1.0.0 release, and I have started all the activities for the 1.0.0 release, but I lack the statistics that I set in [...]]]></description>
			<content:encoded><![CDATA[<p>I have pushed <strong>PassiveDNS version 0.5.0</strong>.</p>
<p>According to the <a href="https://raw.github.com/gamelinux/passivedns/master/doc/ROADMAP">roadmap</a>, I have been at 0.5.0 for a while, and even started to implement stuff for the 1.5.0 version. But my real aim is the 1.0.0 release, and I have started all the activities for the 1.0.0 release, but I lack the statistics that I set in the roadmap when PassiveDNS ends. I have played it against pcaps with DNS attacks, Im fuzzing pcaps being read by PassiveDNS etc. so a 1.0.0 is hopefully not that far away <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Some of the changes since my last blog post (v0.2.9):</p>
<blockquote><p>
* Logging of NXDOMAINs (-Xx -L nxdomain.log)<br />
* DNS over UDP/TCP on IPv4 and IPv6 (Used to be just IPv4+UDP)<br />
* Logging to stdout (-L &#8211; / -l -), both for NXDOMAINS and other DNS records.<br />
* Implemented some hardening, including checking that client TID match server TID etc.<br />
* Other small optimization and fixing a small memleak etc.
</p></blockquote>
<p>The way I implemented NXDOMAINS in PassiveDNS for now, makes it compete with the memory pool from &#8220;normal&#8221; domains/records. So if you have a fastflux or someone just querying for generated b0gus domains on your network, you might push out valid domains from the cache in favor for a NXDOMAIN. The reason I did this, is that it was faster than implementing an own memory pool for the NXDOMAINS and it give the possibility to log NXDOMAINS in current version with out to much hassle. If this way of implementing NXDOMAINS turns out to fight for memory more aggressively than one would like, one can always start two instances of PassiveDNS, one just looking for NXDOMAINS, and the other one looking for the regular domains. As I gain more experience with NXDOMAINS in PassiveDNS and get more feedback, Ill reconsider the implementation if needed <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>One note, the current logfile format will be stable until the 1.5.0 release (that is my intention at least), After that, my plan is to implement a customizable log format, and also more fields of interest will be available. If you have any additional data that you want to output and thoughts about how the output for those data should be, don&#8217;t hesitate to let me know <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I ran into a security related bug on my Ubuntu 10.04 which might be triggered running PassiveDNS. I have emailed the Debian package maintainer and reported the bug to security@ubuntu.com and also filed a bug report. The bug is fixed upstream in ldns long time ago, so hopefully it will be fixed soon in Ubuntu 10.04 too <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For reporting issues or making feature request, please do so <a href="https://github.com/gamelinux/passivedns/issues">here</a>.</p>
<p>Happy DNS Archiving <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=543</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PassiveDNS 0.2.9</title>
		<link>http://www.gamelinux.org/?p=519</link>
		<comments>http://www.gamelinux.org/?p=519#comments</comments>
		<pubDate>Tue, 17 Jan 2012 15:17:07 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[passivedns]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=519</guid>
		<description><![CDATA[I added some features and changes to PassiveDNS. The most important change is that the output now contains the TTL value, so you need to use the current tools/* (if you use them) as they are also changed to work with this new output format (or update your own tools).
I also added the ability to [...]]]></description>
			<content:encoded><![CDATA[<p>I added some features and changes to PassiveDNS. The most important change is that the output now contains the <strong>TTL</strong> value, so you <strong>need</strong> to use the current tools/* (if you use them) as they are also changed to work with this new output format (or update your own tools).</p>
<p>I also added the ability to specify the DNS record types that you want to log from the command line and I added support for more record types. PassiveDNS now should be able to track:  <strong>A, AAAA, CNAME, DNAME, NAPTR, SOA, PTR, RP, SRV, TXT, MX and NS.</strong></p>
<p>Support for <strong>chroot</strong> and <strong>dropping privileges</strong> are also added.</p>
<p>I also added some features to <strong>tools/pdns2db.pl</strong> while I was at it:<br />
<strong>1)</strong> You can now process a passivedns.log file in &#8220;batch&#8221; mode, exiting when finished.<br />
<strong>2)</strong> You can now specify a file with a list of domains or IPs to skip insertion to the DB.<br />
<strong>3)</strong> You can now specify a file with a list of PCRE (Perl Compatible Regular Expressions) of &#8220;domains/IPs&#8221; to skip insertion to the DB.<br />
<strong>4)</strong> You can now specify a file with a list of domains or IPs to alert on!<br />
<strong>5)</strong> You can now specify a file with a list of PCRE of &#8220;domains/IPs&#8221; to alert on!<br />
<strong>6)</strong> You can now specify a file with a list of domains to whitelist and not alert on.<br />
<strong>7)</strong> You can now specify a file with a list of PCRE of &#8220;domains/IPs&#8221; to whitelist and not alert on.</p>
<p>The <strong>skiplists</strong> will be checked first, and if the domain/IP is found/matched there, whitelist and blacklist will be ignored and insertion to DB will be ignored.</p>
<p>Next the <strong>whitelists</strong> will be checked, and if a domain/IP is found there or match a PCRE that you have defined it will not be checked by the blacklist.</p>
<p>Last the <strong>blacklists</strong> is checked, and if a domain/IP is found there or match a PCRE that you have defined, it will write the PassiveDNS record to the alert file that you specify (Default: /var/log/passivedns-alert.log).</p>
<p>There are different sources for getting lists of known bad domains. Here is one if you want to test the blacklist functionality: <a href="http://isc.sans.edu/feeds/suspiciousdomains_High.txt">http://isc.sans.edu/feeds/suspiciousdomains_High.txt</a></p>
<p>Im pretty far as what it comes to planed features at this stage. Please try out PassiveDNS and beat the crap out of it <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I will probably &#8220;up&#8221; the version to <strong>0.5.0</strong> soon and from there on, it is just testing and testing and more testing before it will be a &#8220;<strong>one dot O</strong>&#8221; release.</p>
<p>If you have any issues with PassiveDNS, please submit them <a href="https://github.com/gamelinux/passivedns/issues">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=519</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>PRADS, and how it compares to pads and p0fv2 and p0fv3</title>
		<link>http://www.gamelinux.org/?p=485</link>
		<comments>http://www.gamelinux.org/?p=485#comments</comments>
		<pubDate>Thu, 12 Jan 2012 10:49:01 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[PADS]]></category>
		<category><![CDATA[PRADS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=485</guid>
		<description><![CDATA[The question was brought up to me late last night on IRC, as p0fv3 RC was recently announced.  This is a short answer to that question:
&#8220;People that find the PRADS page and already know p0f or pads may be interested in a comparison or essentially arguments why you would use one over the other.&#8221;
First [...]]]></description>
			<content:encoded><![CDATA[<p>The question was brought up to me late last night on IRC, as <a href="http://lcamtuf.coredump.cx/p0f3/">p0fv3</a> RC was recently <a href="http://www.securityfocus.com/archive/1/521169">announced</a>.  This is a short answer to that question:</p>
<p><em>&#8220;People that find the PRADS page and already know p0f or pads may be interested in a comparison or essentially arguments why you would use one over the other.&#8221;</em></p>
<p>First off, its exiting to see Michal Zalewski back with p0fv3 <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I quickly read through his code yesterday and tested it out, and its rather interesting how he solves things. The fingerprint database at the moment is limited, but expect that to grow in the near future. I also love his non formal output in his applications <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>[PRADS vs PADS]</strong><br />
So, back to the questions. First off, pads &#8220;Passive Asset Detection System&#8221; uses regexp syntax to look for common bytes in payload to identify server application. So if the server says &#8221; Server: Apache/2.2.3 (Linux/SUSE)&#8221; that is collected as what service is running on the server port where this was detected. The &#8220;rules&#8221; can be written more specifically for each server software, but are rather general and small today. Some pads &#8220;rules&#8221; look for ASCII strings, and some for different bytes in hex etc. to identify stuff like SSL/TLS. Pads is no longer actively developed by the original author, but I do maintain a <a href="https://github.com/gamelinux/pads">fork of the last version</a> with enhancements added.</p>
<p>PRADS extended the way pads does asset detection. We have build in IPv6 support in PRADS, so it also detects asset listening on IPv6 addresses. We also have build in connection tracking, so that we can cut off detection in a stream after an amount of packets or bytes seen from the client or server. This to drop trying to look for server/client assets in connections that transfers big files or are encrypted etc. Most &#8220;banners/identifiers&#8221; are in the first  packet etc. so limiting for how many packets in a stream to do detection on helps on performance etc.</p>
<p>To extend pads a bit, we also added detection for client applications using the same method as for detecting server applications.</p>
<p>My future thoughts on enhancing the pads/PRADS asset rules are to make them more like the Snort/Suricata rule language and use fast pattern matching before invoking the pcre method etc. Pads does no OS fingerprinting per say btw.</p>
<p><strong>[PRADS vs p0f]</strong><br />
PRADS tcp fingerprinting was based on the p0fv2 way as p0f had the fingerprint DB and we thought that reusing the fingerprints would make it easier for people to migrate if they wanted, instead of recollecting and adding fingerprints. PRADS also added some touches of its own (for IPv6 etc) and the way we match the fingerprints (and fuzzing). We have thought about extending the fingerprints and re-write them, but thats in the future. Right now they are doing a good job. We also added all the p0fv2 ways of fingerprinting to the whole tcp session, from the syn to the rst/fin. p0fv2 could just use one method at a time, depending on how you started p0fv2. PRADS outputs all the info it gathers, and leaves the final correlation to the end user/program etc. A good example on that is <strong>prads-asset-report</strong> and <strong>prads2snort</strong>, which ads wight to each type of fingerprints, ranging the syn and syn+ack higher than stray-ack, rst and fin etc. You can also base the final guess on client or server applications to, say if the User-Agent contains: &#8220;Linux&#8221; or &#8220;Windows NT 6.1&#8243; or &#8220;Macintosh; Intel Mac OS X 10.7&#8243; etc.<br />
or if the Server string of the web server is: &#8220;Microsoft-IIS 6.0&#8243; or &#8220;Apache 2.2.15 (FreeBSD)&#8221; or &#8220;Apache 2.2.3 (Red Hat)&#8221; etc.</p>
<p>The p0fv3 tcp fingerprints are new in the way they are written. A new fingerprint file format, that makes it easy to add different types of fingerprints into one and same file (TCP/HTTP/SMTP etc). The most significant enhancement in the TCP fingerprints that I see is the MSS and MTU multiplier field. p0fv3 also detects new quirks not measured in p0fv2. The rules are now also more human readable, Example:</p>
<blockquote><p>
# RULE<br />
label = s:unix:Linux:2.6.x<br />
sig   = *:64:0:*:mss*4,6:mss,sok,ts,nop,ws:df,id+:0</p>
<p># Will match:<br />
.-[ X.X.X.X/58435 -> Y.Y.Y.Y/22 (syn) ]-<br />
|<br />
| client   = X.X.X.X/58435<br />
| os       = Linux 2.6.x<br />
| dist     = 9<br />
| params   = none<br />
| raw_sig  = 4:55+9:0:1460:mss*4,6:mss,sok,ts,nop,ws:df,id+:0<br />
|<br />
`&#8212;-
</p></blockquote>
<p>The way the tcp fingerprints are matched are also changed a bit, and I believe Michal Zalewski has done this for good reasons and that it will enhance the detection.</p>
<p>Beside the new tcp fingerprint changes, p0fv3 also has application layer detection added. I looked at the HTTP stuff, and p0fv3 matches also on the HTTP header order and dont blindly trust the User-Agent, as we do in PRADS. We have thought about extending the &#8220;rule/signature&#8221; in PRADS to be more Snort/Suricata like, so you can have more content matches etc, but more accuracy can be achieved today using the pcre language, to verify header order etc, before blindly trusting the UA, but pcre is way too expensive used alone I think, so organizing the signatures/rules better internally and having something like a fast_pattern matcher would help alot. Quick pcre example for a User-Agent with specific HTTP header order:</p>
<blockquote><p>
# Detects Firefox/3.6.X with HTTP header order to add confidence in the match.<br />
# PRADS rule:<br />
http,v/MFF 3.6.X/$1//,\r\nHost: .*\r\nUser-Agent: Mozilla\/5\.0 (.*Firefox\/3\.6\..*)\r\nAccept: .*\r\nAccept-Language: .*\r\nAccept-Encoding: .*\r\nAccept-Charset:
</p></blockquote>
<p>Running it in PRADS on an old pcap gives me:</p>
<blockquote><p>
# Client IPs deducted just to be kind<br />
[client:MFF 3.6.X (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.:80:6],[distance:8]<br />
[client:MFF 3.6.X (X11; U; Linux x86_64; en-GB; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.10 (maverick) Firefox:80:6],[distance:11]<br />
[client:MFF 3.6.X (Windows; U; Windows NT 5.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.:80:6],[distance:10]<br />
[client:MFF 3.6.X (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR :80:6],[distance:14]<br />
[client:MFF 3.6.X (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Linux Mint/10 (Julia) Firefox/3:80:6],[distance:15]<br />
[client:MFF 3.6.X (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.10 (maverick) Firefox:80:6],[distance:9]<br />
[client:MFF 3.6.X (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12:80:6],[distance:6]<br />
[client:MFF 3.6.X (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6:80:6],[distance:12]<br />
[client:MFF 3.6.X (Windows; U; Windows NT 6.1; es-ES; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12:80:6],[distance:14]<br />
[client:MFF 3.6.X (X11; U; Linux x86_64; en-US; rv:1.9.2.10) Gecko/20101005 Fedora/3.6.10-1.fc14 Firefox/3.:80:6],[distance:8]<br />
[client:MFF 3.6.X (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.:80:6],[distance:12]
</p></blockquote>
<p>Not the whole User-Agent is grabbed, and we need to extend that in the future. But the pcre language makes it possible to match on as much content as you want, to have the confidence you need in your signatures/rules for detecting assets. PRADS looks for client and server applications on all ports and both UDP and TCP and for IPv4 and IPv6.</p>
<p><strong>[PRADS vs The World]</strong><br />
Right now we are working on adding the DHCP OS fingerprinting and ICMP OS fingerprinting. DHCP is pushed to the git master on github but is not fully integrated into the PRADS core yet, but printing and matching is working, so you can help add fingerprints if you want <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . The ICMP part is tricky as I want to fingerprint on the protocol layer, and also the payload, so I kind of have to combine the p0f way with the pads way of detecting and matching.</p>
<p>PRADS has also lots of other stuff, like connection tracking/Flow gathering with output compatible with cxtracker and sancp. I have also been working on my <a href="https://github.com/gamelinux/passivedns">passivedns</a> project, and I tend to port the relevant function over to PRADS, so we can have domain names mapped with assets to.</p>
<p>p0fv3 has an API so you can talk to it, to fetch relevant info about the IPs it knows about. I see p0fv3 with this functionality aimed at mail and web servers etc, to determine if this is spam or ham stuff coming its way, but you can use it in lots of cool ways.<br />
I know PRADS is used in much the same way from people I have talked too. An example that Kacper put up can be found on <a href="http://prads.delta9.pl/">http://prads.delta9.pl/</a>. On the road map for upcoming PRADS releases, we have access to assets via shared memory. That will make it easier for extracting info from the running PRADS process that is current. PRADS also ships with <strong>prads2db.pl</strong> which parses a prads asset log-file and inserts the info to a DB so you can query it for info.</p>
<p>PRADS philosophy is something like: &#8220;If it can be detect passively, PRADS should probably do it.&#8221;</p>
<p>So if you are comparing for deciding which application to go for, I would say use them all, and correlate the the knowledge that each tool gives you. You can even add the output from the active fingerprinting tool <a href="http://nmap.org/">nmap</a> into the mix.</p>
<p>That said, much of my view on PRADS comes from that I use it in my Network Security Monitoring setup and from my wish to &#8220;know as much as possible about my assets&#8221;. If you have any wishes or suggestions, god or bad etc, feel free to contact us.</p>
<p>E</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=485</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suricata and some phun with flowints</title>
		<link>http://www.gamelinux.org/?p=403</link>
		<comments>http://www.gamelinux.org/?p=403#comments</comments>
		<pubDate>Mon, 09 Jan 2012 07:09:06 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Snort]]></category>
		<category><![CDATA[Sourcefire]]></category>
		<category><![CDATA[Suricata]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=403</guid>
		<description><![CDATA[I have been looking into malware traffic that is hard to make signatures for in a &#8220;regular&#8221; way. I&#8217;m not a malware reverser, so I don&#8217;t dig into a malware to determine byte-testes and jumps etc. in binary protocols. This lead me to use a lot of flowbits at first, for making my sigs, but [...]]]></description>
			<content:encoded><![CDATA[<p>I have been looking into malware traffic that is hard to make signatures for in a &#8220;regular&#8221; way. I&#8217;m not a malware reverser, so I don&#8217;t dig into a malware to determine byte-testes and jumps etc. in binary protocols. This lead me to use a lot of flowbits at first, for making my sigs, but the performance in <a href="http://www.snort.org/">Snort</a> and <a href="http://www.openinfosecfoundation.org/index.php/download-suricata">Suricata</a> was &#8220;crap&#8221; to say it nice. So I talked to <em>Victor Julien</em>, lead programmer of Suricata, discussing implementing packet and byte counting in Suricata. I want to count each packet sent by a client and server and the total amount of bytes sent by client and server. Talking back and forth, Victor convinced me that I might be best to go for byte count  for reassembled streams. So I added a <a href="https://redmine.openinfosecfoundation.org/issues/294">feature request</a> to Suricata. I since then updated the feature request to add the packet and byte counters, as I think they will do great use.</p>
<p>Talking to <em>Matt Jonkman</em> (<a href="http://www.emergingthreatspro.com/">Emerging Threats Pro</a>), he pointed me to <strong><em><a href="https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Flowint">flowint</a></em></strong> in Suricata to try to solve my packet counting. So in <strong>Suricata 1.1.1</strong>, you can do something like this to initialize the packet counters:</p>
<blockquote><p>
# Initialize the packet counter (Suricata 1.1.1 and some older versions)<br />
#alert ip $HOME_NET any -> $EXTERNAL_NET any (msg:&#8221;Generic Client Established Flow IP Packet Counter set&#8221;; flow:established,from_client; <strong>flowint:client_packet,notset; flowint:client_packet,=,0; </strong>flowbits:noalert; classtype:not-suspicious; sid:1; rev:1;)</p>
<p>#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:&#8221;Generic Server Established Flow IP Packet Counter set&#8221;; flow:established,from_server; <strong>flowint:server_packet,notset; flowint:server_packet,=,0;</strong> flowbits:noalert; classtype:not-suspicious; sid:2; rev:1;)
</p></blockquote>
<p>In <strong>Suricata 1.2dev</strong> (rev 4c1e417) (I did my test for the blog on this version) and newer, you dont need to initialize the counter, as it will <em>automagical</em> be initialized to zero, so you don&#8217;t need sid:1 and sid:2:</p>
<blockquote><p>
## Generic packet counter: (This could be better done internally in Suricata/Snort? and not with rules?)<br />
alert ip $HOME_NET any -> $EXTERNAL_NET any (msg:&#8221;Generic Client Established Flow IP Packet Counter&#8221;; flow:established,from_client; <strong>flowint:client_packet,+,1;</strong> flowbits:noalert; classtype:not-suspicious; sid:3; rev:1;)</p>
<p>alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:&#8221;Generic Server Established Flow IP Packet Counter&#8221;; flow:established,from_server; <strong>flowint:server_packet,+,1;</strong> flowbits:noalert; classtype:not-suspicious; sid:4; rev:1;)
</p></blockquote>
<p>So, what can you do with packet counters?</p>
<p>First off, lets look at some generic rules I made up to test with, which basically should limit the detections in streams to the first 29 packets from the client:</p>
<blockquote><p>
# GENERiC GET<br />
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:&#8221;GENERIC GET (classic)&#8221;; flow:from_client,established; content:&#8221;GET &#8220;; depth:4; content:!&#8221;connection: keep-alive&#8221;; nocase; http_header; classtype:not-suspicious; sid:5; rev:1;)</p>
<p>alert http $HOME_NET any -> $EXTERNAL_NET any (msg:&#8221;GENERIC GET (<strong>flowint</strong>)&#8221;; flow:from_client,established; <strong>flowint:client_packet,<,30;</strong> content:&#8221;GET &#8220;; depth:4; content:!&#8221;connection: keep-alive&#8221;; nocase; http_header; classtype:not-suspicious; sid:6; rev:1;)</p>
<p># GENERiC UA<br />
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:&#8221;GENERIC User-Agent (classic)&#8221;; flow:from_client,established; content:&#8221;User-Agent: &#8220;; http_header; content:!&#8221;connection: keep-alive&#8221;; nocase; http_header; classtype:not-suspicious; sid:7; rev:1;)</p>
<p>alert http $HOME_NET any -> $EXTERNAL_NET any (msg:&#8221;GENERIC User-Agent (<strong>flowint</strong>)&#8221;; flow:from_client,established; <strong>flowint:client_packet,<,30;</strong> content:&#8221;User-Agent: &#8220;; http_header; content:!&#8221;connection: keep-alive&#8221;; nocase; http_header; classtype:not-suspicious; sid:8; rev:1;)
</p></blockquote>
<p>Sid 5 and 6 looks for a HTTP GET request that is not a HTTP keep-alive. Sid 7 and 8 is looking for User-Agent in non HTTP keep-alive request. Common for the flowint versions of the rules, are that they are just limited to the first 29 packets in an established flow. So running Suricata against <a href="http://www.itoc.usma.edu/research/dataset/data/2009-04-20-09-05-46.dmp">2009-04-20-09-05-46.dmp</a> etc. shows some interesting results:</p>
<blockquote><p>
   Num      Rule         Gid      Rev      <strong>Ticks</strong>        %      <strong>Checks   Matches</strong>  Max Ticks   <strong>Avg Ticks</strong>   Avg Match   Avg No Match<br />
  &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8211;<br />
  1        4            1        1        1695335708   67.74  510720   510720   6412616     3319.50     3319.50     0.00<br />
  2        3            1        1        581354624    23.23  508970   82175    3602972     1142.22     3061.99     772.59<br />
  3        7            1        1        135943292    5.43   7900     2352     499972      17208.01    16156.62    17653.74<br />
  4        <strong>5</strong>            1        1        <strong>43040648</strong>     1.72    <strong>3313    2517</strong>     199052      <strong>12991.44</strong>    16247.74    2694.82<br />
  5        8            1        1        29172972     1.17   7900     2352     434592      3692.78     6588.51     2465.18<br />
  6        <strong>6</strong>            1        1        <strong>17917112</strong>     0.72   <strong>3313     2517</strong>     353684      <strong>5408.12</strong>     6528.93     1864.06
</p></blockquote>
<p>Sorry for the formating <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
First, if we look at sid 5 and 6, we see that they both where checked 3313 times, and matched 2517 times. If we look at total ticks, sid 5 uses 43040648 ticks and sid 6 (flowint) uses 17917112 ticks. Average ticks for sid 5 is 12991.44 ticks and 5408.12 ticks for sid 6 (flowint).</p>
<p>Looking at sid 7 and 8, we see that they both where checked 7900 times, and matched 2352 times. If we look at total ticks, sid 7 uses 135943292 ticks and sid 8 (flowint) uses 29172972 ticks. Average ticks for sid 7 is 17208.01 ticks and 3692.78 ticks for sid 8 (flowint).</p>
<p>A basic conclusion for <em>this</em> test, is that the rules with the flowint check are faster and will give you the same alerts.<br />
But if we look at the ticks sid 3 and 4 uses to count the all the packets, they are high in total, but low on average ticks. So they are not expensive for each check, but since they are checked (and possibly incremented) for each packet, the total ticks are relative high. Having this in the core of Suricata and Snort, would probably make them less expensive (hint hint).</p>
<p>So what more c00l stuff can we do with packet counters?</p>
<p>Some malware I stumbled upon will give you an example (Mostly used in the <a href="http://www.techrepublic.com/blog/10things/the-top-10-spam-botnets-new-and-improved/1373">Gheg Spam bot</a>, aka Tofsee/Mondera)<br />
<a href="http://www.xandora.net/xangui/malware/view/b31e4624cdc45655b468921823e1b72b">b31e4624cdc45655b468921823e1b72b</a><br />
<a href="http://www.virustotal.com/file-scan/report.html?id=42bf415e9c76e36efad53fdda4b1fca704d6d0972a0f4800a0a6518f0f8bb52e-1295099162">3c453e40ff63da3c2a914c29b6c62ee0</a><br />
<a href="http://www.threatexpert.com/report.aspx?md5=e8034335afb724d8fe043166ba57cd23">e8034335afb724d8fe043166ba57cd23</a></p>
<p>It seems to communicate in a binary way (encrypted), but looking at 5 different pcaps I got, I saw a pattern and my flowint counters came to good use. It seems like the client and server sends packets with a specific payload size in different parts of the communication. I did not see any obvious content to match on, so content matches didn&#8217;t seem trivial, and this is a great way to demonstrate my point: Flowint+packet counters to the rescue! Here is a tcpdump output of traffic on port 443 (not including the port 22050 traffic, which is much longer, but the start is the same), so you can see the packets sizes and in which order they do come in this short sessions:</p>
<blockquote><p>
reading from file b31e4624cdc45655b468921823e1b72b.pcap, link-type EN10MB (Ethernet)<br />
03:47:02.571111 IP 192.168.1.10.1031 > 216.246.8.230.443: Flags [S], seq 910650996, win 65535, options [mss 1460,nop,nop,sackOK], length 0<br />
03:47:02.608784 IP 216.246.8.230.443 > 192.168.1.10.1031: Flags [S.], seq 442582883, ack 910650997, win 5840, options [mss 1380,nop,nop,sackOK], length 0<br />
03:47:02.608977 IP 192.168.1.10.1031 > 216.246.8.230.443: Flags [.], ack 1, win 65535, length 0<br />
03:47:02.646959 IP 216.246.8.230.443 > 192.168.1.10.1031: Flags [P.], seq 1:201, ack 1, win 5840, <strong>length 200</strong><br />
03:47:02.647342 IP 192.168.1.10.1031 > 216.246.8.230.443: Flags [P.], seq 1:142, ack 201, win 65335, <strong>length 141</strong><br />
03:47:02.685098 IP 216.246.8.230.443 > 192.168.1.10.1031: Flags [.], ack 142, win 6432, length 0<br />
03:47:02.718986 IP 216.246.8.230.443 > 192.168.1.10.1031: Flags [P.], seq 201:676, ack 142, win 6432, <strong>length 475</strong><br />
03:47:02.718999 IP 216.246.8.230.443 > 192.168.1.10.1031: Flags [F.], seq 676, ack 142, win 6432, length 0<br />
03:47:02.719268 IP 192.168.1.10.1031 > 216.246.8.230.443: Flags [.], ack 677, win 64860, length 0<br />
03:47:02.719584 IP 192.168.1.10.1031 > 216.246.8.230.443: Flags [F.], seq 142, ack 677, win 64860, length 0<br />
03:47:02.757350 IP 216.246.8.230.443 > 192.168.1.10.1031: Flags [.], ack 143, win 6432, length 0
</p></blockquote>
<p>And here is how I sigged it:</p>
<blockquote><p>
# Backdoor:Win32/Tofsee (aka: Gheg / Mondera)<br />
alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:&#8221;Possible Tofsee server Packet 2 (200 Bytes)&#8221;; flow:established,from_server; <strong>flowint:server_packet,=,2; dsize:200; </strong>flowbits:set,Tofsee_SERVER_200; flowbits:noalert; classtype:trojan-activity; sid:9; rev:1;)</p>
<p>alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:&#8221;Possible Tofsee client Packet 3 (141 Bytes)&#8221;; flow:established,from_client; <strong>flowint:client_packet,=,3; dsize:141;</strong> flowbits:isset,Tofsee_SERVER_200; flowbits:set,Tofsee_CLIENT_141; flowbits:noalert; classtype:trojan-activity; sid:10; rev:1;)</p>
<p>alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:&#8221;Possible Tofsee server Packet 4(475 Bytes)&#8221;; flow:established,from_server; <strong>flowint:server_packet,=,4; dsize:475; </strong>flowbits:isset,Tofsee_CLIENT_141; classtype:trojan-activity; sid:11; rev:1;)
</p></blockquote>
<p>Sid 9 looks only for the 2. packet in an established flow from the Server (C&#038;C) and the packet has to have payload size/dsize 200. It then sets the flowbit Tofsee_SERVER_200 if this hits and the rule has noalert, because this could easily trigger a false positive just this check. So we got to do some more checks. Sid 10 checks only Client packet 3, it has to have a payload size/dsize of 141 and flowbit Tofsee_SERVER_200 has to be set for this too match. Sid 10 is also no alert, as we still can check some more, to not be spammed by falses. So sid 11 checks if server packet 4 has payload size/dsize 475, and that flowbit Tofsee_CLIENT_141 is set. No we can give an alert, as this would probably be an unique set of conditions. So testing again with out 2009-04-20-09-05-46.dmp test pcap, we get:</p>
<blockquote><p>
   Num      Rule         Gid      Rev      <strong>Ticks</strong>        %      Checks   <strong>Matches</strong>  Max Ticks   <strong>Avg Ticks</strong>   Avg Match   Avg No Match<br />
  &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8211;<br />
  1        4            1        1        1727862376   63.39  510720   510720   14059784    3383.19     3383.19     0.00<br />
  2        3            1        1        508719672    18.66  508970   82176    3689732     999.51      2830.58     646.95<br />
  3        7            1        1        140271824    5.15   7900     2352     1013800     17755.93    18570.93    17410.42<br />
  4        <strong>9</strong>            1        1        <strong>101662288</strong>    3.73   28419    <strong>0</strong>        6625384     <strong>3577.26</strong>     0.00        3577.26<br />
  5        <strong>11</strong>           1        1        <strong>84264720</strong>     3.09   32938    <strong>0</strong>        612848      <strong>2558.28</strong>     0.00        2558.28<br />
  6        <strong>10</strong>           1        1        <strong>71553560</strong>     2.62   32938    <strong>0</strong>        576132      <strong>2172.37</strong>     0.00        2172.37<br />
  7        5            1        1        42053248     1.54   3313     2517     805736      12693.40    15831.10    2771.81<br />
  8        8            1        1        31547660     1.16   7900     2352     153972      3993.37     7039.04     2702.21<br />
  9        6            1        1        17944504     0.66   3313     2517     292508      5416.39     6476.95     2062.83
</p></blockquote>
<p>Overall, sid 9, 10 and 11 did not do that bad here. And the best thing is, they all have 0 matches. I ran this on many of my test pcaps, and I&#8217;ve not been close to false positives. Sid 10 seems to fire some times, but not the others, so rather unique combo of packets in a stream I guess and a way to sig malware like this. Also, we could add check for the TCP &#8220;PUSH&#8221; flag in sid 9, 10 and 11 etc to be more accurate if we need.</p>
<p>So the proof of the pudding, running it against a pcap of the malware:</p>
<blockquote><p>
   Num      Rule         Gid      Rev      Ticks        %      Checks   <strong>Matches</strong>  Max Ticks   Avg Ticks   Avg Match   Avg No Match<br />
  &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8211;<br />
  1        3            1        1        443120       33.03  165      158      102108      2685.58     2731.72     1644.00<br />
  2        <strong>11</strong>           1        1        310420       23.14  259      <strong>2</strong>        2860        1198.53     2478.00     1188.58<br />
  3        4            1        1        302944       22.58  269      269      15376       1126.19     1126.19     0.00<br />
  4        <strong>10</strong>           1        1        257896       19.22  259      <strong>3</strong>        16484       995.74      7446.67     920.14<br />
  5        <strong>9</strong>            1        1        27088        2.02   10       <strong>3</strong>        7448        2708.80     5080.00     1692.57
</p></blockquote>
<p>Events:</p>
<blockquote><p>
[**] [1:<strong>11</strong>:1] Possible Tofsee server Packet 4(475 Bytes) [**] {TCP} 216.246.8.230:443 -> 192.168.1.10:1031<br />
[**] [1:<strong>11</strong>:1] Possible Tofsee server Packet 4(475 Bytes) [**] {TCP} 84.16.252.136:22050 -> 192.168.1.10:1032
</p></blockquote>
<p>My Tofsee rules fire on all 5 pcaps I looked at initially (and lots more pcaps I tested after that), so hopefully it will fire on all current Tofsee traffic.</p>
<p>I also <a href="http://seclists.org/snort/2011/q4/250">replied</a> on an e-mail to the snort-user list 3. of November, making the same feature request as I did for Suricata. No one followed up :/ The email should probably be directed to the snort-devel list some time in the future&#8230;</p>
<p>I hope this post has been useful, and hopefully we can get some more flowint rules out there, and maybe even get native packet and byte counting in Snort and Suricata one day <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=403</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Security thoughts for 2012+</title>
		<link>http://www.gamelinux.org/?p=384</link>
		<comments>http://www.gamelinux.org/?p=384#comments</comments>
		<pubDate>Fri, 30 Dec 2011 14:15:21 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=384</guid>
		<description><![CDATA[Quoting Richard Bejtlich: &#8220;Prevention will eventually fail!&#8221;
And I have always agreed. Accidents do happen, the world is not perfect. So when companies that really spend time and money on security get breached (RSA, Lockheed, Google, [place your company here?]) then you could work out from the theory that you eventually will get breached too.
When you [...]]]></description>
			<content:encoded><![CDATA[<p>Quoting Richard Bejtlich: &#8220;Prevention will eventually fail!&#8221;</p>
<p>And I have always agreed. Accidents do happen, the world is not perfect. So when companies that really spend time and money on security get breached (RSA, Lockheed, Google, [place your company here?]) then you could work out from the theory that you eventually will get breached too.</p>
<p>When you realize and accept that, you may need to redefine the way you think of IT security. You should prepare for the worst, so identifying what would be &#8220;the worst&#8221; for you (your company) and then identifying you most critical assets should be on the top of your list, and you should start focusing your effort on securing them the most.</p>
<p>Limit the users that have access to the most critical assets (and work on sensitive projects etc). The users also need special attention when it comes to awareness training and follow up. They should also have a good communication with the security staff making it easy to report anything that seems suspicious and get positive feedback no matter what. They are an important part of picking up security issues where your technology fails! So you need them.</p>
<p>The most critical assets needs to be monitored as close to real-time as it gets. The time it takes for an incident detection and till your response should be a minimum, even outside working hours and weekends.</p>
<p>Then the users who has access to theses critical systems should also have special attention/hardening on their OS&#8217;s etc. Use a modern operating system and enabling the security functionality all ready there and making sure that executables cant be executed from temporary directory etc. When you got basic security features in place (Including Anti-Virus), you should start looking at centralized logging and alerting on suspicious activities from the logs.<br />
You should also look into implementing different ways of monitoring anomalies for the users usage. When do they normally log on? From where do they normally log on? Are they fetching lots of documents from the file servers? etc. And did they access the <strong>fake</strong><em> &#8220;secret document&#8221;</em> that is there just for catching any suspicious activity? (You need to define your own anomalies).</p>
<p>When the inner core (most valued assets + its users) are &#8220;secured&#8221;, you should strive to maintain an acceptable level of security on the rest of the corporate office network and also importantly the public facing part. Compromises here can be used to escalate into the &#8220;inner core&#8221; or to damage your reputation and business affairs, so keeping an acceptable level of security here &#8220;as always&#8221; is good.</p>
<p>As &#8220;Prevention will eventually fail!&#8221;, you need to have sufficient logging up and running. So when you do have an incident, the analyst has sufficient data to work with and this will also keep the cost down, as the time it takes to handle an incident will be lower. I&#8217;m mostly into Network Security Monitoring, so for me, NetFlow type data, IDS events, full packet capture, proxy logs, and DNS queries logs are some key logs from network that will help me. On the more host side of logging, the more logging, the better&#8230; web, email, proxy, spam, anti-virus, file-access, local client logs, syslogs/eventlogs, and so on&#8230;.. </p>
<p>And remember &#8211; if you cant spot any badness, you are not looking hard enough <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I always work on the theory that something in my networks are p0wned. That keeps me on my toes and keeps me actively finding new ways to spot badness. </p>
<p>With that &#8211; I wish you all a hacky new year!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=384</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PassiveDNS update (v0.2.4)</title>
		<link>http://www.gamelinux.org/?p=372</link>
		<comments>http://www.gamelinux.org/?p=372#comments</comments>
		<pubDate>Thu, 08 Dec 2011 20:27:41 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[passivedns]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=372</guid>
		<description><![CDATA[It has been some while since I had time to code on my C projects. But the last week I got some time and used it to get PassiveDNS into a state where Im more relaxed about it. Previous version (V0.1.1) used to spit out all DNS data it saw. The latest version caches DNS [...]]]></description>
			<content:encoded><![CDATA[<p>It has been some while since I had time to code on my C projects. But the last week I got some time and used it to get <a href="https://github.com/gamelinux/passivedns"><strong>PassiveDNS</strong></a> into a state where Im more relaxed about it. Previous version (V0.1.1) used to spit out all DNS data it saw. The latest version caches DNS data internally in memory and only prints out a DNS record when it sees if for the first time, or if it is a active domain, it prints it out again after 24 hours and so on (once a day). The previous version would give me Gigabytes of DNS data daily in my test setup, while this version gives me about 2 Megabytes. This version also just gives you<strong> A, AAAA, PTR</strong> and <strong>CNAME</strong> records at the moment. I&#8217;m open for suggestions for more (use-cases would be great too!).</p>
<p>In my tests and in feedback from people who has tried it, <strong>PassiveDNS</strong> is very resource friendly when it comes to CPU usage (more or less idling). In current version (v0.2.4) there is not implemented any limitation on memory usage, so if your network sees a lot of DNS traffic, you might end up using some hundreds of Megabytes RAM for the internal cache. The most I&#8217;ve seen is around 100 MB at the moment. My plan is to implement some sort of &#8220;soft-limit&#8221; on memory usage, so that you can specify how much memory PassiveDNS should maximum use. The &#8220;downside&#8221; of this though, is that PassiveDNS would have to expire domains from its cache faster. That might end up in bigger log files with duplicate entries. When I say &#8220;downside&#8221;, its not a real downside as I see it. From my tests with the example scripts <strong>pdns2db.pl</strong> and <strong>search-pdns.pl</strong>, it is not much of a problem keeping up with insertions to the DB (MySQL) and your last seen timestamp will be a bit more accurate. I guess this kind of data though, is better suited for a NoSQL solution, if you are collecting lots of it.</p>
<p>If you have read this, and you are into Network Security Monitoring, and you don&#8217;t use passive DNS in your work, I recommend you too Google it and read a bit about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=372</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>cxtracker updates (0.9.7 beta)</title>
		<link>http://www.gamelinux.org/?p=358</link>
		<comments>http://www.gamelinux.org/?p=358#comments</comments>
		<pubDate>Sun, 20 Nov 2011 21:53:53 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[cxtracker]]></category>
		<category><![CDATA[daemonlogger]]></category>
		<category><![CDATA[forensics]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=358</guid>
		<description><![CDATA[Thanks to Ian Firns that has implemented custom output formating (sancp like), pcap indexing and pcap capturing (daemonlogger-style)&#8230;!
Starting from commit 6b32fb24db, cxtracker can now, additional to writing flowdata, also do packet-capturing and outputting indexing data about where in the pcap(s) the flow starts and ends. This should potentially bring down the time needed to carve [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://www.securixlive.com/">Ian Firns</a> that has implemented custom output formating (sancp like), pcap indexing and pcap capturing (daemonlogger-style)&#8230;!</p>
<p>Starting from commit <a href="https://github.com/gamelinux/cxtracker/commit/6b32fb24db5f077e2eb682965ed226a17760cb0f">6b32fb24db</a>, cxtracker can now, additional to writing flowdata, also do packet-capturing and outputting indexing data about where in the pcap(s) the flow starts and ends. This should potentially bring down the time needed to carve a session out of a big pcap. Right now, all this is just in beta, but the functionality is there, and there is also an example perl-script to carve out a session based on index-data.</p>
<p>Output fields of interest:<br />
%spf          pcap file containing start packet in session<br />
%spo         pcap file offset of start packet in session<br />
%epf          pcap file containing last packet in session<br />
%epo         pcap file offset of last packet in session</p>
<p>Example on a indexed pcap output, using: &#8220;%spf|%spo|%epf|%epo&#8221;<br />
&#8220;/tmp/test1.pcap.1321821603|10115|/tmp/test1.pcap.1321821809|62704&#8243;</p>
<p>So, basically, if you have a 1 GB pcap file, normally you could use tcpdump with a BPF filter to care out the session you where looking for, reading and searching the whole 1 GB pcap file.</p>
<p>With this addition to cxtracker, you would now be able to spool right to the start-byte off the session and start carving from there until the end-byte of the session. So if the session is placed say 450 MB into the pcap, and ends at 550 MB into the pcap, you basically only have to read and carve in 100 MB of pcap data. In the example perl script (cxt2pcap.pl), the file handle for the file is opened, it would <em>seek</em> to the right place in the pcap (_not_ reading 450 MB of data from your disk) and start reading 100 MB data from your disk and carving+filtering and then close the file handle.</p>
<p>We would love to have some feedbacks here, and to have people test it. Again, it is still beta, so be aware <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Note: Idexing pcap files is nothing new, the <a href="http://metre.net/getpcapfromsancpindex.html">sancp project</a> did add alike features, but was never properly released.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=358</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passive DNS and PassiveDNS/PRADS</title>
		<link>http://www.gamelinux.org/?p=347</link>
		<comments>http://www.gamelinux.org/?p=347#comments</comments>
		<pubDate>Fri, 29 Apr 2011 20:58:30 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[passivedns]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=347</guid>
		<description><![CDATA[For those of you not familiar with the concept of Passive DNS, there are lots of stuff on it on the intertubes&#8230;
Just some of the links:
Some use cases: http://conferences.npl.co.uk/satin/presentations/satin2011slides-Rasmussen.pdf
A public passive dns db: http://www.bfk.de/bfk_dnslogger.html?query=sans.org#result
Or just click here: http://lmgtfy.com/?q=passivedns
I have not found any good tools yet that lets you build your own passive DNS DB, so [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you not familiar with the concept of Passive DNS, there are lots of stuff on it on the intertubes&#8230;</p>
<p>Just some of the links:<br />
Some use cases: <a href="http://conferences.npl.co.uk/satin/presentations/satin2011slides-Rasmussen.pdf">http://conferences.npl.co.uk/satin/presentations/satin2011slides-Rasmussen.pdf</a><br />
A public passive dns db: <a href="http://www.bfk.de/bfk_dnslogger.html?query=sans.org#result">http://www.bfk.de/bfk_dnslogger.html?query=sans.org#result</a><br />
Or just click here: <a href="http://lmgtfy.com/?q=passivedns">http://lmgtfy.com/?q=passivedns</a></p>
<p>I have not found any good tools yet that lets you build your own passive DNS DB, so I have started to walk down that path&#8230;<br />
First off, I have coded a DNS sniffer (<a href="https://github.com/gamelinux/passivedns">passivedns</a>) I have ported the same functionality over into <a href="https://github.com/gamelinux/prads">PRADS</a>. All code is in beta at the moment.</p>
<p>I announce this release, so if anyone is interested, I will take input on the output format <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
My first tests shows that the passive DNS data collected on a small network is too much&#8230; My plan is to implement a in memory &#8220;state&#8221; so that it don&#8217;t prints out the same record more than X times over a time interval (say, if a record is the same, just print it once a day, but if it changes, print it immediate). When that is done, Ill write a parser to feed it into a DB and a query tool to fetch passive DNS records on request.</p>
<p>Feedback is always welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=347</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Packetcapture with Snort using the &#8220;tag&#8221; option</title>
		<link>http://www.gamelinux.org/?p=329</link>
		<comments>http://www.gamelinux.org/?p=329#comments</comments>
		<pubDate>Wed, 02 Mar 2011 12:45:20 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux Distributions]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Snort]]></category>
		<category><![CDATA[Sourcefire]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=329</guid>
		<description><![CDATA[I did this several years ago, but when I switched to full packetcapture I did not have the need for catching pcap of traffic firing a rule.
You can do this with the tag option in Snort. If you want to know more, please read README.tag.
I will present you with a signature that will log the [...]]]></description>
			<content:encoded><![CDATA[<p>I did this several years ago, but when I switched to full packetcapture I did not have the need for catching pcap of traffic firing a rule.</p>
<p>You can do this with the <em><strong>tag</strong></em> option in Snort. If you want to know more, please read <a title="README.tag" href="http://cvs.snort.org/viewcvs.cgi/snort/doc/README.tag?rev=1.1.18.1&amp;sortby=log&amp;content-type=text/vnd.viewcvs-markup" target="_blank">README.tag</a>.</p>
<p>I will present you with a signature that will log the first 1000 bytes or 100 seconds (What ever comes first!) after the packet that triggered the event. Im looking for a SYN flag in a TCP session and I start my logging from there (0,packets means that there are no limits on amount of packets).</p>
<blockquote><p><strong>alert tcp 85.19.221.54 any &lt;&gt; $HOME_NET any (msg:&#8221;GL Log Packet Evil-IP 85.19.221.54 (gamelinux.org)&#8221;; flags:S; tag:session,1000,bytes,100,seconds,0,packets; classtype:trojan-activity; sid:201102011; rev:1;)</strong></p></blockquote>
<p>I use unified2 as output plugin for Snort (something that also Sourcefire 3D does IIRC), so I need to fetch the pcap from the unified log. Snort 2.9.0 and newer ships with a new tool that will help you here, <em><strong>u2boat</strong></em>. This will carve out the pcaps from the unified log:<br />
<code><br />
# u2boat /var/log/snort/&lt;unified.log.timestamp&gt;  /tmp/snort.pcap<br />
</code></p>
<p>From there, you can read the /tmp/snort.pcap with tcpdump or wireshark etc. or just fetch the evil-IP packets:<br />
<code><br />
# tcpdump -r /tmp/snort.pcap -w /tmp/Evil-85.19.221.54-traffic.pcap 'host 85.19.221.54'<br />
</code></p>
<p>If you love it in console, you can read the pcap with tcpflow etc:<br />
<code><br />
# tcpflow -c -r /tmp/Evil-85.19.221.54-traffic.pcap<br />
</code></p>
<p>I did could not seem to verify that the &#8220;0,packets&#8221; actually do work. I added the following line also to my snort.conf:<br />
<code><br />
config_tagget_packet_limit: 0<br />
</code><br />
But again, not sure if it works.</p>
<p>I wanted to do some more testing before releasing this blog, but it has been sitting around for a while, so If I play more with it and have something new, Ill post a new post <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>BTW, turning you Sourcefire 3D into a packetcapture device is easy <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  adding the rule as above, you can just click the &#8220;Download Packet(s)&#8221; Button in the Event Information/Packet Information view <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Use such a rule with care though&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=329</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Update on tuning snort&#8230;</title>
		<link>http://www.gamelinux.org/?p=312</link>
		<comments>http://www.gamelinux.org/?p=312#comments</comments>
		<pubDate>Fri, 28 Jan 2011 13:01:11 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[OpenSourceSoftware]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=312</guid>
		<description><![CDATA[I rearranged the &#8220;menu&#8221; on my blog, and put most items under &#8220;pages&#8221;
I also added my blogpost on how to make snort go faster under linux, and made it a page&#8230;
I updated it and added among some words of DAQ and PF_RING.
If you have any Tips or Tricks on how to tune snort, please mail [...]]]></description>
			<content:encoded><![CDATA[<p>I rearranged the &#8220;menu&#8221; on my blog, and put most items under &#8220;<a href="http://www.gamelinux.org/?page_id=289">pages</a>&#8221;</p>
<p>I also added my blogpost on how to make snort go faster under linux, and made it a page&#8230;<br />
I updated it and added among some words of DAQ and PF_RING.<br />
If you have any Tips or Tricks on how to tune snort, please mail me/add a comment, and Ill update the page.<br />
Read the &#8220;article&#8221; <a href="http://www.gamelinux.org/?page_id=284">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=312</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 years of gamelinux.org&#8230;.</title>
		<link>http://www.gamelinux.org/?p=262</link>
		<comments>http://www.gamelinux.org/?p=262#comments</comments>
		<pubDate>Tue, 25 Jan 2011 05:11:19 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux Distributions]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=262</guid>
		<description><![CDATA[January 2011 gamelinux.org has its 10th birthday&#8230;
Did you know that gamelinux.org started out as the website for GamelinuX, a linux distribution for gaming?
I never got a working release that I wanted to present to the public, and after 2 years of working on the GamelinuX distro, the project came to an halt, as my Master [...]]]></description>
			<content:encoded><![CDATA[<p>January 2011 gamelinux.org has its 10th birthday&#8230;</p>
<p>Did you know that gamelinux.org started out as the website for GamelinuX, a linux distribution for gaming?<br />
I never got a working release that I wanted to present to the public, and after 2 years of working on the GamelinuX distro, the project came to an halt, as my Master degree and personal life took too much time from hacking on the distro. The GamelinuX project got official dead in September 2001 :/ And thinking of it now&#8230; do I have copies of the Alpha CDs somewhere??? I should have, but I dont know where&#8230; :/</p>
<p>My first security related post was in July 2003, when Free-X released an exploit for Xbox, that would let you install linux on it&#8230;</p>
<p>In March 2007, the blog entered its current form, leaving phpnuke/drupal (and clones) for wordpress.</p>
<p>Gamelinux.org has always been about Open Source and hacking (&#8216;as in finding a way to make things work&#8217;). As I started to play with Linux in 1998, Linux has been my OS of choice since. My reasons for continuing to blog security related topics on this domain, was that &#8220;Game Linux&#8221; was for me also associated with <em>&#8220;gaming linux&#8221;</em>, meaning &#8220;hunting linux&#8221; &#8211; find ways to break it/exploit it.</p>
<p>I went online for the first time with my Linux machine in 1998, and went to IRC/EFnet and the channel #Oslo. I asked anyone if they where into hacking/cracking, and asked for pointers on where/how to best start reading and learning more about it. Not long after, some guy told me to look in my /root/ directory and there was a dir that had a dozen of exploits&#8230; I realized that I had been hacked, and decided then not to get back online before I knew more about how to protect my self. The sploit used, IIRC, was a buffer overflow in wu-ftpd that shipped with the Red Hat release then, and wu-ftpd was default enabled <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I stayed offline for about 2 months with my Linux machine, using the university machines to read more about hardening linux, firewalling, IDS, HIDS and such&#8230; As long as I can remember, I have been interested in hacking/cracking and defending from it. So linux+security has been an active interest for ~13 years now, and with my first related job experience ~10 years ago working for a Managed Security Service Provider (MSSP).</p>
<p>Thinking back the last 15 years, it has been some good years. I love what I&#8217;m doing and I have no plans on quitting!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=262</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Yet another rule manager for VRT/ET/ETPRO or Suricata/Snort rules&#8230;</title>
		<link>http://www.gamelinux.org/?p=240</link>
		<comments>http://www.gamelinux.org/?p=240#comments</comments>
		<pubDate>Sun, 09 Jan 2011 21:13:02 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[polman]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=240</guid>
		<description><![CDATA[As I installed a new home router/firewall some months back, I installed it with an IDS (Sguil) just to have something to play with at home. I never got comfy with oinkmaster or pulledpork as I had to dig into config files too much&#8230;
Based on my idea for sidrule on how to manage rules, and [...]]]></description>
			<content:encoded><![CDATA[<p>As I installed a new home router/firewall some months back, I installed it with an IDS (<a href="http://www.sguil.net/">Sguil</a>) just to have something to play with at home. I never got comfy with <a href="http://oinkmaster.sourceforge.net/">oinkmaster</a> or <a href="http://code.google.com/p/pulledpork/">pulledpork</a> as I had to dig into config files too much&#8230;</p>
<p>Based on my idea for <a href="https://github.com/gamelinux/sidrule">sidrule</a> on how to manage rules, and also baring in mind <a href="https://github.com/gamelinux/cerdo">cerdo</a>, I quickly made a <em>sidrule</em> like tool in perl. I talked to some people about it and they liked my approacher on how to do rule management. I got some very positive feedback, so I decided to rewrite it and publish the code (Get  polman 0.3.1 <a href="https://github.com/gamelinux/polman/tarball/polman-0.3.1">here</a>).</p>
<p>To cope with not having a configuration file, you have to start <em>polman</em> with the <em>&#8211;configure</em> option to add a RuleDB (or more) and a Sensor (or more). A RuleDB is a &#8220;database&#8221; that holds rules. The idea is that you can load <a href="http://www.snort.org/snort-rules/">Sourcefire VRT rules for Snort version X.X</a> into one RuleDB, and you can also load <a href="http://rules.emergingthreats.net/open/">Emerging Threats rules for Snort X.X</a> into the same RuleDB and have nice set of rules to play with. As I&#8217;m currently testing Suricata, I can with the same tool, and without any extra configfile or too much hassle, make a second RuleDB, but this time one with the VRT rules and with the ET suricata rules in it. I have one Sensor attached to the Snort RuleDB, and the other one to the Suricata RuleDB. One tool too rule them all&#8230;(LOTR->Lord of the Rules?).</p>
<p>A bit back to the &#8211;configure option. This will enter a ascii menu where you can add and edit <strong>RuleDBs</strong> and <strong>Sensors</strong>. For a RuleDB, you specify where to load the rules from (Currently just filesystem, but http/https is scheduled for next release), name, comment, etc. For a Sensor, you specify name, comment, what RuleDB to use, where to write rules to (a file, for writing all rules to a file or a dir, for writing all rules out into their original filename in that dir), where to write sid-msg.map file, etc.</p>
<p>Once a RuleDB is set up, you can eater from the menu load rules into the RuleDB or from command line. Once a Sensor is setup, and the specified RuleDB has rules in it, you can start to play with the Sensor rules. If you choose to write out rules from the menu straight away, it will turn on all rules that are default turned on by vendor (VRT/ET/ETPRO etc.). When you are back at command line, you can start turning on/off rules. One way I start, is to disable categories that I normally would not enabled in my setup, example:<br />
<code><br />
polman.pl -i SensorA -m "(dos|games|icmp_info|pop3|rpc|scada|scan|snmp|sql|voip)"<br />
</code><br />
This will search through all the rules based on the filename that the rules was loaded from. So from only the &#8220;sql&#8221; entry in my regexp above, it would typically show you all rules that where in the files: <em>emerging-sql.rules, mysql.rules and sql.rules</em>.<br />
You will then be faced with some questions&#8230; Disable them all? or Enable them all? (With this particular search, I disable all the rules). There is also a third option, and that is to go through the rules, rule for rule, to make a conscious decision after you read the raw rule. If you choose to enable all rules, or based on rule for rule, you can change behavior of the rules to. Most rules are set to action &#8220;<strong>alert</strong>&#8220;, but if you choose to enable rules, you will have the option to change action for rules (to alert,log,pass,drop,reject,sdrop,default or current). The option &#8220;default&#8221; and &#8220;current&#8221; may need some explanation&#8230; Default will set the rule to the default action that was set by the vendor. Current will leave the rule(s) as they are defined for the sensor (say you have set an alert rule to drop before, the rule will keep the current action for the rule, which is drop).</p>
<p>There are some powerful searches built into polman. You can search in field classtype, metadata and msg at the same time. You can also search in &#8220;fields&#8221; &#8216;default enabled/disabled&#8217; (Vendor state of the rule)  and category (which is default filename where the rule was loaded from).<br />
Example:<br />
Say you want to search all rules that VRT classifies in their most secure config:<br />
<code>polman.pl -i SensorA -p "policy security-ips drop"</code><br />
(You can then enable them all, and set action to <em>drop</em>).<br />
Say you want to limit your search, and you only want to search for Zeus/Zbot traffic&#8230;<br />
<code>polman.pl -i SensorA -p "policy security-ips drop" -s "(Zeus|Zbot)"</code><br />
Now you can enable them all, and set action to <em>drop</em> <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you have a sid, or a list of sids, you can enable (-e) or disable (-d) them rather easy&#8230;<br />
<code>polman.pl -i SensorA -e sid1,sid2,sid3,....,sid<em>N</em></code></p>
<p>To load rules into a RuleDB from command line:<br />
<code>polman.pl -r RuleDB1 -u</code></p>
<p>To write out rules for a sensor to a file (or files if a dir is specified):<br />
<code>polman.pl -i SensorA -w</code><br />
This also writes out the sid-msg.map file&#8230;</p>
<p>There is nothing wrong about reusing the same Sensor rules across multiple sensor. Indeed that is one of the reasons that I choose the name policy manager, as they don&#8217;t need to be looked upon as Sensors that you define, but also Policies (I have thought about naming of Sensor/Policies a lot). In the future I hope to finish the implementation of <em>Thresholding</em> and <em>Suppression</em> too, so that you can edit them quickly from command line.</p>
<p>Thoughts and feedback are welcome on this blog or <a href="https://github.com/gamelinux/polman/issues">here</a>!<br />
Project on github <a href="https://github.com/gamelinux/polman/">here</a>.<br />
An example on how to use polman <a href="https://github.com/gamelinux/polman/raw/master/doc/EXAMPLE.txt">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=240</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>OISF Suricata 1.1.0 beta 1 debian package for Ubuntu 10.04</title>
		<link>http://www.gamelinux.org/?p=234</link>
		<comments>http://www.gamelinux.org/?p=234#comments</comments>
		<pubDate>Sun, 26 Dec 2010 21:14:47 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux Distributions]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sguil]]></category>
		<category><![CDATA[Suricata]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=234</guid>
		<description><![CDATA[I also got time to put together a package for the latest version of Suricata, namely 1.1 beta1.
My plan was to stick to a stable version when OISF released 1.0.3, but they skipped that, and went for a 1.1 release instead.
As I also try to help out where I can, I don&#8217;t mind running beta [...]]]></description>
			<content:encoded><![CDATA[<p>I also got time to put together a package for the latest version of Suricata, namely <em>1.1 beta1</em>.</p>
<p>My plan was to stick to a stable version when OISF released 1.0.3, but they skipped that, and went for a 1.1 release instead.<br />
As I also try to help out where I can, I don&#8217;t mind running beta software, and reporting bugs etc. when and if I can. I&#8217;ll probably pack <em>beta2</em> and so on until OISF hits a stable release, and then I&#8217;ll stick with that in my <a href="https://launchpad.net/~ebf0/+archive/gamelinux/">gamelinux PPA</a>.  So until then, I hope you try out Suricata with me on the quest for a stable release <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Read more about <em>suricata 1.1 beta 1</em> <a href="http://www.inliniac.net/blog/2010/12/21/suricata-1-1beta1-released.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=234</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sourcefire daq-0.5 and Snort-2.9.0.3 debian packages for Ubuntu 10.04</title>
		<link>http://www.gamelinux.org/?p=229</link>
		<comments>http://www.gamelinux.org/?p=229#comments</comments>
		<pubDate>Sun, 26 Dec 2010 20:58:17 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux Distributions]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sguil]]></category>
		<category><![CDATA[Snort]]></category>
		<category><![CDATA[Sourcefire]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=229</guid>
		<description><![CDATA[Well, I did get a small hour to play today, so I packed updated versions for snort and daq, namely Snort-2.9.0.3 and daq-0.5.
You can read some more details about my last build of the packages here.
My PPA can be found here.
Comments and suggestions are welcome  
]]></description>
			<content:encoded><![CDATA[<p>Well, I did get a small hour to play today, so I packed updated versions for snort and daq, namely <a href="http://www.snort.org/snort-downloads">Snort-2.9.0.3 and daq-0.5</a>.</p>
<p>You can read some more details about my last build of the packages <a href="http://www.gamelinux.org/?p=211">here</a>.</p>
<p>My PPA can be found <a href="https://launchpad.net/~ebf0/+archive/gamelinux/">here</a>.</p>
<p>Comments and suggestions are welcome <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=229</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sourcefire daq-0.4 and Snort-2.9.0.2 debian packages for Ubuntu 10.04</title>
		<link>http://www.gamelinux.org/?p=211</link>
		<comments>http://www.gamelinux.org/?p=211#comments</comments>
		<pubDate>Sun, 19 Dec 2010 20:47:39 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux Distributions]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sguil]]></category>
		<category><![CDATA[Snort]]></category>
		<category><![CDATA[Suricata]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=211</guid>
		<description><![CDATA[Moving to the new Snort 2.9 version, it added dependencies on a new library, namely DAQ(Data Acquisition library) for packet I/O.
So the little extra of packaging a new deb (daq) and check snort-debian files that they where compliant to the new version, made me debianize Suricata instead, as I saw that as quicker way to [...]]]></description>
			<content:encoded><![CDATA[<p>Moving to the new <a href="http://www.snort.org/"><strong>Snort</strong></a> 2.9 version, it added dependencies on a new library, namely <strong>DAQ</strong>(Data Acquisition library) for packet I/O.</p>
<p>So the little extra of packaging a new deb (daq) and check snort-debian files that they where compliant to the new version, made me debianize <a href="http://www.openinfosecfoundation.org/index.php/download-suricata">Suricata</a> instead, as I saw that as quicker way to get an IDS up and running on my new firewall at home.</p>
<p>Now that I have suricata in place, plus some extra time last night, and I see people struggling trying to install/upgrade to Snort 2.9 on Ubuntu, I could not help my self trying to be helpful, again&#8230;</p>
<p>So I made debian packages and put them in <a href="https://launchpad.net/~ebf0/+archive/gamelinux">my Ubuntu 10.04 Lucid PPA</a> on launchpad. I started a new clean debian package for Snort. Its not yet packed with &#8220;debian-easy-features&#8221;, so it just installs Snort, makes the directories and adds some default configuration files. I will improve this as I go.</p>
<p>DAQ is built with:</p>
<blockquote><p>
Build AFPacket DAQ module.. : yes<br />
Build Dump DAQ module&#8230;&#8230; : yes<br />
Build IPFW DAQ module&#8230;&#8230; : yes<br />
Build IPQ DAQ module&#8230;&#8230;. : no<br />
Build NFQ DAQ module&#8230;&#8230;. : no<br />
Build PCAP DAQ module&#8230;&#8230; : yes
</p></blockquote>
<p>And Snort is compiled with:</p>
<blockquote><p>
&#8211;enable-perfprofiling<br />
&#8211;enable-ipv6<br />
&#8211;enable-sourcefire<br />
&#8211;enable-dynamicplugin<br />
&#8211;enable-targetbased<br />
&#8211;enable-zlib<br />
&#8211;enable-ppm<br />
&#8211;enable-gre<br />
&#8211;enable-mpls<br />
&#8211;enable-decoder-preprocessor-rules<br />
&#8211;without-mysql<br />
&#8211;without-postgresql
</p></blockquote>
<p>So, if you add my PPA, you apt-get install snort version 2.9.0.2. Pronto though, Snort 2.9.0.3 will be out, and I&#8217;ll upgrade accordingly. Suricata will also soon be out in 1.0.3, hopefully this week. Maybe we get fresh releases from this Santa for both engines <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Until then,</p>
<p>-*&gt; Snort! &lt;*-<br />
Version 2.9.0.2 IPv6 GRE (Build 92)<br />
By Martin Roesch &#038; The Snort Team: http://www.snort.org/snort/snort-team<br />
Copyright (C) 1998-2010 Sourcefire, Inc., et al.<br />
Using libpcap version 1.0.0<br />
Using PCRE version: 7.8 2008-09-05<br />
Using ZLIB version: 1.2.3.3</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=211</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>nftracker &#8211; The Network File Tracker&#8230;</title>
		<link>http://www.gamelinux.org/?p=193</link>
		<comments>http://www.gamelinux.org/?p=193#comments</comments>
		<pubDate>Wed, 15 Dec 2010 18:09:31 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux Distributions]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[nftracker]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=193</guid>
		<description><![CDATA[To fulfill my dream of automatic carving of files from network traffic, I wrote nftracker. The software is not 100% done, but well enough to deserve a  blog post and to get a wider audience for testing! Some more file signatures could be added, especially for &#8220;Content-Type: &#8221; in http or smtp traffic.
( I [...]]]></description>
			<content:encoded><![CDATA[<p>To fulfill my dream of automatic carving of files from network traffic, I wrote <a href="https://github.com/gamelinux/nftracker"><strong>nftracker</strong></a>. The software is not 100% done, but well enough to deserve a  blog post and to get a wider audience for testing! Some more file signatures could be added, especially for &#8220;<strong>Content-Type:</strong> &#8221; in <em>http</em> or <em>smtp</em> traffic.</p>
<p>( I know I could have done something similar just writing snort/suricata rules. I could even write a snort preprocessor.. But hey! )</p>
<p>I also want to graph info from nftracker, such as how many files of type <em>X</em> traverse my network today, last week, month, year, etc..</p>
<p>A common first question from people is: <em>Does it also carve out the files</em>?<br />
Answer: <em>No</em></p>
<p>At this point, I just want to know whats on the wire. It would be cool to also carve out the file and dump it to disk (patches are welcome <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ), but for now I use other tools to do this. First of all, I use <a href="http://www.OpenFPC.org/">OpenFPC</a> to do full packet capture. Mostly I have been using <a href="http://tcpxtract.sourceforge.net/">tcpxtract</a> and I have also tested <a href="http://www.malforge.com/npeid/xtract.py">xtract.py</a>. I see it as a bigger task to take on TCP reassembly and carving out the file correct, especially when I already have the pcap of the session, I can handle that offline. I also recommend <a href="http://www.xplico.org/">xplico</a> btw. </p>
<p>Default, nftracker logs to <em>/var/log/nftracker-csv.log</em>. The logfile looks like this:</p>
<blockquote><p>
<strong># timestamp,[         session             ],FILE_TYPE<br />
# timestamp,proto,src_ip,src_port,dst_ip,dst_port,FILE_TYPE</strong><br />
1291893772,6,85.19.221.54,42696,217.147.81.2,80,exe<br />
1292119164,6,217.69.134.176,51630,85.19.221.54,80,pdf<br />
1292142613,6,85.19.221.54,59406,78.46.89.231,80,png<br />
1292144009,6,85.19.221.54,34695,78.46.89.231,80,png<br />
1292149647,6,85.19.221.54,43602,160.68.205.242,80,cws<br />
1292414981,6,220.181.51.117,17942,85.19.221.54,80,pdf<br />
1292427913,6,67.195.115.110,47998,85.19.221.54,80,pdf<br />
1292435336,6,194.8.74.53,2206,85.19.221.54,80,html
</p></blockquote>
<p>I hope the tool is useful for someone, ideas/comments and such can be mailed to me.<br />
I hope you try it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=193</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>multicap &#8211; multi interface networkstream dump daemon</title>
		<link>http://www.gamelinux.org/?p=182</link>
		<comments>http://www.gamelinux.org/?p=182#comments</comments>
		<pubDate>Mon, 29 Nov 2010 22:12:35 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux Distributions]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=182</guid>
		<description><![CDATA[Two weeks ago, I was made aware of a new tool to do packet captures with that looks promising. The initial commit seems to be from 2010-10-27 from the looks of the git repo found here.
To test it,
git clone git://git.carnivore.it/multicap.git
cd multicap
autoreconf -i
./configure
make
sudo ./multicap -w /tmp/ -c $PWD/multicap.conf.dist

You will find your pcaps under /tmp/var/log/multicap/.
I specially like [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago, I was made aware of a new tool to do packet captures with that looks promising. The initial commit seems to be from 2010-10-27 from the looks of the git repo found <a href="http://src.carnivore.it/multicap/">here</a>.</p>
<p>To test it,<br />
<code>git clone git://git.carnivore.it/multicap.git<br />
cd multicap<br />
autoreconf -i<br />
./configure<br />
make<br />
sudo ./multicap -w /tmp/ -c $PWD/multicap.conf.dist<br />
</code><br />
You will find your pcaps under /tmp/var/log/multicap/.</p>
<p>I specially like the possibilities with this tool, that I can read/interpret  from the config file. You can do &#8220;multi-sniffing&#8221;, writing to different logfiles filtered on BPF, specify different interfaces, snaplength, log rotation&#8230; Take a look at the <a href="http://src.carnivore.it/multicap/tree/multicap.conf.dist">configfile</a> to see what I mean.<br />
This is a tool to keep an eye on!<br />
The project is young it seems, as passing &#8211;help option to multicap does not say anything&#8230;<br />
Looking at the code, I know why <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>// show_version(NULL);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=182</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suricata 1.0.2 Debian/Ubuntu package</title>
		<link>http://www.gamelinux.org/?p=172</link>
		<comments>http://www.gamelinux.org/?p=172#comments</comments>
		<pubDate>Tue, 23 Nov 2010 18:39:52 +0000</pubDate>
		<dc:creator>Edward Bjarte Fjellskål</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux Distributions]]></category>
		<category><![CDATA[OpenSourceSoftware]]></category>
		<category><![CDATA[Suricata]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[forensics]]></category>

		<guid isPermaLink="false">http://www.gamelinux.org/?p=172</guid>
		<description><![CDATA[In stead of compiling Suricata over and over again on different hosts I have&#8230; I just made a debian package for my Ubuntu Lucid 10.04 systems.
Its a simple build, and Ill hopefully update it with time to incorporate different usage and install help etc.
Right now its just aimed at being a simple IDS using libpcap.
You [...]]]></description>
			<content:encoded><![CDATA[<p>In stead of compiling <a href="http://openinfosecfoundation.org/index.php/download-suricata">Suricata</a> over and over again on different hosts I have&#8230; I just made a debian package for my Ubuntu Lucid 10.04 systems.</p>
<p>Its a simple build, and Ill hopefully update it with time to incorporate different usage and install help etc.<br />
Right now its just aimed at being a simple IDS using libpcap.</p>
<p>You can find suricata and other cool NSM stuff at my gamelinux PPA found <a href="https://launchpad.net/~ebf0/+archive/gamelinux">here</a>.</p>
<p><code>apt-get install suricata<br />
cd /etc/suricata/ &#038;&#038; wget http://rules.emergingthreats.net/open/suricata/emerging.rules.tar.gz<br />
vim /etc/default/suricata<br />
vim /etc/suricata/suricata.yaml<br />
/etc/init.d/suricata start<br />
</code><br />
Feedback and thoughts are welcome and needed <img src='http://www.gamelinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamelinux.org/?feed=rss2&amp;p=172</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
