<?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; code_swarm</title>
	<atom:link href="http://blog.securitymonks.com/category/code_swarm/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>
	</channel>
</rss>

