<?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>Acktomic.com - Security Concerns &#124; Acktomic.com - Security Concerns</title>
	<atom:link href="http://acktomic.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://acktomic.com</link>
	<description>building better sandcastles</description>
	<lastBuildDate>Sat, 06 Apr 2013 05:06:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Riemann for windows monitoring</title>
		<link>http://acktomic.com/2013/04/05/riemann-for-windows-monitoring/</link>
		<comments>http://acktomic.com/2013/04/05/riemann-for-windows-monitoring/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 02:40:40 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[log management]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[OSSEC]]></category>
		<category><![CDATA[Riemann]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=147</guid>
		<description><![CDATA[&#160; Riemmann as a general purpose monitoring system for Microsoft Windows Riemann is an up and coming event stream processor. It is one of those projects that you take a look at and think this is nice, but not ready yet. A year has passed since I made that observation. &#8230;]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<h2><a href="http://acktomic.com/wp-content/uploads/2013/04/logo-header-riemann.png">Riemmann as a general purpose monitoring system for Microsoft Windows<br />
</a></h2>
<p><a href="http://acktomic.com/wp-content/uploads/2013/04/logo-header-riemann.png"><img class="alignnone size-full wp-image-150" alt="logo-header-riemann" src="http://acktomic.com/wp-content/uploads/2013/04/logo-header-riemann.png" width="160" height="61" /></a><a href="http://riemann.io/">Riemann</a> is an up and coming event stream processor. It is one of those projects that you take a look at and think this is nice, but not ready yet. A year has passed since I made that observation. This is a project followed by high profile monitoring folks. This very dynamic system  has a similar philosophy as Graphite. Riemann filters, combines and acts on flows of events.</p>
<p>I like elegant. Riemann is very elegant, it acts as a stream processor like <a href="http://esper.codehaus.org/">ESPER</a>, but built with a monitoring angle to make it more intuitive and easy to work with. Riemann listens and acts, it does not have a scheduler like Shinken, Zabbix or OpenNMS. It depends on application libraries, clients, scripts or agents to forward data to it.</p>
<p>A lot of the things I have privately ranted about in Shinken, which don&#8217;t take me wrong,  I am a great fan of, are gracefully handled in Riemann. Notably the way rules are defined/managed, including tags as part of the event stream, full use of all cpus, not having to predefine all possible events to monitoring them, not interrupting monitoring flow  to load new rules, streamed updates to dashboards, flexible dependency model and more.</p>
<p>The open-source Swiss knife of the future is really shaping up with Riemann dealing with events, Graphite for time-series and logstash for logs (I am a fan of Splunk, but there is no current integration between the two).</p>
<p>For internal linux/UNIX, applications and cloud-type application monitoring Riemann is IMO a viable proposition with version 0.2. For general purpose monitoring, not so much for network devices and Windows.</p>
<h2>What Riemann needs to succeed in general purpose monitoring</h2>
<p>For it to succeed in general purpose monitoring I believe it needs :</p>
<ul>
<li>Integration with a solid Windows agent to receive streamed data (like statsd or diamond) but for Windows; update: <a href="https://github.com/BlueMountainCapital/riemann-health-windows/network">Riemann-health for windows</a> Seems like a good start, but modifying it requires to modify C# code, recompile and redeploy. :-/ Support for things like process monitoring, executing local commands, scripts and more</li>
<li>Integration with a solid SNMP polling system that would use Riemann as its back end; Collectd is there, but alternatives would be welcome. Something like a stripped down version of Cricket that just sends data to Riemann and Graphite.</li>
<li>Professional full time backing (Kyle Kingsbury, the main author just accepted a full time job&#8230;) Good for him, but so-so for the project. More developers are contributing to the project which is good. I could envision starting a company to implement Riemann based systems</li>
<li>A dashboard element for displaying streamed text events/logs (On the road map, per Kyle K.)</li>
<li>A dashboard element or alternate dashboard for displaying graphical status data. Based on vector graphic backgrounds and status widgets sitting on top of the image to show changes. Think of Nagvis and the plethora of industrial HMIs like Wonderware, OSIsoft PI processbook, etc.</li>
<li>Ability to drill down into dashboards to view dependency relations (Think Big Brother/Xymon dashboard drill downs) Though this may be impossible simply due to the nature of how Riemann works?!</li>
<li>A security model for the data acquisition and API</li>
<li>Cookbook type recipes that can be used to to understand how a typical monitoring workflow might handle calculations, thresholds, rate limiting, dependencies(parent/child), state changes and finally output to graphite/request-tracker/email/pagerduty. Single examples are nice, but how does it *really* come together and how to maintain it.</li>
<li>Having some place to store and retrieve textual events</li>
<li>Role based controls for the dashboard</li>
<li>An HA strategy</li>
</ul>
<p>Side note: Riemann is a project with immense potential for lightweight industrial controls monitoring. Having a listening module for modbus or even OPC UA  would really light a fire under the archaic beasts that the industrial monitoring/controls suppliers are using. Ok, getting back to Windows.</p>
<h2>Windows sources of events</h2>
<p>Windows operating system status and events are typically monitored via these methods</p>
<ol>
<li>Windows event log
<ol>
<li>Can be handled via agents like NSCA++, OSSEC, SNARE, custom agents for SIEM/logging software which would need to be able to forward the data to Riemann in a second step</li>
</ol>
</li>
<li>Windows PDH API (performance monitor counters)
<ol>
<li>Handled by local agents (riemann-health-windows) or via WMI, but this becomes polling based monitoring</li>
</ol>
</li>
<li>Custom event logs
<ol>
<li>Can be handled via agents like NSCA++, OSSEC, another SNARE agent, custom agents for SIEM/logging software which would need to be able to forward the data to Riemann in a second step</li>
</ol>
</li>
<li>External monitoring via the network of services
<ol>
<li>Centralized polling from collectd could do the job but alternatives would be nice;</li>
<li>Shinken/Munin/other as the active poller and then streaming events to Riemann to dashboard??</li>
</ol>
</li>
<li>Scripted monitoring via a local agent
<ol>
<li>Local agent, like ???</li>
</ol>
</li>
</ol>
<h2>A great project needs a leader and contributors</h2>
<p>This project has great potential and I sincerely hope that the main developer continues to work on it and that companies continue to contribute (money, resources, dev offers, etc.) to his effort to develop it.</p>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2013/04/05/riemann-for-windows-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSSEC Tips and Quirks</title>
		<link>http://acktomic.com/2013/04/05/ossec-tips-and-quirks/</link>
		<comments>http://acktomic.com/2013/04/05/ossec-tips-and-quirks/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 00:51:46 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[HIDS]]></category>
		<category><![CDATA[log management]]></category>
		<category><![CDATA[OSSEC]]></category>
		<category><![CDATA[paloalto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=136</guid>
		<description><![CDATA[OSSEC Tips and Quirks OSSEC is a pretty nifty tool to collect, parse and categorize events. Though it sometimes feels like a party entering the second level of the Proving Grounds of the Mad Overlord. You feel like your are getting there but you know some crazy vorpal bunny is &#8230;]]></description>
				<content:encoded><![CDATA[<h2>OSSEC Tips and Quirks</h2>
<p><a href="http://acktomic.com/wp-content/uploads/2013/03/ossec-hids.png"><img alt="ossec-hids" src="http://acktomic.com/wp-content/uploads/2013/03/ossec-hids.png" width="191" height="67" /></a>OSSEC is a pretty nifty tool to collect, parse and categorize events. Though it sometimes feels like a party entering the second level of the Proving Grounds of the Mad Overlord. You feel like your are getting there but you know some crazy vorpal bunny is out for you. You might not be wrong..</p>
<h2>Milwa my Regex</h2>
<p>First, the <a href="http://www.ossec.net/doc/syntax/regex.html">regex library</a> has the bare minimum using the following tricks will help along the way.</p>
<ol>
<li>Use the after_parent, after_prematch inside your pattern match directives.</li>
<li>Use the your ^ $ anchors</li>
<li>The | (logical OR) is globally scoped and can&#8217;t be used within a field extraction ()</li>
<li>If you think of doing anything fancy, think again, it probably isn&#8217;t directly supported</li>
<li>If you bother to extract fields, use them in the rules.. It is more efficient and readable.</li>
</ol>
<h2>Dialma my Decoder</h2>
<p>This is my list to help me get around to making good Decoders. I am by no means an expert in this stuff, but I will add more as I go along. The OSSEC book is great, but lacks in lighting some of the darker halls.</p>
<ol>
<li>Decoded_as is really nifty, but cannot be used to reference child decoders</li>
<li>More than one decoder can be used for the same root decoder
<ol>
<li>The child decoders can be used to deal with different events</li>
<li>The child can also be used one after the other to deal with an event that may have different forms. Due to fields may not in the same place depending on the software version or features enabled.</li>
<li>It also may be hard to create a single regex to extract different fields of the same event</li>
</ol>
</li>
<li>If you have a commonality between events you should structure your decoders in a tree like manner</li>
<li>madirish.net has a great post on <a href="http://www.madirish.net/293">writing a new decoder</a> step by step</li>
<li>You cannot arbitrarily create new fields, you have to work with what is there. (If anyone can show me the contrary I will be happy document how to add them (other than hacking the code)</li>
</ol>
<h2>Tiltowait the Rules</h2>
<ol>
<li> If you wish to monitor a log file for which no decoder exists, add the path to the file in your ossec.conf and simply create a rule that does a &lt;match&gt;blah&lt;/match&gt;.  Of course, this means, ALL your logs will hit his rule. So consider this a quick fix for a critical issue, that will need to be addressed down the line.</li>
<li>Use your decoded fields (as mentioned to the regex section)</li>
<li>If you have any rules that need to match against a list of things, use the <a href="http://www.ossec.net/doc/manual/rules-decoders/rule-lists.html">lookup tables</a> as described in the book and documentation. This comes up a lot on the mailing list, but then again, some people don&#8217;t read the documentation.</li>
</ol>
<h2>Dumapic for the human</h2>
<p>The OSSEC server is the workhorse, but humans need a method to interact with the data from OSSEC, here are the IMO best choices for doing this at this current time and date. Pre-built dashboards, reports, field extractions, etc.</p>
<ol>
<li><span class="Apple-style-span" style="line-height: 15px;">Splunk with the Splunk for OSSEC application</span></li>
<li>OSSEC Web UI</li>
</ol>
<p>Some parsing and field extractions work may be needed for commercial offerings</p>
<ol>
<li>Commercial SIEM tools (Batteries not included)</li>
</ol>
<p>Base building blocks for search and reporting on the collected data, nothing pre-built.</p>
<ol>
<li>Elastic search + Kibana</li>
<li>Logstash + Kibana</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2013/04/05/ossec-tips-and-quirks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PaloAlto firewall integration with OSSEC &#8211; Part 2</title>
		<link>http://acktomic.com/2013/03/26/paloalto-firewall-integration-with-ossec-part-2/</link>
		<comments>http://acktomic.com/2013/03/26/paloalto-firewall-integration-with-ossec-part-2/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 02:47:45 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[HIDS]]></category>
		<category><![CDATA[log management]]></category>
		<category><![CDATA[NSM]]></category>
		<category><![CDATA[OSSEC]]></category>
		<category><![CDATA[paloalto]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[SIEM]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=114</guid>
		<description><![CDATA[OSSEC + Palo-Alto OSSEC out of the box does not include any decoders or rules for Palo-Alto Networks Next-Generation firewalls. This is part 2 of PaloAlto firewall integration with OSSEC. Read part one to learn how to create the basic decoder, a threat decoder and rules. In this part we will &#8230;]]></description>
				<content:encoded><![CDATA[<h2>OSSEC + Palo-Alto</h2>
<p><a href="http://acktomic.com/wp-content/uploads/2013/03/ossec-hids.png"><img alt="ossec-hids" src="http://acktomic.com/wp-content/uploads/2013/03/ossec-hids.png" width="191" height="67" /></a>OSSEC out of the box does not include any decoders or rules for Palo-Alto Networks Next-Generation firewalls. This is part 2 of PaloAlto firewall integration with OSSEC. <a title="PaloAlto Firewall integration with OSSEC" href="http://acktomic.com/2013/03/23/ossec-and-palo-alto-firewall-logging-integration/">Read part one to learn how to create the basic decoder, a threat decoder and rules</a>. In this part we will learn how to decode SYSTEM and CONFIG event logs.</p>
<h2>Decoding Palo-Alto syslog messages</h2>
<p><a href="http://acktomic.com/wp-content/uploads/2013/03/paloalto_medium-300x68.jpg"><img alt="paloalto_medium-300x68" src="http://acktomic.com/wp-content/uploads/2013/03/paloalto_medium-300x68.jpg" width="186" height="42" /></a> The general decoder for PaloAlto firewalls is defined in part one. Now we need to decode SYSTEM and CONFIG event logs. Each type of logs has different arguments, but they still follow the same comma delimited format. We will use the following two log messages for our decoders.</p>
<pre><span style="font-family: Courier New; font-size: small;">Mar 19 18:05:17 192.168.1.1 1,2013/03/19 18:05:17,0016A102121,
CONFIG,0,0,2013/03/19 18:05:17,192.168.1.120,,commit,username,Web,Submitted,,993,0x0</span></pre>
<pre><span style="font-family: Courier New; font-size: small;">Mar 19 18:34:27 192.168.1.1 1,2013/03/19 18:34:27,0016A102121,
SYSTEM,general,0,2013/03/19 18:34:27,,general,,0,0,general,high,
System restart requested by username,1261490,0x0</span></pre>
<h2>Identify the types of event and extract fields</h2>
<p>Add the following decoders to your $OSSEC/etc/local_decoder.xml file.</p>
<p>CONFIG events:</p>
<pre>&lt;!-- Custom decoder for PaloAlto Firewalls CONFIG Events --&gt;
&lt;decoder name="paloalto-config"&gt;
 &lt;parent&gt;paloalto&lt;/parent&gt;
 &lt;prematch offset="after_parent"&gt;^CONFIG,&lt;/prematch&gt;
 &lt;regex offset="after_parent"&gt;^(CONFIG),\.*,\.*,\.*,(\d+.\d+.\d+.\d+),\.*,(\w+),(\w+),&lt;/regex&gt;
 &lt;order&gt;id,srcip,action,srcuser&lt;/order&gt;
&lt;/decoder&gt;</pre>
<p>Extracted fields are based on what can help for policy and correlation rules. The decoder will extract the required information and fill the OSSEC variables.</p>
<ul>
<li>id of the event (CONFIG)</li>
<li>Source IP</li>
<li>Configuration action that was submitted</li>
<li>Source user of the action</li>
</ul>
<pre>&lt;!-- Custom decoder for PaloAlto Firewalls SYSTEM Events --&gt;
&lt;decoder name="paloalto-system"&gt;
 &lt;parent&gt;paloalto&lt;/parent&gt;
 &lt;prematch offset="after_parent"&gt;^SYSTEM,&lt;/prematch&gt;
 &lt;regex offset="after_parent"&gt;^(SYSTEM,\w*),\.*,\.*,\.*,\.*,\.*,\.*,\.*,\.*,(\w+),(\.*),\.*,&lt;/regex&gt;
 &lt;order&gt;id,status,action&lt;/order&gt;
&lt;/decoder&gt;</pre>
<p>Extracted fields:</p>
<ul>
<li>The id of system event (SYSTEM,sub-id)</li>
<li>The severity/status of the event (informational, low, medium, high, critical)</li>
<li>The action message including the username that generated the event</li>
</ul>
<p>This last one is a bit problematic as both the message and the event are important, but they cannot easily be parsed, so we just group &#8216;em together.</p>
<h2>Creating rules for CONFIG events</h2>
<p>Configuration events are more unique and need rules to target events that are matched to policies.</p>
<p>Add the rules to your $OSSEC/rules/local_rules.xml file.</p>
<p><span style="color: #ff0000;">AUTHORS NOTE : Rules cannot use the decoded_as to refer to a child decoder. argh. Feature request to come… I have updated the rules to reflect this and use the id to include the event identifier (CONFIG, SYSTEM or THREAT)</span></p>
<pre>&lt;group name="syslog,paloalto,config,"&gt;
  &lt;rule id="101200" level="3"&gt;
    &lt;decoded_as&gt;paloalto&lt;/decoded_as&gt;
    &lt;id&gt;^CONFIG&lt;/id&gt;
    &lt;description&gt;PaloAlto Firewall Config Event&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101201" level="3"&gt;
    &lt;if_sid&gt;101200&lt;/if_sid&gt;
    &lt;action&gt;commit&lt;/action&gt;
    &lt;group&gt;config_changed&lt;/group&gt;
    &lt;description&gt;Configuration changed and commited&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101202" level="10"&gt;
   &lt;if_sid&gt;101200&lt;/if_sid&gt;
   &lt;time&gt;7:00 pm – 8:00 am&lt;/time&gt;
   &lt;description&gt;Configuration changed outside business hours.&lt;/description&gt;
   &lt;group&gt;policy_violation&lt;/group&gt;
  &lt;/rule&gt;</pre>
<p>Other interesting events to consider :</p>
<ul>
<li>Add/remove users</li>
<li>Change administrative privileges</li>
<li>Source IP doing the changes</li>
<li>Expected user doing changes (and type of changes)</li>
</ul>
<h2> Creating rules for SYSTEM events</h2>
<p>System events have a severity, let&#8217;s start by classifying them by severity.</p>
<p>Add the rules to your $OSSEC/rules/local_rules.xml file.</p>
<pre>&lt;group name="syslog,paloalto,system,"&gt;

  &lt;rule id="101100" level="3"&gt;
    &lt;decoded_as&gt;paloalto&lt;/decoded_as&gt;
    &lt;id&gt;^SYSTEM&lt;/id&gt;
    &lt;description&gt;PaloAlto Firewall System Event&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101101" level="8"&gt;
    &lt;if_sid&gt;101100&lt;/if_sid&gt;
    &lt;status&gt;critical&lt;/status&gt;
    &lt;description&gt;Critical system event!&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101102" level="3"&gt;
    &lt;if_sid&gt;101100&lt;/if_sid&gt;
    &lt;status&gt;high&lt;/status&gt;
    &lt;description&gt;High system event!&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101103" level="2"&gt;
    &lt;if_sid&gt;101100&lt;/if_sid&gt;
    &lt;status&gt;medium&lt;/status&gt;
    &lt;description&gt;Medium system event!&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101104" level="2"&gt;
    &lt;if_sid&gt;101100&lt;/if_sid&gt;
    &lt;status&gt;low&lt;/status&gt;
    &lt;description&gt;Low system event!&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101105" level="0"&gt;
    &lt;if_sid&gt;101100&lt;/if_sid&gt;
    &lt;status&gt;informational&lt;/status&gt;
    &lt;description&gt;Informational system event!&lt;/description&gt;
  &lt;/rule&gt;</pre>
<p>&nbsp;</p>
<p>Some events are categorized as medium with a level=2, but really we want to raise their level.</p>
<pre>  &lt;rule id="101106" level="8"&gt;
    &lt;if_sid&gt;101103&lt;/if_sid&gt;
    &lt;id&gt;server-no-free-ip&lt;/id&gt;
    &lt;description&gt;DHCP server ran out of IPs in pool&lt;/description&gt;
  &lt;/rule&gt;</pre>
<p>We used one of the extracted fields , &#8220;id&#8221;, from the decoding run to speed up processing instead of doing a match.</p>
<h2>Discussion on rules</h2>
<p>Up to now this has been very rule based. We did introduce time based policy validation. It gets interesting when combining multiple indicators. This is where the extracted fields gain their power. Attackers are more sophisticated and it is only when combining the network view (connections, data flows, duration, data access, users, time based controls, etc.) that one can catch bad behaviour or attackers soon enough to be able to respond to the attack.</p>
<p>In our next part we will see how to create some more advanced behavioural rules for our PaloAlto boxes.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2013/03/26/paloalto-firewall-integration-with-ossec-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PaloAlto Firewall integration with OSSEC</title>
		<link>http://acktomic.com/2013/03/23/ossec-and-palo-alto-firewall-logging-integration/</link>
		<comments>http://acktomic.com/2013/03/23/ossec-and-palo-alto-firewall-logging-integration/#comments</comments>
		<pubDate>Sat, 23 Mar 2013 04:53:47 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[HIDS]]></category>
		<category><![CDATA[log management]]></category>
		<category><![CDATA[NSM]]></category>
		<category><![CDATA[OSSEC]]></category>
		<category><![CDATA[paloalto]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[SIEM]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=89</guid>
		<description><![CDATA[OSSEC + Palo-Alto OSSEC currently does not include any decoders or rules for Palo-Alto Networks Next-Generation firewalls. I just happen to have access to one of these devices and wished to get some logs into OSSEC. A little search on the interwebs only turned up a single relevant link. Xavier &#8230;]]></description>
				<content:encoded><![CDATA[<h2>OSSEC + Palo-Alto</h2>
<p><a href="http://acktomic.com/wp-content/uploads/2013/03/ossec-hids.png"><img class="size-full wp-image-101 alignleft" alt="ossec-hids" src="http://acktomic.com/wp-content/uploads/2013/03/ossec-hids.png" width="191" height="67" /></a>OSSEC currently does not include any decoders or rules for Palo-Alto Networks Next-Generation firewalls. I just happen to have access to one of these devices and wished to get some logs into OSSEC. A little search on the interwebs only turned up a <a href="http://blog.rootshell.be/2010/10/14/paloalto-firewall-threat-monitoring-using-ossec/">single relevant link</a>. Xavier Mertens wrote a quick blog post during the second edition of OSSEC week in 2010. Thanks Xavier for putting it out there and getting people to see how it can be done. So let&#8217;s go about making it a cleaner and more comprehensive example.</p>
<p><a href="http://www.ossec.net/?page_id=165">OSSEC is a LIDS</a> that acquires, categorizes, filters, correlates and takes action on logs. It is very elegant in solving many thorny problems related to cross-platform lightweight secure log acquisition. It also integrates wonderfully with other tools for search (ElasticSearch, Splunk for OSSEC) or even full blown SIEM solutions.</p>
<p>Having used these firewalls for a while now (and free time away from reading vintage Dragon magazines) I wanted to get these things truly integrated with a security process. It pings, it forwards, it filters! The rules, filters, vulnerability/intrusion/threat detection and other nobs are tuned. This things is impervious as it can be now. All done, right? Not really&#8230;</p>
<p>Your mind wanders thinking about Kelly in accounting hmmm.. Sweet thought. All of a sudden, the office romance squirts out of mind and is replaced with a vague sense of unease. You remember something about security policy documents, best practices and internal auditor visits for one of those Pissy Eye or NERD compliance audits. oh yeah&#8230; answering questions like</p>
<ul>
<li>Who last changed something in the firewall</li>
<li>Do threats get flagged to administrators</li>
<li>Who tried to login to the firewall and succeeded (or failed)</li>
<li>Have I just run out of IP addresses in the DHCP pool</li>
<li>Did an internal client just port scan the firewall</li>
<li>Did that internal client also do failed logins against another device</li>
<li>Is a domain admin account surfing on the internet?</li>
</ul>
<p>Logging in to the device and answering the questions is a fail. If it is not automated, the process is doomed to fail or be inconsistently followed. Lucky for us, OSSEC can do the hard work, keep the bosses (and auditors happy) and have the security admin on top of things.</p>
<h2>Decoding Palo-Alto format syslog messages</h2>
<p><a href="http://acktomic.com/wp-content/uploads/2013/03/paloalto_medium-300x68.jpg"><img class="size-full wp-image-106 alignleft" alt="paloalto_medium-300x68" src="http://acktomic.com/wp-content/uploads/2013/03/paloalto_medium-300x68.jpg" width="186" height="42" /></a>The first step is to look at what type of log message would be generated by the device. Let&#8217;s use the log entry from the linked article.</p>
<p>&nbsp;</p>
<pre>Aug 26 13:56:07 192.168.0.5 1,2010/08/26 13:56:07,0003Z100245,THREAT,\
   vulnerability,8,2010/08/26 13:56:01,10.0.0.1,10.0.0.2,0.0.0.0,\
   0.0.0.0,rule2,domain\user,,netbios-ns,vsys1,TAP-ZONE,TAP-ZONE,ethernet1/1,\
   ethernet1/1,Logger,2010/08/26 13:56:07,136674,3,137,137,0,0,0x8000,udp,\
   alert,"",NetBIOS nbtstat query(31707),any,low,client-to-server</pre>
<p>Okay, it is a comma delimited, the date format is okay, it has fixed numbers of fields and lots of information. The Palo-Alto can also be customized to add or substract fields in the syslog profile settings. Do not do this unless you want to customize all your rules!!! So this is actually a pretty easy format to work with in OSSEC.</p>
<p>Second is to create a generic decoder for all Palo-Alto devices. To do this create a local_decoder.xml file in your ./ossec/etc/ directory. This file will contain anything that is specific to your installations. This file will not be overwritten during an upgrade!</p>
<h2>OSSEC decoder tree entry point &#8211; it&#8217;s a Palo Alto Firewall</h2>
<p>Lets go and identify what is unique about PaloAlto devices. Add this to your local_decoders.xml file.</p>
<pre>&lt;!-- Custom decoder for PaloAlto Firewalls Events --&gt;
&lt;decoder name="paloalto"&gt; 
  &lt;prematch&gt;^\d,\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d,\w\w\w\w\w\w\w\w\w\w\w,&lt;/prematch&gt;
&lt;/decoder&gt;</pre>
<p>The unique key here, is the series of \w, which are the serial number of the device.</p>
<p>For regex purists, OSSEC only has the basics and is not as greedy. <a href="http://www.ossec.net/doc/syntax/regex.html">Learn more about OSSEC regex syntax here</a>.</p>
<h2>Identify the type of event and extract fields</h2>
<p>Next, we want to identify  a type of event which in our example above is THREAT.</p>
<pre>&lt;!-- Custom decoder for PaloAlto Firewalls THREAT Events --&gt;
&lt;decoder name="paloalto-threat"&gt;
 &lt;parent&gt;paloalto&lt;/parent&gt;
 &lt;prematch offset="after_parent"&gt;^THREAT,&lt;/prematch&gt;
 &lt;regex offset="after_parent"&gt;^(THREAT,\w+),\.*,\.*,(\d+.\d+.\d+.\d+),(\d+.\d+.\d+.\d+),\d+.\d+.\d+.\d+,\d+.\d+.\d+.\d+,\.+,(\w*\\*\w*),(\w*\\*\w*),(\w*),\.+,(\.*),\w*,(\w*),\w*$&lt;/regex&gt;
 &lt;order&gt;id,srcip,dstip,srcuser,dstuser,protocol,action,status&lt;/order&gt;
&lt;/decoder&gt;</pre>
<p>Extracted fields are based on what can help for policy and incident response. The decoder will extract the required information and fill the OSSEC variables.</p>
<ul>
<li>The type of threat</li>
<li>The source IP address</li>
<li>The destination IP address</li>
<li>The source user (when linked to the Active Directory or auth portal)</li>
<li>The destination user (when linked to the Active Directory or auth portal)</li>
<li>The reported protocol implicated</li>
<li>The action taken by the firewall (alert, deny, block-ip, allow, drop-all-packets)</li>
<li>The severity of the detection threat (informational, low, medium, high, critical)</li>
</ul>
<p><span class="Apple-style-span" style="font-size: 24px; font-weight: bold; line-height: 38px;">Classify events based on severity of the event</span></p>
<p>Now we want to classify some of these events. We will use the severity of the alert for this. This makes it easy to capture all events and filter as desired. Notice we go from the general to the specific.</p>
<p>Syslog (not shown) -&gt; Device Decoder -&gt; Event Type Decoder -&gt; Categories for that type</p>
<pre>&lt;group name="syslog,paloalto,threat,"&gt;
  &lt;rule id="101000" level="0"&gt;
    &lt;decoded_as&gt;paloalto&lt;/decoded_as&gt;
    &lt;id&gt;^THREAT&lt;/id&gt;
    &lt;description&gt;PaloAlto Firewall Event&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101001" level="12"&gt;
    &lt;if_sid&gt;101000&lt;/if_sid&gt;
    &lt;status&gt;critical&lt;/status&gt;
    &lt;description&gt;Critical threat event!&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101002" level="12"&gt;
    &lt;if_sid&gt;101000&lt;/if_sid&gt;
    &lt;status&gt;high&lt;/status&gt;
    &lt;description&gt;High threat event!&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101003" level="8"&gt;
    &lt;if_sid&gt;101000&lt;/if_sid&gt;
    &lt;match&gt;medium&lt;/match&gt;
    &lt;description&gt;Medium threat event!&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101004" level="8"&gt;
    &lt;if_sid&gt;101000&lt;/if_sid&gt;
    &lt;match&gt;low&lt;/match&gt;
    &lt;description&gt;Low threat event!&lt;/description&gt;
  &lt;/rule&gt;

  &lt;rule id="101005" level="5"&gt;
    &lt;if_sid&gt;101000&lt;/if_sid&gt;
    &lt;match&gt;informational&lt;/match&gt;
    &lt;description&gt;Informational threat event!&lt;/description&gt;
  &lt;/rule&gt;</pre>
<h2>Using security policy to drive creation of further rules</h2>
<p>Next steps would be based on your security policy. What critical assets are being protected, what systems are involved, what data and how can it be logged or tracked. Use OSSEC to identify anomalies to your normal baseline. What events can also be dropped from being alerted on for things liked low severity blocked threats from outside to inside.</p>
<p>Example anomalies that would differ from an expected baseline :</p>
<ul>
<li>Time based anomalies for data or system access (success or failure)</li>
<li>Credential based anomalies for data or system access (success or failure)</li>
<li>Quantity based anomalies for data or system access (success or failure)</li>
<li>Protocol based anomalies</li>
<li>Traffic direction based anomalies</li>
<li>Statistical anomalies of network traffic or system characteristics or data access patterns</li>
<li>Policy based anomalies (ex. a domain admin account browsing the internet)</li>
</ul>
<h2>Composite rules to alert on actionable events</h2>
<p>Finally composite rules of anomalies with external complimentary data are the automation golden cup. Covering sources like vulnerability data, server data, known bad domains or bad IPs. For example these sources can be correlated to attack vectors seen by the firewall so that they are raised as very critical events (if a successful attack is detected or possible).</p>
<h2>Next steps &#8211; Decoding more Palo-Alto firewall event types</h2>
<p><a title="PaloAlto firewall integration with OSSEC – Part 2" href="http://acktomic.com/2013/03/26/paloalto-firewall-integration-with-ossec-part-2/">OSSEC and PaloAlto integration Part 2 covers</a> other types of logs that a Palo-Alto can generate like CONFIG and SYSTEM events. As well as identifying a general categorization and specific events of interest that need to be tracked for actionable security.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2013/03/23/ossec-and-palo-alto-firewall-logging-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SANS 2013 Orlando Wrapup</title>
		<link>http://acktomic.com/2013/03/21/sans-2013-orlando-wrapup/</link>
		<comments>http://acktomic.com/2013/03/21/sans-2013-orlando-wrapup/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 01:31:46 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[NSM]]></category>
		<category><![CDATA[SANS]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=53</guid>
		<description><![CDATA[Having just come back from the SANS 2013  Orlando security conference, I want to share some random thoughts. SANS Instructors and speakers are top rate (once again) The invited vendors were pertinent to the conference and added to the experience SANS @ Night and special conferences were very much worth it &#8230;]]></description>
				<content:encoded><![CDATA[<p>Having just come back from the <a href="http://www.sans.org/event/sans-2013">SANS 2013  Orlando security conference</a>, I want to share some random thoughts.</p>
<ul>
<li>SANS Instructors and speakers are top rate (once again)</li>
<li>The invited vendors were pertinent to the conference and added to the experience</li>
<li>SANS @ Night and special conferences were very much worth it and provided up to date actionable material.</li>
<li>Lots of senior technical personnel from military, industrial, public sector, critical infrastructure and commercial interests bring great depth to the discussions in class and out of class.</li>
<li>NetWars, how awesome is that stuff!! Sign me up for next time.</li>
</ul>
<p>The standout speakers were Dr. Eric Cole, <a href="http://www.sans.org/event/sans-2013/bonus-sessions/1107/#bonus-box">Joshua Wright</a>, Mike Poor and Rob Lee. Their talks all brought unique insight, usable knowledge and were entertaining as well. Special props go out to Alissa Torres from Mandiant on Finding Unknown Malware, she dished out a no holds barred great presentation, you rocked. (You did not have to be stressed, things worked out. :-)</p>
<p>Dr. Eric Cole was a real treat as an instructor, he knows what he is talking about and has real knowledge of how to handle incidents. David Hoelzer was a super instructor and delivered a well rounded course and good insight. He even threw in some custom Net Wars for the class, awesome stuff.</p>
<p>In a few words:</p>
<ul>
<li>Identify your critical assets</li>
<li>Identify the systems and data</li>
<li>Identify how to monitor them</li>
</ul>
<p>Prevention is good, but detection is king. Also, make sure that behavioural and anomaly detection are key components of the detection in addition to traditional signature/known-bad based detection.</p>
<p>This gave me some ideas for new statistical rules to implement with flow based analysis and SIEM type correlation rules. I really focus on NSM (Network Security Monitoring) approaches which should also be combined with data access monitoring to really highlight bad behaviours. Data access monitoring is a new field that I will be exploring.</p>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2013/03/21/sans-2013-orlando-wrapup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>genDevConfig on github</title>
		<link>http://acktomic.com/2012/10/31/gendevconfig-on-github/</link>
		<comments>http://acktomic.com/2012/10/31/gendevconfig-on-github/#comments</comments>
		<pubDate>Wed, 31 Oct 2012 05:14:54 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[genDevConfig]]></category>
		<category><![CDATA[Shinken]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=30</guid>
		<description><![CDATA[The most astute will have noticed genDevConfig moving to github. This means, you can easily add more devices, submit corrections and  improve this old school tool reborn for use with the up and coming Shinken monitoring system. Yup. genDevConfig 3.x, dedicated to creating Shinken configuration files is ready to rock. What does &#8230;]]></description>
				<content:encoded><![CDATA[<p><span class="Apple-style-span">The most astute will have noticed </span><a title="genDevConfig Profile Generator" href="https://github.com/xkilian/genDevConfig" target="_blank">genDevConfig</a><span class="Apple-style-span"> moving to github.</span></p>
<p>This means, you can easily add more devices, submit corrections and  improve this old school tool reborn for use with the up and coming Shinken monitoring system.</p>
<p>Yup. genDevConfig 3.x, dedicated to creating Shinken configuration files is ready to rock. What does this mean?</p>
<ol>
<li>genDevConfig creates a configuration file formatted for Shinken with Host and Services</li>
<li>Automatically creates a dependency to the chassis Service</li>
<li>Can be assigned user defined variables</li>
<li>Can be assigned user assigned templates</li>
<li>Supports all the same devices that it used to do with the addition of more comprehensive Nortel/Avaya ES and ERS switches</li>
</ol>
<p>First question on your mind… Can I migrate my Cricket installation to Shinken?!</p>
<p>Short Answer:  Yes, but as a proof of concept. Not for production.</p>
<p>Shinken&#8217;s various web interfaces differ a little bit. The closest to Cricket are WebUI with native Graphite support, <a title="Pencil a Graphite Dashboard" href="http://fetep.github.com/pencil/">Pencil</a>, Multisite+<a title="Graphite presentation" href="http://www.slideshare.net/reyjrar/graphite-overview">Graphite Dashboard</a> and Multisite+<a title="PNP4Nagios metrics" href="http://docs.pnp4nagios.org/pnp-0.6/start">PNP4Nagios</a>. Cricket&#8217;s web interface is an automatic hierarchical dashboard, designed with a single purpose in mind. While Shinken processes state and performance data so it arranges data with different priorities.</p>
<p>Second, Shinken has a discovery management console to provide an interface for discovery scripts like genDevConfig. It has not been tested and integrated to be used with Shinken&#8217;s discovery console.</p>
<p>Third, Shinken&#8217;s SNMP poller module that is meant to be used with genDevConfig configurations only presently supports SNMPv2c getBulk. While great, will not collect data from older devices, UPSs or anything that requires SNMP v2c get/get-next or SNMP v1.</p>
<p>Fourth, Shinken&#8217;s SNMP poller module is in public beta and has not been officially released.</p>
<p>Question: Okay, but can I try it?</p>
<p>Answer: By all means. genDevConfig is ready. Shinken&#8217;s SNMP poller module (SnmpBooster) is also ready.</p>
<p>Learn more about it here:</p>
<ul>
<li><a title="Shinken SNMP poller module - Presentation" href="http://www.shinken-monitoring.org/news/snmp-monitoring-with-shinken/">Shinken SNMP module presentation</a> and installation links</li>
<li><a title="Shinken SNMP poller design specification" href="http://www.shinken-monitoring.org/wiki/snmpbooster_design_specification">Shinken SNMP module design specification and development status</a><a title="Shinken SNMP poller module - How it works" href="http://www.shinken-monitoring.org/wiki/snmpbooster_how_it_works"> </a></li>
<li><a title="Shinken 10 minute installation" href="http://www.shinken-monitoring.org/wiki/shinken_10min_start">Shinken 10 minute installation guide</a></li>
<li><a title="genDevConfig on github" href="https://github.com/xkilian/genDevConfig">genDevConfig on github</a></li>
</ul>
<p>Hope to see you around and contributing to the project.</p>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2012/10/31/gendevconfig-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>genDevConfig migrating to Shinken/Nagios</title>
		<link>http://acktomic.com/2012/02/08/gendevconfig-migrating-to-shinkennagios/</link>
		<comments>http://acktomic.com/2012/02/08/gendevconfig-migrating-to-shinkennagios/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 03:39:36 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[cricket]]></category>
		<category><![CDATA[genDevConfig]]></category>
		<category><![CDATA[Shinken]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=27</guid>
		<description><![CDATA[genDevConfig is in the process of being converted to output in a Shinken/Nagios configuration format. Nagios does not have any true discovery frameworks that generate configuration trees. It is more of a piecemeal affaire, where each acquisition check is responsible for knowing what it gets and how. Basic information is passed from &#8230;]]></description>
				<content:encoded><![CDATA[<p><a title="genDevConfig Profile Generator" href="https://github.com/xkilian/genDevConfig" target="_blank">genDevConfig</a> is in the process of being converted to output in a <a title="Shinken Monitoring System" href="http://www.shinken-monitoring.org" target="_blank">Shinken</a>/Nagios configuration format.</p>
<p>Nagios does not have any true discovery frameworks that generate configuration trees. It is more of a piecemeal affaire, where each acquisition check is responsible for knowing what it gets and how. Basic information is passed from Nagios to the check. As you can imagine, for snmp polling, this is a very inefficient method. Calling an interpreter, loading a bundle of modules, executing a tiny script, exit and repeat. Even if they are C or scripted checks. Ouch.</p>
<p>Some innovation has happened in the check_mk plugin which does a good job of centralizing all snmp polling and data normalization before sending the data back as a passive check response. Other means of scaling snmp checks are by using collectd to do the polling and data normalization and just having Nagios check for updated values. Meh.. Fortunately, the collectd guys are supposed to be working at converting this to sending data back as passive check responses.</p>
<p>Nagios, is a real monster to hack. As luck would have it, a pair of Nagios professional admin, book writers and developers took the beast by its horns. They created Shinken, it is a Nagios compatible rewrite in Python. It offers a well thought out design offering scalability, modularity and worlds of flexibility.</p>
<p>Shinken offers distributed poller daemons  that can load modules. These modules make it easy to extend its feature set and scope. The aim is to create a python based SNMP poller module that can execute SNMP checks in a logical and efficient manner using the native python library that supports SNMPbulkwalk and SNMPbulkget. It has its drawbacks, but it does not require installing Net-SNMP and it is actively developped.</p>
<p>The distributed nature of the scheduling and polling in Shinken, the Bulkwalk efficiency and simpler interface offset the slower performance of pySNMP. It is noted that the error handling and corner cases for tables do suffer some inconsistencies, so these need to be accounted for. Performance is estimated around 5000 checks per second using the python module with high cpu usage, while net-snmp goes for over 10000 checks per second with low cpu usage.</p>
<p>So there you have it. There may eventually be an alternative for Cricket users used to the automation offered by genDevConfig and the simplicity of the Cricket config-tree that are looking for data gathering and monitoring in a single core.</p>
<p>More details will be provided when the beta version is released. I expect the configuration output to have a few iterations to find the right mix between what is created by <a title="genDevConfig Profile Generator" href="https://github.com/xkilian/genDevConfig" target="_blank">genDevConfig</a> and what is included in the templates. As most of you will note, Cricket&#8217;s and Nagios&#8217; configuration inheritance model are not exactly the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2012/02/08/gendevconfig-migrating-to-shinkennagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SANS 2010 Orlando Wrapup</title>
		<link>http://acktomic.com/2010/03/18/sans-2010-orlando-wrapup/</link>
		<comments>http://acktomic.com/2010/03/18/sans-2010-orlando-wrapup/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 00:21:55 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[NSM]]></category>
		<category><![CDATA[SANS]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=24</guid>
		<description><![CDATA[Having just come back from the SANS Institute Orlando security conference, I want to share some random thoughts. SANS Instructors and speakers are top rate The invited vendors were pertinent to the conference and added to the experience SANS @ Night and special conferences were very much worth it and provided up &#8230;]]></description>
				<content:encoded><![CDATA[<p>Having just come back from the SANS Institute Orlando security conference, I want to share some random thoughts.</p>
<ul>
<li>SANS Instructors and speakers are top rate</li>
<li>The invited vendors were pertinent to the conference and added to the experience</li>
<li>SANS @ Night and special conferences were very much worth it and provided up to date actionable material.</li>
<li>Lots of senior technical personnel from military, industrial, public and commercial interests rounded out the experience.</li>
</ul>
<p>The standout speakers were Lenny Zelster, Jason Fossen and Ed Skoudis. Their talks all brought unique insight, usable knowledge and were superb speakers. Eric Conrad was an enjoyable instructor, he provided no nonsense feedback on what worked for him in his various jobs.</p>
<p>Network security monitoring and extrusion detection have really gained in the general mindset. As there are no silver bullets, the intruders will gain a foothold and only well varied system and network indicators can highlight anomalous behaviour that can permit a response. It is also clear that response now needs to be more coordinated and all encompassing to lockdown a site before advanced intruders react to partial measures and deploy more advanced malware or burrow deeper.</p>
<p>Main attack vectors where directed Spear-fishing and combination&#8217;s of drive-by exploits or business document exploits. For local attacks, any shared layer 2 network is a sitting duck to MiTM attacks which impress by their breadth, variety and tool automation.</p>
<p>On the SIEM side of things, Qradar, LogRythm and Splunk* all had products that were well received by various network and security administrators. <span style="color: #993300;">(ed. Splunk is an analytical tool and does not have a state machine like a SIEM, I see it as complimentary to a SIEM)</span></p>
<p>On the NSM side of things, Sourcefire had a compelling commercial solution that is similar to SGUIL but with more setup automation and polished approach.</p>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2010/03/18/sans-2010-orlando-wrapup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using black hole routing for network security monitoring &#8211; Part2</title>
		<link>http://acktomic.com/2010/03/18/using-black-hole-routing-for-network-security-monitoring-part2/</link>
		<comments>http://acktomic.com/2010/03/18/using-black-hole-routing-for-network-security-monitoring-part2/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 16:33:44 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[genDevConfig]]></category>
		<category><![CDATA[NSM]]></category>
		<category><![CDATA[SANS]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=23</guid>
		<description><![CDATA[Black hole routing is now your friend. You are forwarding traffic not meant to be routed to a termination point on your network. Let&#8217;s look at some advanced ways to get more focused network security data from this traffic. For part 1, skip to the next post. Advanced network monitoring &#8230;]]></description>
				<content:encoded><![CDATA[<p>Black hole routing is now your friend. You are forwarding traffic not meant to be routed to a termination point on your network. Let&#8217;s look at some advanced ways to get more focused network security data from this traffic. For part 1, skip to the next post.</p>
<p><strong><em>Advanced network monitoring</em></strong></p>
<ul>
<ul>
<li><strong>Forward the black hole routes to a passive Honeypot such as Nepenthes</strong>
<ul>
<li>This would entail having either the black hole router or the core router forward the traffic to the Honeypot as the next-hop for all the black holed routes.</li>
<li>The honey pot will accept connections and will let the operator know what the evil doer was up to. Ex. C2 channels, File transfers, protocol tunnelling, scanning, exploiting, etc.</li>
</ul>
</li>
<li><strong>Reconfigure or implement a DNS black list to point the blocked traffic to specific black hole networks. Traffic can be categorized using pre-built filters in the analysis station.</strong>
<ul>
<li>Known malware+spyware black list resolves to x.x.x.A</li>
<li>Domains, sub-domains or FQDNs that are unrelated to business needs (.tv, .sex) black list resolves to x.x.x.B</li>
<li>Domains, sub-domains or FQDNs considered security risks* (.ru, .cn, .ws, .cm, .info, etc.) black list resolves to x.x.x.C. Mcafee publishes a list of the riskiest TLDs, <a title="Mapping the mal web" href="http://us.mcafee.com/en-us/local/docs/Mapping_Mal_Web.pdf" target="_blank">Mapping the mal web</a>.</li>
<li>Blocked web sites due to company policy resolves to x.x.x.D</li>
<li>In maintenance or no longer available internal servers resolves to x.x.x.E</li>
<li>Other blocked content that is of no interest to network or security analysts resolves to 127.0.0.1</li>
</ul>
</li>
<li><strong>Advertise specific black hole routes that target nasty netblocks. </strong>
<ul>
<li>If there is a requirement in splitting traffic reaching specific routes, convert the link between the core router and the black hole router to an 802.1Q trunk with sub-interfaces. This way you can advertise each group of nasty routes on it&#8217;s own sub-interface. Reporting would know which 802.1Q tag is associated with which group of nasties.</li>
<li>The risk with explicitely blocking network blocks or domains, is the user community may not be aware they HAVE been blocked administratively. Such that a web page or email track back saying, hey the ressource you are trying to reach is blocked! Some type of advisory should be published that some domains or netblocks may be blocked, check list or contact your help desk.</li>
</ul>
</li>
<li><strong>Graph the traffic hitting each sub-interface or interface on the black-hole router using SNMP and Cricket or Cacti.</strong></li>
<li><strong>Run ntop, sancp or argus on the analysis station to get session data.</strong></li>
<li><strong>Find a way to generate tickets or events back into analysts consoles for interesting traffic hitting the black hole router.</strong>
<ul>
<li>Cleaning most of the above classes of traffic will be beneficial for fixing operational problems.</li>
<li>Storing this traffic in your network analyzer can serve as an easy to maintain forensic archive for infection vectors.</li>
<li>A very cheap alternative to a honeypot.</li>
<li>Forensic history of problematic sources in the managed network.</li>
<li>Provides a list of workstations and their associated users that are risks to the managed LAN.</li>
<li>An easy way to archive the presence of traffic that was marked for deletion by other systems. (Policy based routing, DNS, proxies)</li>
<li>Can serve as a source of automated tickets for ops and events for security folks. As what needs to be fixed is always on the managed side of the LAN or WAN.</li>
<li>I would love to hear about other benefits</li>
</ul>
</li>
</ul>
</ul>
<p><strong><em>Recap of the benefits</em></strong></p>
<ul>
<li>Provides a looking glass into misconfigured, unauthorized, unexpected or inexistant traffic or destinations.</li>
<li>Cheap and easy to setup</li>
<li>Maintenance and operation can be very automated</li>
<li>Integrates with existing processes (ticketing, change management, backups, monitoring, logging)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2010/03/18/using-black-hole-routing-for-network-security-monitoring-part2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using black hole routing for network security monitoring &#8211; Part1</title>
		<link>http://acktomic.com/2010/03/06/using-black-hole-routing-for-network-security-monitoring-part1/</link>
		<comments>http://acktomic.com/2010/03/06/using-black-hole-routing-for-network-security-monitoring-part1/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 04:44:25 +0000</pubDate>
		<dc:creator>Francois Mikus</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[genDevConfig]]></category>
		<category><![CDATA[NSM]]></category>
		<category><![CDATA[SANS]]></category>

		<guid isPermaLink="false">http://acktomic.com/?p=22</guid>
		<description><![CDATA[The average Network Administrator has control over all the tools to put in place effective black hole routing and reporting. The simple steps below should get you started and the prerequisites to getting there. Executive summary Static black routing and policy based black hole routing are great ways to securely &#8230;]]></description>
				<content:encoded><![CDATA[<p>The average Network Administrator has control over all the tools to put in place effective black hole routing and reporting. The simple steps below should get you started and the prerequisites to getting there.</p>
<p><strong><em>Executive summary</em></strong></p>
<p>Static black routing and policy based black hole routing are great ways to securely offload traffic from your core routers or firewalls. The traffic that ends up being dropped could be known source or destination networks that should not be routed, but they could also be unexpected, misconfigured or malicious traffic that is being dropped. Keeping an eye on this traffic could pay off big time. NSM at work! But first how to do the basic setup.</p>
<p><strong><em>Prerequisites</em></strong></p>
<ul>
<li>A spare router running Cisco IOS 12.2.x and up</li>
<li>A spare network tap or mirror port on your core route</li>
<li>A spare distributed network analyzer or workstation with wireshark</li>
<li>Console port access or out-of-band access to the router via a secure terminal server</li>
</ul>
<p>An alternate way of processing the incoming traffic directly in a honeypot described here.</p>
<p><strong><em>Physical setup</em></strong></p>
<ul>
<li>Connect the network tap to your core-router</li>
<li>Connect your black-hole-router to your network tap.</li>
<li>Connect your analyzer to the replication port of your network tap.</li>
<li>Connect your router to your out-of-band access</li>
</ul>
<p><strong><em>Logical setup on a cisco IOS router with a test route</em></strong></p>
<ul>
<ul>
<li><strong>Apply secure configuration guidelines to protect your black-hole-router. *</strong></li>
<li>Configure a point to point routed interface on black-hole-router and your core-router.</li>
<li>Create the appropriate routing process</li>
<li>Make the black-hole-router a sub that will only advertise static routes</li>
<li>Add a redistribute static statement to your routing process</li>
<li>Create a null0 interface</li>
<li>On null0 configure no ip unreachable</li>
<li>Now create a test black hole route: ip route 10.255.255.1 255.255.255.255 Null0</li>
</ul>
</ul>
<pre>! Example using eigrp IGP   

!   

ip classless   

!   

interface null0   

 no ip unreachable   

 no shutdown   

!   

router eigrp 1   

 redistribute static   

 eigrp stub static   

 network x.x.x.x # replace x.x.x.x with the network of the point-to-point interface   

 no auto summary   

!   

ip route 10.255.255.1 255.255.255.255 null0</pre>
<ul>
<li>Verify the route is showing up in the core router.</li>
<li>Send traffic to it from another network location. This traffic should be blackholed on the router. Check with your traffic analyzer, with a debug statement or a logged ACL on your router.</li>
</ul>
<p><strong><em>Applying the black hole route on a cisco IOS router</em> </strong>Here you need to choose what type of black hole route to use. Can you inject a default black hole route, specific black routes routes or both. Your network may be architected so that you already have a black hole route somewhere that could be migrated to your new setup. You may wish only to black hole routes to certain networks (ie. bogon networks, known &#8220;bad net blocks&#8221; or AS). Use a bit of DNS foo to blackhole &#8220;bad&#8221; domains, sub-domains or FQDNs.</p>
<pre>! Example using eigrp IGP   

!   

ip route 0.0.0.0 0.0.0.0 null0   

!</pre>
<p>By creating a black hole route, all traffic that is now destined to networks with no explicit routing entries will end up on your new black hole router. After applying the route, the first order of business is making sure you have not broken anything during your maintenance window. You are doing this work in your lab or at least in a maintenace windows right, ;-). Make sure you can still reach your application servers, your proxies, external NATs, etc. Once you are satisfied save your configuration on the router.</p>
<p>Now, fire up your network analyzer. Traffic can now be categorized</p>
<ul>
<li>There should be your typical misconfigured hosts, moritoring servers, deprecated DNS entries sending traffic to networks that do not exist.</li>
<li>Workstations trying to update software using non-proxied ports from internet vendor servers.</li>
<li>Management/monitoring software scanning ports of IPs for auditing purposes</li>
<li>And the famous other category</li>
</ul>
<p>Yeah, fun with &#8220;other&#8221;. Non browser based applications trying to send web or ftp traffic without going through the designated proxies. Applications trying to reach internet addresses for which there are no proxy services. Having worked hard at designing your network to make use of NAT and proxies, you get to have a much easier time tracking down the above classes of traffic.</p>
<p><em><strong>Benefits of this easy win approach</strong></em></p>
<ul>
<li>Cleaning most of the above classes of traffic will be beneficial for fixing operational problems.</li>
<li>Storing this traffic in your network analyzer can serve as an easy to maintain forensic archive for infection vectors.</li>
<li>A very cheap alternative to a honeypot.</li>
<li>Forensic history of problematic sources in the managed network.</li>
<li>Provides a list of workstations and their associated users that are risks to the managed LAN.</li>
<li>An easy way to archive the presence of traffic that was marked for deletion by other systems. (Policy based routing, DNS, proxies)</li>
<li>Can serve as a source of automated tickets for ops and events for security folks. As what needs to be fixed is always on the managed side of the LAN or WAN.</li>
<li>I would love to hear about other benefits</li>
</ul>
<p>* &#8211; SANS IOS security guidelines or other security focused templates. Any mistake on this router can have nasty consequences. All your routers should be equally secure, audited, logged, change controlled, monitored and backed up.</p>
]]></content:encoded>
			<wfw:commentRss>http://acktomic.com/2010/03/06/using-black-hole-routing-for-network-security-monitoring-part1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
