<?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>Looking for the paradigm &#187; meta</title>
	<atom:link href="http://www.evanhoffman.com/evan/tag/meta/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evanhoffman.com/evan</link>
	<description>So I can pass it off</description>
	<lastBuildDate>Thu, 26 Jan 2012 22:17:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Graphing SSH dictionary attacks with HighCharts</title>
		<link>http://www.evanhoffman.com/evan/2011/11/18/graphing-ssh-dictionary-attacks-with-highcharts/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=graphing-ssh-dictionary-attacks-with-highcharts</link>
		<comments>http://www.evanhoffman.com/evan/2011/11/18/graphing-ssh-dictionary-attacks-with-highcharts/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 19:06:03 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[geo ip]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[maxmind]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=1682</guid>
		<description><![CDATA[TweetAfter my 10-year-old basement Linux server died this week from a power outage, I took the sad step of giving up on it. It&#8217;s died before and I&#8217;ve patched it back together with a new power supply here or an addon PCI SATA card there, but I finally decided to throw in the towel since [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2011/11/18/graphing-ssh-dictionary-attacks-with-highcharts/&via=EvanHoffman&text=Graphing SSH dictionary attacks with HighCharts&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2011/11/18/graphing-ssh-dictionary-attacks-with-highcharts/"></g:plusone></div><p>After my 10-year-old basement Linux server died this week from a power outage, I took the sad step of giving up on it.  It&#8217;s died before and I&#8217;ve patched it back together with a new power supply here or an addon PCI SATA card there, but I finally decided to throw in the towel since I had a newer old computer that had been idle for several years.  The one that died was an Athlon K7 750 MHz with 512 MB ram.  The new one is an Athlon 2 GHz (3200+) with 1 gig.  For my uses, specs don&#8217;t really matter that much, but it&#8217;s nice to have more power for free.</p>
<p>I put CentOS 6 on it and configured Samba and copied all the data off the old machine and was back up and running within a few hours.  Since I forward ports through my FiOS router to this box I did my standard lockdown procedure, including adding myself to the AllowUsers in sshd_config.  Afterwards I took a look in /var/log/secure and saw the typical flood of dictionary attacks trying to get in as root or bob or tfeldman or jweisz.  I have iptables configured to rate-limit SSH connections to 2 per 5 seconds per IP so the box doesn&#8217;t get DoSed out of existence, but some stuff does make it through to sshd.  </p>
<p>Looking through /var/log/secure, I got to thinking it would be interesting if there was some way to visualize the attacks in a handy graph.  Then I remembered, oh, wait, I can do that.</p>
<p>I wrote a perl script to parse out the attacks from /var/log/secure and insert them into a Postgres DB.  This turned out to be pretty easy.  Then I thought it would be more interesting to tie the IP of each attack to its originating country.  I&#8217;ve used <a href="http://www.maxmind.com/">MaxMind&#8217;s</a> GeoIP DB pretty extensively before, but I was looking something free.  That&#8217;s when I remembered that MaxMind has a free GeoIP DB: <a href="http://www.maxmind.com/app/geolitecity">GeoLiteCity</a>.  I grabbed it and yum-installed the <a href="http://search.cpan.org/~borisz/Geo-IP-1.40/lib/Geo/IP.pm">Perl lib</a> and added the geo data to the attack DB.  Rather than worry about normalizing the schema I just shoved the info into the same table.  Life is easier this way, and it&#8217;s just a for-fun project.</p>
<p>So I got that all working and parsed it against the existing /var/log/secures via</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>lunix2011 ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># zcat /var/log/secure-20111117.gz | perl parse-secure.pl</span></pre></div></div>

<p>I wrote <a href="https://github.com/evandhoffman/parse-secure/blob/master/php/ssh.php">ssh.php</a> to see what&#8217;s in the table:</p>
<div id="attachment_1684" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.evanhoffman.com/evan/2011/11/18/graphing-ssh-dictionary-attacks-with-highcharts/screen-shot-2011-11-18-at-1-38-07-pm/" rel="attachment wp-att-1684"><img src="http://www.evanhoffman.com/evan/wp-content/uploads/2011/11/Screen-shot-2011-11-18-at-1.38.07-PM.png" alt="ssh.php list of hacking attempts" title="ssh.php list of hacking attempts" width="300" class="size-full wp-image-1684" /></a><p class="wp-caption-text">ssh.php list of hacking attempts</p></div>
<p>So now that the data was all in place, time to move on to the graphs, which is what I really wanted to do.  Last time I wanted to graph data programmatically I used <a href="http://jpgraph.net/">JPGraph</a>, which does everything in PHP and is super versatile.  But I wanted something&#8230; cooler.  Maybe something interactive.  A little Googling turned up <a href="http://www.highcharts.com/">Highcharts</a> which is absolutely awesome, and does everything in JavaScript.  I basically modified some of their example charts and pumped my data into them and got the charts below.</p>
<p>Pie chart of attacks grouped by country for the past 30 days:</p>
<div id="attachment_1687" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.evanhoffman.com/evan/2011/11/18/graphing-ssh-dictionary-attacks-with-highcharts/screen-shot-2011-11-18-at-2-01-46-pm/" rel="attachment wp-att-1687"><img src="http://www.evanhoffman.com/evan/wp-content/uploads/2011/11/Screen-shot-2011-11-18-at-2.01.46-PM.png" alt="Pie chart by country" title="Pie chart by country" width="300"  class="size-full wp-image-1687" /></a><p class="wp-caption-text">Pie chart by country</p></div>
<p>Bar graph of attacks per day:</p>
<div id="attachment_1688" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.evanhoffman.com/evan/2011/11/18/graphing-ssh-dictionary-attacks-with-highcharts/screen-shot-2011-11-18-at-2-01-30-pm/" rel="attachment wp-att-1688"><img src="http://www.evanhoffman.com/evan/wp-content/uploads/2011/11/Screen-shot-2011-11-18-at-2.01.30-PM.png" alt="Bar graph of daily attacks" title="Bar graph of daily attacks" width="300"  class="size-full wp-image-1688" /></a><p class="wp-caption-text">Bar graph of daily attacks</p></div>
<p>So, that&#8217;s that.  Code is in <a href="https://github.com/evandhoffman/parse-secure">github</a> if anyone wants to play around with it.  I&#8217;ve cronned <a href="https://github.com/evandhoffman/parse-secure/blob/master/perl/parse-secure.pl">parse-secure.pl</a> to run every 5 minutes so the data gets updated automatically.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2011/11/18/graphing-ssh-dictionary-attacks-with-highcharts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying currently-playing iTunes track in the Mac menu bar</title>
		<link>http://www.evanhoffman.com/evan/2011/10/21/displaying-currently-playing-itunes-track-in-the-mac-menu-bar/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=displaying-currently-playing-itunes-track-in-the-mac-menu-bar</link>
		<comments>http://www.evanhoffman.com/evan/2011/10/21/displaying-currently-playing-itunes-track-in-the-mac-menu-bar/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 18:48:42 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[current track]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[menulet]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[whine]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=1641</guid>
		<description><![CDATA[TweetIn an attempt to teach myself Objective C, and because I couldn&#8217;t find anything that did what I wanted, I wrote a little utility to display the currently-playing iTunes track in the Mac taskbar. Originally I had it display the full track name right in the taskbar but it was too much text for such [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2011/10/21/displaying-currently-playing-itunes-track-in-the-mac-menu-bar/&via=EvanHoffman&text=Displaying currently-playing iTunes track in the Mac menu bar&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2011/10/21/displaying-currently-playing-itunes-track-in-the-mac-menu-bar/"></g:plusone></div><p>In an attempt to teach myself Objective C, and because I couldn&#8217;t find anything that did what I wanted, I wrote a little utility to display the currently-playing iTunes track in the Mac taskbar.  Originally I had it display the full track name right in the taskbar but it was too much text for such a small space (especially on a 1440&#215;900 screen), so now you click a little musical note and it shows you the info in a menu.  </p>
<p>Here&#8217;s a screenshot:</p>
<p><a href="http://www.evanhoffman.com/evan/2011/10/21/displaying-currently-playing-itunes-track-in-the-mac-menu-bar/screen-shot-2011-10-20-at-8-54-49-pm/" rel="attachment wp-att-1642"><img src="http://www.evanhoffman.com/evan/wp-content/uploads/2011/10/Screen-shot-2011-10-20-at-8.54.49-PM.png" alt="" title="Screen shot 2011-10-20 at 8.54.49 PM" width="365" height="416" class="aligncenter size-full wp-image-1642" /></a></p>
<p>The code is all in <a href="https://github.com/evandhoffman/iTunes-Song-Title">github</a>.  If you&#8217;re looking for a similar utility, and are brave enough to try my first-ever Obj-C app, you can download it  <a href='http://www.evanhoffman.com/evan/2011/10/21/displaying-currently-playing-itunes-track-in-the-mac-menu-bar/itunes-current-track-app/' rel='attachment wp-att-1646'>here.</a>  But the freshest version will probably be in the github project.  </p>
<p>As an aside, I was surprised at how easy it was to cobble this together having never written ObjC before.  I found some good examples that I mostly ripped off, but it was still remarkably easy to have the app listen to iTunes for track changes, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2011/10/21/displaying-currently-playing-itunes-track-in-the-mac-menu-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installed Relevanssi so search won&#8217;t be so useless.</title>
		<link>http://www.evanhoffman.com/evan/2011/06/02/installed-relevanssi-so-search-wont-be-so-useless/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installed-relevanssi-so-search-wont-be-so-useless</link>
		<comments>http://www.evanhoffman.com/evan/2011/06/02/installed-relevanssi-so-search-wont-be-so-useless/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 21:07:53 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[relevanssi]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=1319</guid>
		<description><![CDATA[TweetI installed the Relevanssi plugin because the native WordPress search seemed almost useless. So far it seems to be vastly superior. Native search frequently returned zero results when there were relevant posts. So, enjoy.]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2011/06/02/installed-relevanssi-so-search-wont-be-so-useless/&via=EvanHoffman&text=Installed Relevanssi so search won't be so useless.&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2011/06/02/installed-relevanssi-so-search-wont-be-so-useless/"></g:plusone></div><p>I installed the <a href="http://wordpress.org/extend/plugins/relevanssi/">Relevanssi</a> plugin because the native WordPress search seemed almost useless.  So far it seems to be vastly superior.  Native search frequently returned zero results when there were relevant posts.  So, enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2011/06/02/installed-relevanssi-so-search-wont-be-so-useless/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traffic spike</title>
		<link>http://www.evanhoffman.com/evan/2011/04/09/traffic-spike/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=traffic-spike</link>
		<comments>http://www.evanhoffman.com/evan/2011/04/09/traffic-spike/#comments</comments>
		<pubDate>Sat, 09 Apr 2011 13:08:53 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[evan]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=1152</guid>
		<description><![CDATA[TweetSomehow this site became the top Google result for two different searches, &#8220;Shogun2.dll appcrash&#8221; and &#8220;fedora 14 gnome3&#8243;. My theory is that Google&#8217;s indexing the referring keywords listed in the widget on the right, causing a snowball effect. But the rise in traffic this year has been dramatic, especially for a site really about nothing.]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2011/04/09/traffic-spike/&via=EvanHoffman&text=Traffic spike&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2011/04/09/traffic-spike/"></g:plusone></div><p>Somehow this site became the top Google result for two different searches, &#8220;Shogun2.dll appcrash&#8221; and &#8220;fedora 14 gnome3&#8243;.  My theory is that Google&#8217;s indexing the referring keywords listed in the widget on the right, causing a snowball effect.  But the rise in traffic this year has been dramatic, especially for a site really about nothing.</p>
<div id="attachment_1153" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.evanhoffman.com/evan/2011/04/09/traffic-spike/fullscreen-capture-492011-90258-am/" rel="attachment wp-att-1153"><img src="http://www.evanhoffman.com/evan/wp-content/uploads/2011/04/Fullscreen-capture-492011-90258-AM-300x94.jpg" alt="Traffic 2011-02-01 to 2011-04-08" title="Traffic 2011-02-01 to 2011-04-08" width="300" height="94" class="size-medium wp-image-1153" /></a><p class="wp-caption-text">Traffic 2011-02-01 to 2011-04-08</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2011/04/09/traffic-spike/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why is my title in smallcaps now?</title>
		<link>http://www.evanhoffman.com/evan/2009/04/24/why-is-my-title-in-smallcaps-now/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=why-is-my-title-in-smallcaps-now</link>
		<comments>http://www.evanhoffman.com/evan/2009/04/24/why-is-my-title-in-smallcaps-now/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 00:48:56 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=82</guid>
		<description><![CDATA[TweetWordPress is doing something weird now. Yesterday the head of the site was not in all caps, and today it is. Hmm. Ok, I figured it out. I guess I must have installed some new font on this computer &#8211; &#8220;Trajan Pro&#8221; &#8211; and the header was showing in that font. I deleted it from [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2009/04/24/why-is-my-title-in-smallcaps-now/&via=EvanHoffman&text=Why is my title in smallcaps now?&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2009/04/24/why-is-my-title-in-smallcaps-now/"></g:plusone></div><p><del datetime="2009-04-25T00:54:20+00:00">WordPress is doing something weird now.  Yesterday the head of the site was not in all caps, and today it is.</p>
<p>Hmm.</del></p>
<p>Ok, I figured it out.  I guess I must have installed some new font on this computer &#8211; &#8220;Trajan Pro&#8221; &#8211; and the header was showing in that font.  I deleted it from the stylesheet and now it defaults to Lucida Sans Unicode, which is what I wanted.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2009/04/24/why-is-my-title-in-smallcaps-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time for WordPress</title>
		<link>http://www.evanhoffman.com/evan/2009/03/27/time-for-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=time-for-wordpress</link>
		<comments>http://www.evanhoffman.com/evan/2009/03/27/time-for-wordpress/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 16:15:30 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=3</guid>
		<description><![CDATA[TweetEverybody else is doing it&#8230; I guess I&#8217;ll try converting my old posts to this thing and ditch the old page.]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2009/03/27/time-for-wordpress/&via=EvanHoffman&text=Time for WordPress&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2009/03/27/time-for-wordpress/"></g:plusone></div><p>Everybody else is doing it&#8230;</p>
<p>I guess I&#8217;ll try converting my old posts to this thing and ditch the old page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2009/03/27/time-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

