<?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>Nix Bits &#187; Security</title>
	<atom:link href="http://www.scottharney.com/category/computers/computerssecurity/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottharney.com</link>
	<description>Notes about life, *nix, and other stuff.</description>
	<lastBuildDate>Thu, 09 Dec 2010 16:24:29 +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>WordPress upgrade</title>
		<link>http://www.scottharney.com/2009/09/08/wordpress-upgrade/</link>
		<comments>http://www.scottharney.com/2009/09/08/wordpress-upgrade/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 14:27:01 +0000</pubDate>
		<dc:creator>scotth</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Lindy Hop]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.scottharney.com/?p=174</guid>
		<description><![CDATA[Well Twitter was all abuzz about a WordPress worm and sure enough a worm had been circulating attacking old versions of wordpress.  Well obviously I pretty much never post on this blog these days.   And wordpress is notorious for security issues.  This is partly due to the popularity of the product, partly due to problems [...]]]></description>
			<content:encoded><![CDATA[<p>Well Twitter was all abuzz about a WordPress worm and sure enough a worm had been circulating attacking old versions of <a href="http://wordpress.org/development/2009/09/keep-wordpress-secure/">wordpress</a>.  Well obviously I pretty much never post on this blog these days.   And wordpress is notorious for security issues.  This is partly due to the popularity of the product, partly due to problems with php itself, and probably partly due to some flaws in WordPress’s on code. But, to their credit, they update quickly and the word doess get out.  And, to their credit, upgrading was really simple despite the many customizations I have done.  So kudos to the wordpress team.  What I didn’t want was for this thing to get hacked and have spam links spread all through it and have it ruin my google search ranking.  So there it is.</p>
<p>On a more fun note, we’ve been spending the past year trying to learn to <a href="http://www.dancequarter.com/">lindy hop</a>.  Maybe someday we’ll get as good as this:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/JOx40vQh5eg&amp;feature" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/JOx40vQh5eg&amp;feature"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottharney.com/2009/09/08/wordpress-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looks like someone had the same idea for ssh blocking</title>
		<link>http://www.scottharney.com/2005/06/06/looks-like-someone-had-the-same-idea-for-ssh-blocking/</link>
		<comments>http://www.scottharney.com/2005/06/06/looks-like-someone-had-the-same-idea-for-ssh-blocking/#comments</comments>
		<pubDate>Mon, 06 Jun 2005 18:23:00 +0000</pubDate>
		<dc:creator>scotth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.scottharney.com/htdocs/wordpress/?p=48</guid>
		<description><![CDATA[Denyhosts parses your log files and adds ssh attack automated attack attempts to tcp_wrappers&#8217; /etc/hosts.deny. This is the same concept as this little shell script I cooked up. Of course my little script was derived from another script specific to openbsd and it&#8217;s pf firewall. Denyhosts is pretty much the same idea as mine but [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://denyhosts.sourceforge.net">Denyhosts</a> parses your log files and adds ssh attack automated attack attempts to tcp_wrappers&#8217; /etc/hosts.deny.  This is the same concept as <a href="http://www.scottharney.com/blog/Computers/Security/#ssh_blocker_wrap-sh.html">this</a> little shell script I cooked up. Of course my little script was derived from another script specific to openbsd and it&#8217;s pf firewall.
</p>
<p>Denyhosts is pretty much the same idea as mine but it uses python rather than a shell script.  Python is common enough on most platforms but some non-linux platforms may not have it within installing 3rd party resources.  The attacks on non-vulnerable machines with sshd running are harmless enough, but the extra layer can&#8217;t hurt.  And if a later vuln is discovered, you&#8217;ve already got a list of compromised hosts blocked out via tcp_wrappers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottharney.com/2005/06/06/looks-like-someone-had-the-same-idea-for-ssh-blocking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssh blocker script for TCP Wrappers</title>
		<link>http://www.scottharney.com/2005/01/03/ssh-blocker-script-for-tcp-wrappers/</link>
		<comments>http://www.scottharney.com/2005/01/03/ssh-blocker-script-for-tcp-wrappers/#comments</comments>
		<pubDate>Mon, 03 Jan 2005 22:55:00 +0000</pubDate>
		<dc:creator>scotth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.scottharney.com/htdocs/wordpress/?p=66</guid>
		<description><![CDATA[Since this past summer, compromised machines have been attempting to brute force user accounts via ssh. Mostly this is annoying but it would be nice to detect and block these IPs. Francisco de Borja Lopez Rio made a Python script that watches /var/log/authlog on OpenBSD and adds IPs to a filter table for OpenBSD&#8217;s pf. [...]]]></description>
			<content:encoded><![CDATA[<p>
Since this past summer, compromised machines have been attempting to brute force user accounts via ssh.  Mostly this is annoying but it would be nice to detect and block these IPs.  Francisco de Borja Lopez Rio made a Python script that watches /var/log/authlog on OpenBSD and adds IPs to a filter table for OpenBSD&#8217;s pf.  Script can be found <a href="http://www.e-shell.org/index.py?code=python">here</a>.</p>
<p>
Later Juan J. Martinez used the same concept to create a simple shell <a href="http://blackshell.usebox.net/pub/shell/">script</a> to behave similarly.  While this is nice, some of my own bastion hosts running ssh are not OpenBSD machines and thus cannot run pf.  So I modified Juan&#8217;s script to use Weitse Venema&#8217;s ubiquitous tcp wrappers instead.  The bash shell script also expects GNU variants of cat, echo, awk, etc. but should be easily modifiable to operate on, say, Solaris. You can get it right <a href="http://www.scottharney.com/ssh_blocker_wrap-sh.tar.gz">here</a>.   It would also be relatively easy to edit to use Linux iptables instead.</p>
<p>
Incidently, there may be some other, perhaps better approaches for dealing with this.  One is to only allow key-based authentication instead of simple password authentication.  Another might be to run ssh on a port other than 22.  The first option is probably the most secure and some useful details can be found <a href="http://www.wsrcc.com/wolfgang/sshd-config.txt">here</a>.  Running somewhere other than 22 may be out of the question and automated attack scripts may use port scanning to find running sshd&#8217;s rather than assuming the well-known service port.  </p>
<p>
If you don&#8217;t need to ssh from arbitrary hosts, then you should be blocking that at the firewall level, though you can add it to hosts.deny as well.  Since this is IP based, attackers that can figure out your &#8220;whitelist&#8221; allowed machine IPs could utilize spoofing for a determined attack.  The attacks we&#8217;re blocking here are almost certainly automated and more of a nuisance.  Restricting logins to key-based authentication only should be considered. This script or one of the firewall scripts noted above could then be added as well to block automated nuisance attempts.  For a little extra obscurity, <a href="http://www.linuxjournal.com/article/6811">Port Knocking</a> could be layered into the mix&#8230;.</p>
<p>
Download link: <a href="http://www.scottharney.com/ssh_blocker_wrap-sh.tar.gz">ssh_blocker_wrap-sh.tar.gz</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottharney.com/2005/01/03/ssh-blocker-script-for-tcp-wrappers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

