<?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>jathanism &#187; Security</title>
	<atom:link href="http://jathan.com/category/tech/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://jathan.com</link>
	<description>computers, robots, and other cool things.</description>
	<lastBuildDate>Fri, 28 May 2010 21:14:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Proxying SSH with SOCKS (HTTP was so 2007)</title>
		<link>http://jathan.com/2009/07/30/proxying-ssh-with-socks-http-was-so-2007/</link>
		<comments>http://jathan.com/2009/07/30/proxying-ssh-with-socks-http-was-so-2007/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 23:07:18 +0000</pubDate>
		<dc:creator>jathan</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[coconut]]></category>
		<category><![CDATA[fucking]]></category>
		<category><![CDATA[monkey]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[socks]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://jathan.com/?p=39</guid>
		<description><![CDATA[By writing this I am assuming you know what SOCKS is, and you know what SSH is. If you don&#8217;t, here is a picture of a monkey fucking a coconut to make this visit worth your while: So, there comes a time in a man&#8217;s life when people at work on the inside network need [...]]]></description>
			<content:encoded><![CDATA[<p>By writing this I am assuming you know what <a href="http://en.wikipedia.org/wiki/SOCKS" target="_blank">SOCKS</a> is, and you know what <a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">SSH</a> is. If you don&#8217;t, here is a picture of a monkey fucking a coconut to make this visit worth your while:</p>

<div class="wp-caption alignright" style="width: 191px"><img title="MFC? Is that you?" src="http://i14.photobucket.com/albums/a346/Gargamel198024/monkeyfuckingacoconut.gif" alt="Could be a melon, but looks like a co-co-nut." width="181" height="161" /><p class="wp-caption-text">Could be a melon, but looks like a co-co-nut.</p></div>

<p>So, there comes a time in a man&#8217;s life when people at work on the inside network need to access things on the internet.  This is called &#8220;proxying&#8221;.  Yes, yes, I know; very fascinating.  These secure machines on the inside network don&#8217;t have access to the internet by design (See <a href="http://en.wikipedia.org/wiki/Private_network" target="_blank">RFC 1918</a>).  It&#8217;s the most basic layer of obfuscation (a 25 cent word we use a lot in the security world) and protection from bad internet traffic, not including firewalls and all that other exciting stuff.</p>

<p>Ok so we want to let our secure hosts on the inside proxy SSH to the internet via our SOCKS server.</p>

<p><strong>Assumptions:</strong>
<ul>
    <li>A Unix/Linux machine with the latest version of <a href="http://en.wikipedia.org/wiki/Netcat" target="_blank">netcat</a> installed (assumed to be found at <tt>/usr/bin/nc</tt>).  All modern operating systems have this.  Stop whining.</li>
    <li>A SOCKS proxy listening on TCP port 1080.</li>
    <li>A remote internet server listening for SSH connections on TCP port 22.</li>
    <li>You know what <tt>~</tt> means.  (Hint:  It&#8217;s shorthand for your home directory.)</li>
</ul>
<strong>Do the damn thing:</strong></p>

<p>Create an entry in <tt>~/.ssh/config</tt>.  If this file doesn&#8217;t exist, create it.  If it does, add this shit to the bottom:
<pre>Host proxythatshit
    ProxyCommand /usr/bin/nc -X 5 -x proxy.whatever.com:1080 internet.com 22</pre>
Write, quit, and then test that shit!  I am hoping that you gathered &#8220;proxythatshit&#8221; is the nickname we&#8217;re assigning this proxied connection to <em>internet.com</em>.  By putting this stuff in the config file, it makes it easy to reuse.
<pre>% ssh proxythatshit
jathan@proxythatshit's password:
[jathan@internet.com]~%</pre>
Did you see that?  It worked!! OMGZ!!JLk</p>

<p><strong>A little breakdown:</strong></p>

<p><tt>ProxyCommand /usr/bin/nc -X 5 -x proxy.whatever.com:1080 internet.com 22</tt>
<ul>
    <li><strong>ProxyCommand:</strong> An OpenSSH directive that tells SSH how to proxy the connection</li>
    <li><strong>/usr/bin/nc:</strong> The path to the netcat binary and the ProxyCommand in question here.  Proxying is one of the many things netcat does.</li>
    <li><strong>-X 5</strong>: Tells netcat to use SOCKS version 5</li>
    <li><strong>-x proxy.whatever.com:1080</strong>: Tells netcat to proxy the connection using <em>proxy.whatever.com</em> on port 1080</li>
    <li><strong>internet.com 22</strong>: The name and port of the destination we&#8217;re trying to get to by way of the proxy</li>
</ul>
<strong>Why SOCKS?</strong></p>

<p>You may be asking yourself, &#8220;Why not just use an HTTP proxy?&#8221;  Because HTTP proxies tend to be very picky about allowing you to proxy non-HTTP connections to destination ports other than the one you connected to.  In other words, if the proxy is listening on port 8080, good luck proxying a connection that isn&#8217;t HTTP (such as this SSH proxy thing) on anything other than port 80, 443, or 8080 it probably won&#8217;t work. If you&#8217;re using <a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html" target="_blank">mod_proxy</a>, it absolutely will not work.  Don&#8217;t ask me why.  It just doesn&#8217;t.  <a href="http://www.squid-cache.org/" target="_blank">Squid</a> might work, but it is a pain in the ass to setup.</p>

<p>There you have it.  Don&#8217;t blame me if you get fired because you were looking at a picture of a monkey fucking a coconut for the 52 seconds it took to read this.</p>
]]></content:encoded>
			<wfw:commentRss>http://jathan.com/2009/07/30/proxying-ssh-with-socks-http-was-so-2007/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CheckPoint Firewalls Can Suck My Whole Ass</title>
		<link>http://jathan.com/2009/07/29/checkpoint-firewalls-can-suck-my-whole-ass/</link>
		<comments>http://jathan.com/2009/07/29/checkpoint-firewalls-can-suck-my-whole-ass/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 19:57:31 +0000</pubDate>
		<dc:creator>jathan</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[checkpoint]]></category>
		<category><![CDATA[firewalls]]></category>
		<category><![CDATA[fuck]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://jathan.com/?p=30</guid>
		<description><![CDATA[Fuck CheckPoint, and fuck the people who both make them and buy them.  Yes, you!  Assholes!  Seriously?  It&#8217;s fucking 2009 and you&#8217;re still making a firewall product that requires motherfucking WINDOWS to configure?  No command-line interface at all?  The first time I used a CheckPoint firewall in NINETEEN NINETY SEVEN (12 years ago), it had [...]]]></description>
			<content:encoded><![CDATA[<p>Fuck CheckPoint, and fuck the people who both make them and buy them.  Yes, you!  Assholes!  Seriously?  It&#8217;s fucking 2009 and you&#8217;re still making a firewall product that requires motherfucking WINDOWS to configure?  No command-line interface at all?  The first time I used a CheckPoint firewall in NINETEEN NINETY SEVEN (12 years ago), it had the same limitations.  Back then it was passable, but now?  Now it&#8217;s just insulting.</p>

<p>The CheckPoints we have at work are to support 3rd parties and acquisitions.  We would never fucking actively use this bullshit.  NO fucking way.  Everything is color-coded and iconic, so I guess for enterprise donkeys who don&#8217;t know jack shit about security, maybe this is a plus.  But let&#8217;s be totally honest here:  It&#8217;s definitely not helping humanity progress.</p>

<p>MY PACKETS ARE GREEN, THAT MUST MEAN THEY ARE OK!</p>

<p>I am a Mac user, so to configure the CheckPoint firewalls we have at work I have to use Remote Desktop Connection into a Windows terminal server we have SPECIFICALLY for managing these firewalls.  So I TS into this machine, fire up the GUI-only Dashboard client, and then have to struggle thru managing firewall policies thru an archaic interface that literally has not changed in the twelve years since I first used it.</p>

<p>You&#8217;d think that would make me a pro, but no.  It just fucking pisses me off.  I can&#8217;t automate the shit, I can&#8217;t even dump the configuration files in a plain-text format.  No, that would be too motherfucking convenient.  No, no, no.  They&#8217;re stored in a proprietary binary format.  The absolute worst part is that everything has to be hand-entered line-by-line.  Click OK.  Are you sure?  Are you sure you&#8217;re sure?  YES DAMMIT JUST ADD THE FUCKING POLICY!</p>

<p>OH MY GOD I THINK I JUST MURDERED SOMEONE.</p>

<p>So if you&#8217;ve ever bought a CheckPoint firewall.  FUCK YOU.</p>

<p>If you make the CheckPoint firewalls.  FUCK YOU TOO.</p>

<p>FUCK FUCK FUCK FUCK FUCK</p>

<p>Gonna go smash my skull against the wall until the pain stops&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://jathan.com/2009/07/29/checkpoint-firewalls-can-suck-my-whole-ass/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating read-only user accounts on ScreenOS</title>
		<link>http://jathan.com/2009/07/23/creating-read-only-user-accounts-on-screenos/</link>
		<comments>http://jathan.com/2009/07/23/creating-read-only-user-accounts-on-screenos/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 17:06:24 +0000</pubDate>
		<dc:creator>jathan</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[firewalls]]></category>
		<category><![CDATA[netscreen]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://jathan.com/?p=3</guid>
		<description><![CDATA[Need to create a read-only account on a NetScreen (ScreenOS 6.x or lower) firewall? It&#8217;s simple: netscreen(M)-&#62; set admin user nocadmin password abc123 privilege read-only And there you have it. Now let&#8217;s test it: % ssh nocadmin@netscreen nocadmin@netscreen's password: For Authorized Use Only, Violators Will Be Prosecuted. netscreen(M)-&#62; It works! Notice the limited command set [...]]]></description>
			<content:encoded><![CDATA[<p>Need to create a read-only account on a NetScreen (ScreenOS 6.x or lower) firewall?</p>

<p>It&#8217;s simple:
<pre>netscreen(M)-&gt; set admin user nocadmin password abc123 privilege read-only</pre>
And there you have it.  Now let&#8217;s test it:
<pre>% ssh nocadmin@netscreen
nocadmin@netscreen's password:
For Authorized Use Only, Violators Will Be Prosecuted.
netscreen(M)-&gt;</pre>
It works!  Notice the limited command set available:
<pre>netscreen(M)-&gt; ?
exit                 exit command console
get                  get system information
mtrace               multicast traceroute from source to destination
ping                 ping other host
trace-route          trace route
netscreen(M)-&gt;</pre>
Now hop to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://jathan.com/2009/07/23/creating-read-only-user-accounts-on-screenos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
