<?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>Static in the Ether &#187; tools</title>
	<atom:link href="http://lair.moria.org/blog/archives/category/tools/feed" rel="self" type="application/rss+xml" />
	<link>http://lair.moria.org/blog</link>
	<description>Unix, Information Security &#38; Systems Administration</description>
	<lastBuildDate>Wed, 11 Nov 2009 09:14:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>convert man pages to PDF</title>
		<link>http://lair.moria.org/blog/archives/267</link>
		<comments>http://lair.moria.org/blog/archives/267#comments</comments>
		<pubDate>Sun, 09 Aug 2009 14:22:19 +0000</pubDate>
		<dc:creator>Barry Irwin</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://lair.moria.org/blog/?p=267</guid>
		<description><![CDATA[Recently I had need to produce pdf files of some man pages simple because the are far easier to print and review onscreen. The following snippet added to my .bash_profile does the trick. # Convert man pages to pdf man2pdf() { m2pfile="/tmp/${1}-m2p.pdf" if [ ! -s $m2pfile ]; then # is it there and &#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had need to produce pdf files of some man pages simple because the are far easier to print and review onscreen.  The following snippet added to my .bash_profile does the trick.</p>
<p><code><br />
# Convert man pages to pdf<br />
man2pdf()<br />
{<br />
m2pfile="/tmp/${1}-m2p.pdf"<br />
if [ ! -s $m2pfile ]; then   # is it there and &gt; zero bytes&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;     man -t "${1}" | ps2pdf  - &gt;  "$m2pfile"<br />
&nbsp;&nbsp;&nbsp;&nbsp;     fsize=`du -k $m2pfile | awk '{print $1}'`<br />
&nbsp;&nbsp;&nbsp;&nbsp;     echo "Created PDF file in $m2pfile ($fsize KB)"<br />
fi<br />
}<br />
</code></p>
<p>It can trivially be extended to check for things like a $DISPLAY variable and pop up a viewer or request to print.  The caching is admittedly crude, but works since /tmp is cleared out periodically. Output  looks like:</p>
<p><code>[bvi@starburst ~]$ man2pdf ls<br />
Created PDF file in /tmp/ls-m2p.pdf (20 KB)</code></p>
]]></content:encoded>
			<wfw:commentRss>http://lair.moria.org/blog/archives/267/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nmap goes 5.0</title>
		<link>http://lair.moria.org/blog/archives/243</link>
		<comments>http://lair.moria.org/blog/archives/243#comments</comments>
		<pubDate>Thu, 16 Jul 2009 18:12:43 +0000</pubDate>
		<dc:creator>Barry Irwin</dc:creator>
				<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://lair.moria.org/blog/archives/243</guid>
		<description><![CDATA[NMAP officially went to version 5.0 today, being described as the most significant release since 1997. I find it hard to believe I&#8217;ve been using this for 12 years. and will hopefully be around for many more. FreeBSD ports are still holding 4.90RC1 form 10 days ago, but are likely to get updated soon.]]></description>
			<content:encoded><![CDATA[<p>NMAP officially went to <a href="http://nmap.org/5/">version 5.0</a> today, being described as the most significant release since 1997. I find it hard to believe I&#8217;ve been using this for 12 years. and will hopefully be around for many more.</p>
<p>
<a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/security/nmap/">FreeBSD ports</a> are still holding 4.90RC1 form 10 days ago, but are likely to get updated soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://lair.moria.org/blog/archives/243/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting Internet Barometer Data</title>
		<link>http://lair.moria.org/blog/archives/214</link>
		<comments>http://lair.moria.org/blog/archives/214#comments</comments>
		<pubDate>Tue, 30 Jun 2009 23:20:42 +0000</pubDate>
		<dc:creator>Barry Irwin</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Security Tools]]></category>

		<guid isPermaLink="false">http://lair.moria.org/blog/?p=214</guid>
		<description><![CDATA[My first foray into the tag soup that is  XSL and XSLT has been to turn the XML outputs from the InterNet Barometer System as discussed previously into plain text output which I can use more easily for comparing with some of my other data sources. While A cursory browse cannot find any Terms &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>My first foray into the tag soup that is  XSL and XSLT  has been to turn the XML outputs from the InterNet Barometer System as <a href="http://lair.moria.org/blog/archives/205" target="_self">discussed previously</a> into plain text output which I can use more easily for comparing with some of my other data sources. While A cursory browse cannot find any Terms &amp; conditions for the use of this data, I think I&#8217;m on safe ground given that all I&#8217;m doing is processing the same xml that is consumed by the flash objects and its not for any kind of commercial use. After hunting around for tools, and wasting a pile of bandwidth on &#8220;enterprise editions&#8221; I ended up constructing this based on some tutorials at w3c.org  using good old <a href="http://vim.org/">vim</a>. I was very tempted to just revert back to sed &amp; awk, or even try my hand at python&#8217;s parsing, but decided that I may as well &#8216;do it right&#8217;. The result of a few hours work this evening while watching a filesystem rebuild is shown below:<br />
<code><br />
&lt;?xml version='1.0'?&gt;<br />
&lt;xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;<br />
&lt;!-- Barry Irwin bvi@moria.org XSL format for translating XML from interoute Barometer output --&gt;<br />
&lt;xsl:output method="text"/&gt;<br />
&lt;xsl:strip-space elements="*"/&gt;<br />
&lt;xsl:template match="area"&gt;<br />
&lt;xsl:value-of select="../../allData/lastUpdated"/&gt;<br />
&lt;xsl:text&gt;,&lt;/xsl:text&gt;<br />
&lt;xsl:value-of select="@mc_name"/&gt;<br />
&lt;xsl:text&gt;,&lt;/xsl:text&gt;<br />
&lt;xsl:value-of select="@title"/&gt;<br />
&lt;xsl:text&gt;,&lt;/xsl:text&gt;<br />
&lt;xsl:value-of select="@value"/&gt;<br />
&lt;xsl:text&gt;,&lt;/xsl:text&gt;<br />
&lt;xsl:value-of select="@colour"/&gt;<br />
&lt;xsl:text&gt;<br />
&lt;/xsl:text&gt;    &lt;/xsl:template&gt;<br />
&lt;xsl:template match="allData"&gt;<br />
&lt;/xsl:template&gt;<br />
</code><br />
This through the magic of <a title="xsltproc command line processor form libxslt" href="http://xmlsoft.org/XSLT/xsltproc2.html">xsltproc</a> produces a nice plain text output:</p>
<p><code><tt>xsltproc map2.xsl asia.xml</tt></code></p>
<p>given the input from the <a href="http://barometer.interoute.com/barom_attacks_main.php#asia_title" target="_blank">Asia attack  graph</a> produces:</p>
<p><code>30-06-2009 05:00:17 GMT,RU,Russia,15387,green<br />
30-06-2009 05:00:17 GMT,TR,Turkey,7137,green<br />
30-06-2009 05:00:17 GMT,CN,China,2468,green<br />
30-06-2009 05:00:17 GMT,MY,Malaysia,4158,green<br />
30-06-2009 05:00:17 GMT,IN,India,2631,green<br />
30-06-2009 05:00:17 GMT,TH,Thailand,1823,green</code></p>
<p>While not the most elegant code, its gets done what I need, and is easily extensible enough to be able to  transform to other formats suitable for DB import. I&#8217;ll need to monitor data over the next couple of days to get an idea as to how the counters used are actually operating. Once that has been established I can star doing some meaningful comparisons.</p>
]]></content:encoded>
			<wfw:commentRss>http://lair.moria.org/blog/archives/214/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security Tools update</title>
		<link>http://lair.moria.org/blog/archives/179</link>
		<comments>http://lair.moria.org/blog/archives/179#comments</comments>
		<pubDate>Fri, 06 Feb 2009 21:48:53 +0000</pubDate>
		<dc:creator>Barry Irwin</dc:creator>
				<category><![CDATA[tools]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Network Telescope]]></category>
		<category><![CDATA[Security Tools]]></category>

		<guid isPermaLink="false">http://lair.moria.org/blog/?p=179</guid>
		<description><![CDATA[Over the last week or so a number of new tools have been release either for the first time or as updated versions: tcpreplay is now at version 3.4.0 with a number of significant bugfixes. This staple of packet analysis allows for the replay of captured pcap file back over network interfaces.  Its a great [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last week or so a number of new tools have been release either for the first time or as updated versions:</p>
<ul>
<li><a href="http://tcpreplay.synfin.net/trac/wiki/Download">tcpreplay</a> is now at version 3.4.0 with a number of significant bugfixes. This staple of packet analysis allows for the replay of captured pcap file back over network interfaces.  Its a great way of having a repeatable test framework, or for explosing yout NIDS system to collected bad traffic.</li>
<li><a href="http://www.wallinfire.net/picviz">picviz</a> 0.5 has been released. I blogged about this <a href="http://lair.moria.org/blog/archives/137">before</a> and the project seems to be comming on nicely. Formy own purposes its not much use with my network telescope data, but does produce some pretty pictures for some other work Ive been doing of late. The new version comes with a bumber of new log parsers. A slide deck <a href="http://www.wallinfire.net/files/picviz-usenix-wasl2008.pdf">discussing its use</a> as presented at USENIX 2008 is also available.</li>
<li><a href="http://www.pcapr.net/">pcapr</a> is the new tool out and describes itself as &#8220;<em>web 2.0 meets packets</em>&#8220;, and &#8220;<em>pcapr does to packets what flickr does to pictures&#8221;. </em>If it performs as promised it could make life a lot easier maintinaing libraries of packet captures. The fact its a hosted service does have some distinct disadvantages. Currently there seems to be quote a lot of little snippets. An <a href="http://www.pcapr.net/rss">RSS feed</a> of new content is also available.  Another similar repository s that of <a href="http://www.openpacket.org/">openpacket.org</a></li>
<li><a href="http://research.wand.net.nz/software/libtrace.php">libtrace</a> while not a new tool as such, is somethign I&#8217;ve started workign with recentlyafter comming across it in <a href="http://www.mcs.vuw.ac.nz/comp/graduates/archives/msc/Dean_Pemberton_MSC_Thesis.pdf">Dean Pemberton&#8217;s MSc Thesis</a>2007  on  Internet Background Radiation Arrival Density and Network Telescope Sampling Strategies. The api looks pretty clean and it comes with a couple of nice demo tools which are actually useful.  the URI syntax it uses for accessing files is a little strange but managable.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lair.moria.org/blog/archives/179/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Infosec Viz Tool &#8211; Picviz</title>
		<link>http://lair.moria.org/blog/archives/137</link>
		<comments>http://lair.moria.org/blog/archives/137#comments</comments>
		<pubDate>Fri, 24 Oct 2008 06:48:46 +0000</pubDate>
		<dc:creator>Barry Irwin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Vizualization]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PicVis]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[VizSec]]></category>

		<guid isPermaLink="false">http://lair.moria.org/blog/?p=137</guid>
		<description><![CDATA[Version 0.3 of PicViz has been released, based on python and QT &#8211; which bodes well for potential portability. This is yet another tool to help one actually filter through piles of connections, using a classic parallel axis setup.  Drilldown is offered. Some example renderings of  the Kaminsky DNS attacks are available. A more advanced [...]]]></description>
			<content:encoded><![CDATA[<p>Version 0.3 of <a href="http://www.wallinfire.net/picviz">PicViz </a>has been released, based on python and QT &#8211; which bodes well for potential portability. This is yet another tool to help one actually filter through piles of connections, using a classic parallel axis setup.  Drilldown is offered. Some example renderings of  the Kaminsky DNS attacks are <a href="http://www.wallinfire.net/picviz/wiki/GeneratedBindKaminsky">available</a>.</p>
<p>A more advanced version of the kind of output achievable is also provided showing how with the help of a pre-processing script, the <a href="http://www.wallinfire.net/picviz/wiki/SshCatchMe">SSH login proces</a>s can be graphed:</p>
<p><a href="http://www.wallinfire.net/picviz/attachment/wiki/SshCatchMe/auth.png?format=raw"><img class="aligncenter" title="SSH login process in PicViz" src="http://www.wallinfire.net/picviz/attachment/wiki/SshCatchMe/auth.png?format=raw" alt="" width="250" height="250" /></a></p>
<p>Graphs are produced via an intermediate scripting language which has by design strong similarity to that used by <a href="http://www.graphviz.org/">Graphviz.</a>  I&#8217;ll definatley be adding this to my toolset and seeing how it handles processing of some of the rather large data sets Ive got.</p>
]]></content:encoded>
			<wfw:commentRss>http://lair.moria.org/blog/archives/137/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
