<?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>Security Advancements at the Monastery &#187; GeoIP</title>
	<atom:link href="http://blog.securitymonks.com/category/geoip/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.securitymonks.com</link>
	<description>Information about developments at the Monastery</description>
	<lastBuildDate>Fri, 03 Sep 2010 05:41:44 +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>Some Ideas on Geocoding Security</title>
		<link>http://blog.securitymonks.com/2008/12/07/some-ideas-on-geocoding-security/</link>
		<comments>http://blog.securitymonks.com/2008/12/07/some-ideas-on-geocoding-security/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 03:02:50 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Cosight]]></category>
		<category><![CDATA[GeoIP]]></category>
		<category><![CDATA[GeoNames]]></category>
		<category><![CDATA[Google Earth]]></category>
		<category><![CDATA[KML]]></category>
		<category><![CDATA[KisGearth]]></category>
		<category><![CDATA[Linked Data project]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[code_swarm]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=708</guid>
		<description><![CDATA[Mark Twain once said, &#8220;The reports of my death are greatly exaggerated.&#8221;  A thousands apologies for not posting in awhile.  My only excuse is that I have been buried in work.  Even today&#8217;s post will be brief.  I wanted a few moments to indicate some of the work I am doing [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://googlegeodevelopers.blogspot.com/2008/07/how-to-write-kml-like-rock-star.html"><img src="http://www.nin.com/images/nin-downloads-us.jpg" alt="" width=100 align="left" /></a>Mark Twain once said, &#8220;<a href="http://answers.google.com/answers/threadview?id=191570">The reports of my death are greatly exaggerated</a>.&#8221;  A thousands apologies for not posting in awhile.  My only excuse is that I have been buried in work.  Even today&#8217;s post will be brief.  I wanted a few moments to indicate some of the work I am doing and provide a few pointers.  I hope to follow this post with more details later.</p>
<p>
First, a little about some of the work.  I have had to evaluate IPs for an indication of their security threat.  One method of evaluation is to compare the IPs to know bad actors.  In this post, we will discuss a few data sources that are freely available, a few software packages that might prove useful, and finish up pointing to some sources for further evaluation.</p>
<h2>Data Source</h2>
<p>You can use various data feeds.  Misbehaving IPs that are identified by your IDSP/IPS, honeypots, firewall logs, router logs, syslog servers, etc. will be of particular interest, being specific to your organization.  For the sake of discussion, I wanted to point out some freely available sources of IPs that are blacklisted by the Internet community.</p>
<ul>
<li><a href="http://watchlist.security.org.my/">The Harimau Watchlist</a> &#8211; <a href="http://security.org.my/">Mel Mudin</a> (spoonfork) provides this valuable source of information.  Please read his post, &#8220;<a href="http://security.org.my/index.php?/archives/The-Harimau-Watchlist.html">The Harimau Watchlist</a>&#8221; for additional information.  The information is updated daily.  </li>
<li><a href="http://malwaredomains.com/">Malware Domain Blocklist</a> &#8211; this information is maintained as part of the DNS-BH project and represents a list of domains that are known to be used to propagate malware and spyware.  </li>
</ul>
<p>The sources for the Harimau Watchlist  include:</p>
<ul>
<li><a href="http://www.dshield.org">Dshield</a> Top IPs</li>
<li>Dshield Top Blocks</li>
<li><a href="http://www.shadowserver.org/">ShadowServer&#8217;s</a> Know Russian Business Network</li>
<li>ShadowServer&#8217;s Known Bot Command &amp; Control IPs/Blocks</li>
<li><a href="http://www.emergingthreats.net/">EmergingThreats</a> Known Compromised IPs/Blocks</li>
<li><a href="http://www.spamhaus.org/">Spamhaus</a> Top IPs</li>
<li>Atlas (<a href="http://www.arbornetworks.com/">Arbor Networks</a>) Top Threat Source</li>
<li><a href="http://TrustedSource.org">TrustedSource.org</a> Top Email Senders</li>
<li>TrustedSource.org Most Active Storm Web Proxies</li>
<li>TrustedSource.org Most Newly Activated Storm Web Proxies</li>
<li>TrustedSource.org Most Recently Seen Storm Web Proxies</li>
<li><a href="http://Projecthoneypot.org">Projecthoneypot.org</a>&#8217;s Most Recent Email Harvesters</li>
<li>Projecthoneypot.org&#8217;s Most Recent Spam Servers</li>
<li>Projecthoneypot.org&#8217;s Most Recent Comment Spammers</li>
<li>Projecthoneypot.org&#8217;s Most Recent Dictionary Attackers</li>
<li><a href="http://Senderbase.org">Senderbase.org</a> Top 100 Spammers</li>
<li>Senderbase.org Top 100 Virus Senders</li>
</ul>
<p>The Malware Domain Blocklist sources include <a href="http://ddanchev.blogspot.com">ddanchev.blogspot.com</a>, <a href="http://www.matchent.com">www.matchent.com</a>, <a href="http://siteadvisor">siteadvisor</a>, <a href="http://threatexpert">threatexpert</a>, and many more.  For <a href="http://malwaredomains.com/?cat=31">more details</a>, see the site.</p>
<h2>Programming</h2>
<p>I will not go into details now, but it is easy enough to setup a cron job to pull the information down and add the IPs to a database.  If you decide to do this in Perl, a few modules that will come in handy:</p>
<ul>
<li><a href="http://search.cpan.org/~gaas/libwww-perl/lib/LWP/UserAgent.pm">LWP::UserAgent</a>  &#8211; can be used to dispatch web requests.</li>
<li><a href="http://search.cpan.org/~timb/DBI/">DBI</a> &#8211; Perl database interface.</li>
<li><a href="http://search.cpan.org/~mikegrb/Net-Abuse-Utils-0.09/lib/Net/Abuse/Utils.pm">Net::Abuse::Utils</a> &#8211; provides functions to lookup information about an IP or ASN.  Information includes country code for an IP or ASN, ASN announcing an IP via BGP, CIDR network an IP is announced in, contact email addresses based on IP whois info, contact email addresses for a domain based on abuse.net data, contact email address from the SOA record for the rDNS zone for an IP, and listing information for an IP in a specific DNSBL.</li>
<li><a href="http://search.cpan.org/dist/Geo-IP/">Geo::IP</a> &#8211; provides a simple file-based database.  The <a href="http://www.maxmind.com/app/geolitecountry">GeoIP database</a> simply contains IP blocks as keys, and countries as values.  The data contains all public IP addresses and should be more complete and accurate than reverse DNS lookups.</li>
<li>Net::DNS &#8211; allows the programmer to perform nearly any type of DNS query.</li>
</ul>
<p>A few other software packages you will likely use:</p>
<ul>
<li><a href="http://dev.mysql.com/downloads/">MySQL</a> &#8211; is a multi-threaded and multi-user SQL (Structured Query Language) database server.</li>
<li><a href="http://www.maxmind.com/app/geolitecountry">GeoLite Country</a> &#8211; is similar to the <a href="http://www.maxmind.com/app/country">GeoIP Country</a> database, but is slightly less accurate. Please review Instructions on how to use our <a href="http://www.maxmind.com/app/csv">CSV databases</a> with a SQL database.</li>
<li><a href="http://www.maxmind.com/app/geolitecity">GeoLite City</a> &#8211; is similar to the <a href="http://www.maxmind.com/app/city">GeoIP City</a> database, but is less accurate. </li>
<li><a href="http://fx.saintjoe.edu/pub/CPAN/authors/id/G/GM/GMPASSOS/Geo-IPfree-0.2.tar.gz">Geo/IPfree</a> &#8211; Perl module for looking up country of IP Address.</li>
</ul>
<h2>A Few Interesting Possibilities</h2>
<p>One thing that can be done with the IPs is to map them using <a href="http://earth.google.com/">Google Earth</a>.  This will require you to create <a href="http://code.google.com/apis/kml/documentation/kmlreference.html">KML</a> files, which are not difficult once you have the IPs along with their DNS and GeoIP data.  Two scripts that help generate KML files from security data are:</p>
<ul>
<li><a href="http://code.google.com/p/cosight/">Cosight</a> &#8211; the security log file visualization tool used by the Colorado ISOC.  Cosight parses logfiles looking for connections to or from internet addresses. It then uses the geolocation database from Maxmind to convert those addresses to coordinates for output as a KML overlay file. </li>
<li><a href="http://mytty.org/kisgearth/">KisGearth</a> &#8211; a small perl script to convert kismet xml and gps logfiles to google earth kml files.</li>
</ul>
<p><a href="http://www.shadowserver.org/wiki/pmwiki.php?n=Stats.ScanMaps"><img src="http://www.shadowserver.org/wiki/uploads/Stats/scan.jpg" align="left" width=150 /></a>A few months ago, I did a post &#8220;<a href="http://blog.securitymonks.com/2008/05/28/unclear-and-present-danger/">Unclear and Present Danger</a>.&#8221;  The post outlined some of the electronic dangers facing an organization on the Internet.  Thanks to the fantastic work done by the <a href="http://www.shadowserver.org/">Shadowserver Foundation</a>, we have a nice collection of some very interesting statistics mapped by country.  Those examples can be very useful when mapping misbehaving IPs.  Rather than repeat what has previously been posted, I&#8217;ll leave it to the reader to visit that entry.
</p>
<p>
While searching for an interesting way to represent and drill down from continents, to countries etc., I came across <a href="http://geotree.geonames.org/">GeoTree</a>, a hierarchical toponym browser for <a href="http://geonames.wordpress.com/">GeoNames</a>.  GeoNames is part of the <a href="http://esw.w3.org/topic/SweoIG/TaskForces/CommunityProjects/LinkingOpenData">Linked Data project</a>, which brings together data from public sources and builds a web of open and free data where data sets are interlinked with each other.  The Linked Data project represents a great wealth of information.  Below is a mapping done by <a href="http://dowhatimean.net/">Richard Cyganiak</a> of the projects involved in the Linked Data projects:</p>
<map name="GraffleExport">
<area shape=poly coords="147,243,147,282,108,282,108,243,147,243" href="http://riese.joanneum.at/">
        </area>
<area shape=poly coords="452,268,452,310,411,310,411,268,452,268" href="http://www.rkbexplorer.com/">
        </area>
<area shape=circle coords="251,84,18" href="http://qdos.com/">
        </area>
<area shape=poly coords="219,56,219,98,177,98,177,56,219,56" href="http://dbtune.org/last-fm/">
        </area>
<area shape=poly coords="378,59,378,101,336,101,336,59,378,59" href="http://apassant.net/blog/2007/12/18/rdf-export-of-flickr-profiles-with-foaf-and-sioc/">
        </area>
<area shape=circle coords="147,134,18" href="http://dbtune.org/bbc/peel/">
        </area>
<area shape=circle coords="380,138,21" href="http://ontoworld.org/">
        </area>
<area shape=circle coords="304,254,18" href="http://www.lingvoj.org/">
        </area>
<area shape=circle coords="249,312,21" href="http://www.cycfoundation.org/">
        </area>
<area shape=circle coords="150,314,21" href="http://dbpedia.openlinksw.com/wikicompany/resource/Wikicompany">
        </area>
<area shape=circle coords="306,302,21" href="http://www4.wiwiss.fu-berlin.de/flickrwrappr/">
        </area>
<area shape=poly coords="228,329,228,368,189,368,189,329,228,329" href="http://www.w3.org/TR/wordnet-rdf/">
        </area>
<area shape=poly coords="77,205,77,258,24,258,24,205,77,205" href="http://www.rdfabout.com/demo/census/">
        </area>
<area shape=circle coords="98,310,21" href="http://www.govtrack.us/">
        </area>
<area shape=circle coords="486,164,18" href="http://openguides.org/">
        </area>
<area shape=circle coords="296,69,21" href="http://doapspace.org/">
        </area>
<area shape=circle coords="100,134,21" href="http://bbc-hackday.dyndns.org:2825/">
        </area>
<area shape=circle coords="258,33,21" href="http://id.ecs.soton.ac.uk/docs/">
        </area>
<area shape=circle coords="198,297,18" href="http://www4.wiwiss.fu-berlin.de/eurostat/">
        </area>
<area shape=circle coords="336,32,18" href="http://projects.semwebcentral.org/">
        </area>
<area shape=circle coords="417,91,21" href="http://sioc-project.org/">
        </area>
<area shape=poly coords="376,311,376,350,337,350,337,311,376,311" href="http://dblp.l3s.de/d2r/">
        </area>
<area shape=circle coords="180,246,18" href="http://www4.wiwiss.fu-berlin.de/factbook/">
        </area>
<area shape=poly coords="66,121,66,157,29,157,29,121,66,121" href="http://dbtune.org/jamendo/">
        </area>
<area shape=circle coords="217,131,23" href="http://dbtune.org/magnatune/">
        </area>
<area shape=circle coords="125,71,30" href="http://fgiasson.com/blog/index.php/2007/05/22/browsing-musicbrainzs-dataset-via-uri-dereferencing/">
        </area>
<area shape=poly coords="142,166,142,207,101,207,101,166,142,166" href="http://www.geonames.org/ontology/">
        </area>
<area shape=poly coords="322,122,322,176,269,176,269,122,322,122" href="http://www.foaf-project.org/">
        </area>
<area shape=circle coords="290,352,24" href="http://www4.wiwiss.fu-berlin.de/gutendata/">
        </area>
<area shape=circle coords="388,189,21" href="http://revyu.com/">
        </area>
<area shape=poly coords="396,234,396,273,358,273,358,234,396,234" href="http://www4.wiwiss.fu-berlin.de/dblp/">
        </area>
<area shape=circle coords="465,224,37" href="http://sites.wiwiss.fu-berlin.de/suhl/bizer/bookmashup/">
        </area>
<area shape=poly coords="268,194,268,236,227,236,227,194,268,194" href="http://dbpedia.org/">
        </area>
<area shape=circle coords="447,140,21" href="http://data.semanticweb.org/">
</area>
</map>
<p>
<a href="http://richard.cyganiak.de/2007/10/lod/"><img border=0 src="http://richard.cyganiak.de/2007/10/lod/lod-datasets_2008-03-31.png" usemap="#GraffleExport" width="500" /></a>
</p>
<p><a href="http://www.rafelsberger.at/">Walter Rafelsberger</a> provides two interesting examples, that can be adapted for security representation and interpretation.  Both examples make use of the <a href="http://processing.org/">Processing language</a>.  Processing is a data visualization programming language.  Read more about Processing on <a href="http://benfry.com/writing/">Ben Fry</a>&#8217;s  or <a href="http://reas.com/blog/">Casey Reas</a>&#8216; blog.</p>
<ul>
<li>Geosketch of world cities with a population of more than 1000, labeling those cities with more than 5 million:<br />
<img src="http://farm4.static.flickr.com/3279/2625156432_efc6347581.jpg" alt="" width=480 /></li>
<p><li>The second example visualizes conversations of about 1500 users from <a href="http://twitter.com/">Twitter</a>.  The arcs link positions of people who talk to each other:<br />
<img src="http://farm4.static.flickr.com/3130/2631170956_c61cddb00a.jpg" alt="" width=480 /></li>
</p>
</ul>
<p>
<a href="http://www.stat.ucla.edu/%7Enyau/">Nathan Yau</a>, from Flowing Data posted about &#8220;<a href="http://flowingdata.com/2008/10/20/40-essential-tools-and-resources-to-visualize-data/">40 Essential Tools and Resources to Visualize Data</a>.&#8221;   The post contains valuable information with additional resource links.  I came across Nathan&#8217;s post, while checking out FlowingData&#8217;s graphic post &#8220;<a href="http://projects.flowingdata.com/walmart/">Watching the Growth of Walmart Across America</a>.&#8221;  I was not able to embed the object.  You will need to click on the image to view the growth of Walmart.<br />
<a href="http://projects.flowingdata.com/walmart/"><img src="http://www.neoformix.com/2008/FlowingData_walmart.png" alt="" width=500 /></a>
</p>
<p>
What is really nice is that you can <a href="http://flowingdata.com/2008/10/21/code-for-walmart-growth-visualization-now-available/">downloaded the code</a>, including the <a href="http://en.wikipedia.org/wiki/ActionScript">Actionscripts</a> with the openings data from FlowingData&#8217;s site .  With that code other types of growth can be illustrated in a similar manner.  That is really nice.  <a href="http://modestmaps.com/">Modest Maps</a>, a BSD-licensed display and interaction library for tile-based maps in Flash (ActionScript 2.0 and ActionScript 3.0) and Python was used to map the data.  This reminds me of <a href="http://vis.cs.ucdavis.edu/%7Eogawa/codeswarm/">code_swarm</a>:
</p>
<p>
<object width="500" height="281"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=1130828&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=1130828&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="281"></embed></object><br /><a href="http://vimeo.com/1130828">code_swarm &#8211; Eclipse (short ver.)</a> from <a href="http://vimeo.com/michaelogawa">Michael Ogawa</a> on <a href="http://vimeo.com">Vimeo</a>.
</p>
<p>
If you have never watched the code_swarm video, you have to check it out.  It was done by <a href="http://www.vimeo.com/michaelogawa">Michael Ogawa</a>.  The example above shows the commit history of the Eclipse open source project.  To quote Michael:</p>
<blockquote><p>code_swarm, shows the history of commits in a software project. A commit happens when a developer makes changes to the code or documents and transfers them into the central project repository. Both developers and files are represented as moving elements. When a developer commits a file, it lights up and flies towards that developer. Files are colored according to their purpose, such as whether they are source code or a document. If files or developers have not been active for a while, they will fade away. A histogram at the bottom keeps a reminder of what has come before.</p></blockquote>
<p>It is a great example of visualizing something we traditionally would not think of outside of your run of the mill reports and numbers.
</p>
<p>
Take a look at <a href="http://jamiedubs.com/">Jamie Wilkinson</a>&#8217;s post &#8220;<a href="http://vimeo.com/2177573">Obama Wikipedia page edits</a>,&#8221; which is a visualization of people who have contributed to the Barack Obama page on Wikipedia between October 2005 &#8211; November 2008.  Users who edit a lot drift toward the center.  Visualized using code_swarm (Processing) and Jamie&#8217;s Wikipedia page history parser <a href="http://github.com/jamiew/wikiswarm/">Wikiswarm</a> (Ruby).  Code and instructions on how Jamie created this visualization can be found in his post &#8220;<a href="http://github.com/jamiew/wikiswarm/">Wikiswarm: visualize Wikipedia page histories</a>.&#8221;
</p>
<p>
<object width="500" height="281"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2177573&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=2177573&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="281"></embed></object><br /><a href="http://vimeo.com/2177573">Obama Wikipedia page edits</a> from <a href="http://vimeo.com/jamiew">Jamie Dubs</a> on <a href="http://vimeo.com">Vimeo</a>.
</p>
<p>
Most important, the <a href="http://code.google.com/p/codeswarm/">code_swarm source</a> if freely available.
</p>
<p><h2>Final Words</h2>
<p>Today we explored a few interesting paths for representing data.  Three excellent books to help guide us further on the visualization paths are:</p>
<ul>
<li><a href="http://nostarch.com/securityvisualization.htm">Security Data Visualization</a> by <a href="http://www.rumint.org/gregconti/">Greg Conti</a>.</li>
<li><a href="http://www.informit.com/store/product.aspx?isbn=0321510100">Applied Security Visualization</a> by <a href="http://raffy.ch/blog/">Raffael Marty</a>.</li>
<li><a href="http://www.amazon.com/exec/obidos/ASIN/0262182629/ref=nosim/benfrycom-20">Processing: A Programming Handbook for Visual Designers and Artists</a> by Casey Reas and Ben Fry (forward by <a href="http://plw.media.mit.edu/people/maeda/">John Maeda</a>) .
</li>
</ul>
<p>We have all heard the proverb, &#8220;<a href="http://en.wikipedia.org/wiki/A_picture_is_worth_a_thousand_words">A picture is worth a thousand words</a>.&#8221;  Another famous quote states, &#8220;<a href="http://www.phrases.org.uk/bulletin_board/24/messages/694.html">The devil is in the details</a>.&#8221;  Or, if you prefer, &#8220;God is in the details.&#8221;  If life was a <a href="http://www.startrekmovie.com/">Star Trek</a> episode, Kirk could have used those two quotes to cause a computer to explode.  Both statements are true and false, depending on the circumstances.
</p>
<p>
It is wise to remember the words of <a href="http://www.meta-religion.com/World_Religions/Buddhism/life_of_siddhartha_gautama.htm">Siddhartha Gautama</a>: “These blind men, every one honest in his contentions and certain of having the truth, formed schools and sects and factions.”  Geocoding and data visualization simply provide tools to help interpret information.  Interpretations are not absolute.  If you are looking for a silver bullet that will help the blind see, and the ignorant smart, I am afraid your search must continue.  The author A. L. Linall, Jr. once wrote, &#8220;Visualization and belief in a pattern of reality, activates the creative power of realization.”  The best solutions will come from using a combination of tools to help explore the possibilities, discover insights, view the results from different views which helps with realization, and provide a way to effectively communicate results. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2008/12/07/some-ideas-on-geocoding-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Bro IDS 1.4</title>
		<link>http://blog.securitymonks.com/2008/10/28/installing-bro-ids-14/</link>
		<comments>http://blog.securitymonks.com/2008/10/28/installing-bro-ids-14/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 05:11:34 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Bro]]></category>
		<category><![CDATA[GeoIP]]></category>
		<category><![CDATA[IDS]]></category>
		<category><![CDATA[Perftools]]></category>
		<category><![CDATA[XQilla]]></category>
		<category><![CDATA[Xerces-C++]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=657</guid>
		<description><![CDATA[

Joseph Campbell, an American mythology professor, writer, and lecturer, wrote “Computers are like Old Testament gods; lots of rules and no mercy.”  In the security world, signatures would be the rules that computers follow.  While signatures can be very useful, they also are very limiting.  In a previous post, titled simply &#8220;IDS&#8220;, [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://www.k-slug.org/wp-content/uploads/2007/01/dilbert200718326601251.gif" class="alignnone" width="500" height="156" /></p>
<p>
<a href="http://en.wikipedia.org/wiki/Joseph_Campbell">Joseph Campbell</a>, an American mythology professor, writer, and lecturer, wrote “Computers are like Old Testament gods; lots of rules and no mercy.”  In the security world, signatures would be the rules that computers follow.  While signatures can be very useful, they also are very limiting.  In a previous post, titled simply &#8220;<a href="http://blog.securitymonks.com/2007/06/17/ids/">IDS</a>&#8220;, we discussed how Intrusion Detection System/Intrusion Prevention System (IDS/IPS) technology is moving away from being solely signature based to a blend of signature based, anomaly detection, and activity based methodologies.
</p>
<p>
This is not surprising when we examine other areas of security.  Liam Tung, writer for ZDnet, has written an article titled, “<a href="http://www.zdnet.com.au/news/security/soa/Signature-based-antivirus-is-dead-get-over-it/0,130061744,339288527,00.htm">Signature-based antivirus is dead: Get over it</a>&#8220;.  In the article, Simon Clausen, founder &#038; CEO at PC Tools, reports that the security industry has been looking beyond blacklists. “I would very much disagree that AV is dead. Really, traditional signature-based AV is going to be dead in a few years, but what every antivirus company is evolving towards, like us, is behavioural AV technology, so AV will be alive.”
</p>
<p>
Bro is not signature based.  Instead, it was developed to be activity based with some support for anomaly detection.  From the beginning, Bro has always been focused on connections instead of just packets.  The Bro development team continues to advance the software, as demonstrated with the extensive changes in version 1.4.  Below are a few of the new features:
<ul>
<li>Can import Netflow version 5 data.</li>
<li>A BitTorrent analyzer is now available.</li>
<li>The &#8220;Bro Lite&#8221; configuration is now deprecated and will not in<br />
  general be supported.</li>
<li>Substantial updates to Broccoli, a Bro client library.</li>
<li>Extensive changes to allow Bro to process packets captured in the past intermingled with those captured in real-time.</li>
<li>scan.bro has been heavily modified to better support distributed scan analysis.</li>
<li>The new policy script targeted-scan.bro looks for repeated access from the same source to the same server, to detect things like SSH password-guessing attacks.</li>
<li>GeoIP information now includes latitude and longitude.</li>
<li>ssh.bro now supports the variable skip_processing_after_handshake which directs the event engine to omit any further processing of an SSH connection after its initial handshake.</li>
<li>Google&#8217;s perftools have replaced mpatrol for leak-checking and   heap-profiling.</li>
</ul>
<h3>Additional Information</h3>
<p>For additional information on Bro, below is a list of a few good site.</p>
<ul>
<li><a href="http://www.bro-ids.org/Bro-quick-start/">Bro Quick Start Guide</a> &#8211; contains info on installing, configuring, and running Bro.</li>
<li><a href="http://bro-ids.org/wiki/index.php/Main_Page">Bro Wiki</a> &#8211; intended for users and developers of Bro.</li>
<li><a href="http://mailman.icsi.berkeley.edu/pipermail/bro/">The Bro Archives</a> &#8211; mailing list archive.</li>
<li><a href="http://www.emergingthreats.net/index.php/component/content/article/1-latest/80-bro.html">Emerging Bro</a> &#8211; Bro signatures repository.</li>
<li><a href="http://blog.icir.org/">The ICSI Networking Group Blog</a> &#8211; the Blog for the Network Research at the International Computer Science Institute in Berkeley, CA.  These are the folks that develop Bro.</li>
<li><a href="http://a-bro-blog.blogspot.com/">A Bro Blo</a>g &#8211; A blog by Seth Hall, a Bro master and contributor.</li>
<li>C.S.Lee (geek00L) blog <a href="http://geek00l.blogspot.com/search/label/BRO">When {Puffy} Meets ^RedDevil^</a> .</li>
<li><a href="http://taosecurity.blogspot.com/search?q=Bro">TaoSecurity</a> &#8211; Richard Bejtlich has some good posts on Bro.</li>
<li>Last Bro <a href="http://www.bro-ids.org/wiki/index.php/WorkshopMaterial">Workshop Material</a>.</li>
</ul>
<h3>Supporting Software</h3>
<p>Bro offers many configuration options, depending on how you will use the software.  Below are a few libraries and software packages required by Bro:
</p>
<table border=1 width="90%">
<tr>
<th width=100 align=left>Package</th>
<th width=300 align=left>Description</th>
</tr>
<tr>
<td><a href="http://www.tcpdump.org/#latest">Libpcap</a></td>
<td>Most OSs will have libpcap installed by default.  It is the packet capture library.</td>
</tr>
<tr>
<td><a href="http://flex.sourceforge.net/">Flex</a></td>
<td>Most OSs will have flex installed by default. Flex is a tool for generating scanners. A scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in text.</td>
</tr>
<tr>
<td><a href="http://www.gnu.org/software/bison/">Bison </a>or byacc</td>
<td>Most OSs will have bison installed by default.  Bison is a general-purpose parser generator that converts an annotated context-free grammar into an LALR(1) or GLR parser for that grammar.</td>
</tr>
<tr>
<td><a href="http://www.isc.org/sw/bind/index.php">BIND8</a> headers and libraries</td>
<td>Most OSs will have BIND installed by default.  BIND (Berkeley Internet Name Domain) is an implementation of the Domain Name System (DNS) protocols.</td>
</tr>
<tr>
<td><a href="http://sources.redhat.com/autobook/">Autotools</a></td>
<td>The &#8220;autotools&#8221; consist of autoconf, automake, and libtool.  These will likely be installed on your system.  You need the autotools if you will be using source from the Bro&#8217;s Subversion repository.  You will need to run autogen.sh after you check out the code.  We will go through the steps below.
</td>
</tr>
</table>
<p>
Below are a few libraries and software packages that are not required, but you should consider installing.  The packages, except GeoIP and Google Perftools, should have binaries available for your OS.  Use these ports to install the packages and save yourself the trouble of having to keep the software updated.  We will go through through the installation of GeoIP and Google Perftools from source code.
</p>
<table border=1 width="90%">
<tr>
<th width=100 align=left>Package</th>
<th width=300 align=left>Description</th>
</tr>
<tr>
<td><a href="http://www.openssl.org/">OpenSSL</a></td>
<td>Tough to image a system not having OpenSSL installed.  It is needed to analyze ssh certificates by the HTTP analyzer and for encrypted Bro to Bro communication.</td>
</tr>
<tr>
<td>Libmagic</td>
<td>Add ability to determine file types, as with the ftp analyzer.</td>
</tr>
<tr>
<td><a href="http://www.zlib.net/">Libz</a></td>
<td>Libz is a compression library. It is used for decompressing HTTP bodies by the HTTP analyzer, and for compressed Bro-to-Bro communication.</td>
</tr>
<tr>
<td><a href="http://www.gnupg.org">GnuPG</a></td>
<td>Free implementation of the OpenPGP standard. </td>
</tr>
<tr>
<td><a href="http://www.maxmind.com/app/ip-lo">LibGeoIP</a></td>
<td>ability to determine the location of IP addresses.</td>
</tr>
<tr>
<td><a href="http://code.google.com/p/google-perftools/">Google Perftools</a></td>
<td>Includes TCMalloc, heap-checker, heap-profiler and cpu-profiler.</td>
</tr>
</table>
<p><h3>GeoIP Installation and Configuration</h3>
<p><a href="http://www.maxmind.com/app/ip-lo">MaxMind GeoIP</a> is a collection of APIs for looking up the location of an IP address.  There is a collection of <a href="http://www.maxmind.com/app/geolitecity">free GeoLite databases</a>, which are not as accurate as the GeoIP databases, but will do for starting out and testing with Bro.  To setup GeoIP for use with Bro, please follow the commands below.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# wget \

http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

 /usr/local/src root# gunzip GeoLiteCity.dat.gz
 /usr/local/src root# mkdir -p /usr/local/share/GeoIP
 /usr/local/src root# mv GeoLiteCity.dat /usr/local/share/GeoIP/GeoIPCity.dat
 /usr/local/src root# wget \

http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz

 /usr/local/src root# tar xzf GeoIP.tar.gz
 /usr/local/src root# cd  GeoIP-1.4.5
 /usr/local/src/GeoIP-1.4.5 root# ./configure
 /usr/local/src/GeoIP-1.4.5 root# make
 /usr/local/src/GeoIP-1.4.5 root# make check
 /usr/local/src/GeoIP-1.4.5 root# make install
</pre>
</td>
</table>
<p>
Make sure <strong>/usr/local/lib</strong> is placed into your library path.</p>
<h3>Google Perftools Installation and Configuration</h3>
<p>Google&#8217;s perftools is a collection of a high-performance multi-threaded malloc() implementation and some performance analysis tools.  Google&#8217;s perftools have replaced mpatrol for leak-checking and heap-profiling.  We will compile Bro with <strong>&#8211;enable-perftools</strong>.  By default, perftools will install under /usr/local directory.  With perftools compiled into Bro, there are two command-line options made available:
</p>
<table border=1 width="90%">
<tr>
<th width=40 align=left>Option</th>
<th width=360 align=left>What the option controls</th>
</tr>
<tr>
<td>-m</td>
<td>turns on leak checking of the main packet loop, with some uninteresting leaks are suppressed.  Currently, with one exception (the RPC analyzer; problem not yet found), it reports no leaks when running the test suite.</td>
</tr>
<tr>
<td>-M</td>
<td>turns on heap profiling: Bro will take a snapshot of the heap before starting the main packet loop and another one when finished.</td>
</tr>
</table>
<p>
To help with the installation of Google&#8217;s perftool, the ICSI Networking Group has written a post &#8220;<a href="http://blog.icir.org/2008/02/making-sure-your-bro-code-does-not-leak.html">Making Sure Your Bro Code Does Not Leak</a>.&#8221;  The post will provide additional information.  The basic steps to install perftools are:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# wget \

http://google-perftools.googlecode.com/files/google-perftools-0.99.2.tar.gz

 /usr/local/src root# tar xzf google-perftools-0.99.2.tar.gz
 /usr/local/src root# cd google-perftools-0.99.2
 /usr/local/src/google-perftools-0.99.2 root# ./configure
 /usr/local/src/google-perftools-0.99.2 root# make
 /usr/local/src/google-perftools-0.99.2 root# make check
 /usr/local/src/google-perftools-0.99.2 root# make install
 /usr/local/src/google-perftools-0.99.2 root# export LDFLAGS=-L/usr/local/lib
 /usr/local/src/google-perftools-0.99.2 root# export CFLAGS=-I/usr/local/include
 /usr/local/src/google-perftools-0.99.2 root# export CPPFLAGS=-I/usr/local/include
 /usr/local/src/google-perftools-0.99.2 root# export LD_LIBRARY_PATH=/usr/local/lib
</pre>
</td>
</table>
<p><h3>XML Analyzer</h3>
<p>The XML analyzer is highly-experimental code written by Tobias Kiesling.  Installation of Xerces-C++ and XQilla is required to use the <a href="http://www.bro-ids.org/wiki/index.php/XML_Analyzer">XML analyzer</a>.  The code allows you to be able to easily adjust analysis capabilities to specific XML data formats. Xerces-C++ is a validating XML parser written in a portable subset of C++.  XQilla is an XQuery and XPath 2 library and command line utility written in C++.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# wget \

http://downloads.sourceforge.net/xqilla/XQilla-2.1.3.tar.gz

 /usr/local/src root# wget \

http://mirror.its.uidaho.edu/pub/apache/xerces/c/2/sources/xerces-c-src_2_8_0.tar.gz

 /usr/local/src root# md5sum xerces-c-src_2_8_0.tar.gz
5daf514b73f3e0de9e3fce704387c0d2  xerces-c-src_2_8_0.tar.gz
 /usr/local/src root# tar xzf xerces-c-src_2_8_0.tar.gz
 /usr/local/src root# tar xzf XQilla-2.1.3.tar.gz
 /usr/local/src root# ln -s XQilla-2.1.3 xqilla
 /usr/local/src root# cd xerces-c-src_2_8_0
 /usr/local/src/xerces-c-src_2_8_0 root# patch -p1 < ../xqilla/src/xercesc_content_type.patch
 /usr/local/src/xerces-c-src_2_8_0 root# patch -p1 <../xqilla/src/xercesc_regex.patch
 /usr/local/src/xerces-c-src_2_8_0 root# export XERCESCROOT=`pwd`
 /usr/local/src/xerces-c-src_2_8_0 root# cd src/xercesc
</pre>
</pre>
</td>
</table>
<p>
FreeBSD 7 users will encounter a problem when trying the run the <strong>runConfigure</strong> command.  The error &#8220;C compiler cannot create executables &#8221; will be produced.  The problem is on line 358 of runConfigure.  The libc_r library cannot be found since it has been deprecated on FreeBSD since version 5.X and removed from version 7.0.  Edit runConfigure to not include &#8220;<strong>-lc_r</strong>&#8221; in the list of threading libraries.  Then issue the command:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# runConfigure \
-pfreebsd -cgcc -xg++ -minmem -nsocket -tIconvFBSD -rpthread  -s
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# gmake
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# gmake install
</pre>
</td>
</table>
<p>
An easier option is to install xerces and xqilla through the FreeBSD port command:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root # cd /usr/ports/textproc/xqilla
 /usr/ports/textproc/xqilla root # make install clean
</pre>
</td>
</table>
<p>
Other operating systems, such as Linux, do not require any special steps.  You just need to run the commands:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# runConfigure -plinux
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# make
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# make install
</pre>
</td>
</table>
<p>
With Xerces-C++, configure and install XQilla.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# cd /usr/local/src/xqilla/
 /usr/local/src/xqilla root# ./configure --with-xerces=`pwd`/../xerces-c-src_2_8_0/
 /usr/local/src/xqilla root# make
 /usr/local/src/xqilla root# make install
</pre>
</td>
</table>
<p><h3>Bro Installation and Configuration</h3>
<p>There a few options when installing Bro.  Bro was not developed for the <a href="http://en.wikipedia.org/wiki/Pointy_Haired_Boss">PHB</a>.  Advance security software provides the power to the user, with all the options to adapt it to your environment.  To quote the Bro site, &#8220;Bro has been developed primarily as a research platform for intrusion detection and traffic analysis. It is not intended for someone seeking an &#8216;out of the box&#8217; solution. Bro is designed for use by Unix experts who place a premium on the ability to extend an intrusion detection system with new functionality as needed, which can greatly aid with tracking evolving attacker techniques as well as inevitable changes to a site&#8217;s environment and security policy requirements.&#8221;  With the Unix experts in mind, we will go through the steps involved to install both the stable and the development versions of Bro.  </p>
<h4><strong>Current Stable Version</strong></h4>
<p>The current version should be the most stable.  To install, follow these commands:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# wget ftp://bro-ids.org/bro-1.4-release.tar.gz
 /usr/local/src root# tar xzf bro-1.4-release.tar.gz
 /usr/local/src root# cd bro-1.4
</pre>
</td>
</table>
<p>
The configuration and installations appears below.</p>
<h4><strong>Subversion Trunk</strong></h4>
<p>Reading the posts on the <a href="http://mailman.icsi.berkeley.edu/pipermail/bro/">Bro mailing list</a>, reveals that modifications have already been made to the current release.  Fixes are being made continuously.  These changes, while fixing problems, might introduce new problems.  You do have the option of getting the most up-to-date code possible through the subversion repository.  The Bro development team has made available two subparts of the repository: the trunk and development branches.  The trunk is the main development head from which releases are made on a regular basis.  It should be fairly stable with changes passing a regression suite to ensure the code do not break existing functionality.  It is still considered experimental and not suitable for critical deployment.  Below is how to download code from the trunk.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# mkdir bro-cvs
 /usr/local/src/bro-cvs root# cd bro-cvs
 /usr/local/src/bro-cvs root# svn checkout http://svn.icir.org/bro/trunk/bro
 /usr/local/src/bro-cvs root# mv bro bro-1.4.cvs
 /usr/local/src/bro-cvs root# cd bro-1.4.cvs
 /usr/local/src/bro-cvs/bro-1.4.cvs root# ./autogen.sh
</pre>
</td>
</table>
<p><h4><strong>Robin&#8217;s Development Branch</strong></h4>
<p>The developers merge their work into the the Bro subversion trunk.  Robin Sommer has a separate branch which contains experimental code for:
<ul>
<li>the Bro Cluster framework</li>
<li>NetFlow support (by Bernhard Ager)</li>
<li>a BitTorrent analyzer (by Nadi Sarrar and Bernhard Ager)</li>
<li>an XML analyzer (by Tobias Kiesling)</li>
<li>Python bindings for Broccoli</li>
<li>restructured logic for taking drop decisions via Bro&#8217;s notice framework (by Brian Tierney and Robin Sommer)</li>
<li>a test-suite for Bro&#8217;s communication &#038; serialization subsystems</li>
<li>various tweaks and bugfixes</li>
</ul>
<p>If you want the latest work done by Robin and others mentioned above, you can get access to the code with the following commands.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# mkdir bro-cvs
 /usr/local/src root# cd bro-cvs
 /usr/local/src/bro-cvs root# svn checkout http://svn.icir.org/bro/branches/robin/work
 /usr/local/src/bro-cvs root# mv work bro-1.4.robin
 /usr/local/src/bro-cvs root# cd bro-1.4.robin
 /usr/local/src/bro-cvs/bro-1.4.robin root# ./autogen.sh
</pre>
</td>
</table>
<p><h4><strong>Configure and Install</strong></h4>
<p>Because of the various bug fixes and the additional features which add interesting options, we are going to step through installation of Robin&#8217;s branch.  Please use the version of Bro appropriate for your operation.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src/bro-cvs/bro-1.4.robin
 /usr/local/src/bro-cvs/bro-1.4.robin root# ./configure --enable-debug \
--enable-perftools --prefix=/usr/local/bro --with-xqilla
 /usr/local/src/bro-cvs/bro-1.4.robin root# make
 /usr/local/src/bro-cvs/bro-1.4.robin root# make check
 /usr/local/src/bro-cvs/bro-1.4.robin root# make install
</pre>
</td>
</table>
<p>
If you run into any problems, go to back to the stable version of Bro and see if you can get it to compile.  Then you may want to try the subversion trunk code.</p>
<h3>Final Words</h3>
<p>We have taken the first step and now have Bro installed.  Installation is only the beginning.  In an upcoming post, we will walk through configuring Bro and examining a simple policy.  We will send some attacks against Bro, and see what kind of results are produced.  Having completed the first step of installing Bro, we can move on and have some fun.  As <a href="http://www.humphreybogart.com/">Humphrey Bogart</a> put it in his famous last line from <a href="http://www.imdb.com/title/tt0034583/">Casablanca</a>, &#8220;Louis, I think this is the beginning of a beautiful friendship.&#8221;  </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2008/10/28/installing-bro-ids-14/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

