<?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>Talk Funnel &#187; security</title>
	<atom:link href="http://ramin.firoozye.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://ramin.firoozye.com</link>
	<description>Ramin Firoozye&#039;s Public Whisperings</description>
	<lastBuildDate>Fri, 02 Jul 2010 22:19:33 +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>Leopard firewall and hotspot security</title>
		<link>http://ramin.firoozye.com/2008/01/25/leopard-firewall-and-hotspot-security/</link>
		<comments>http://ramin.firoozye.com/2008/01/25/leopard-firewall-and-hotspot-security/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 05:22:30 +0000</pubDate>
		<dc:creator>ramin</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://ramin.firoozye.com/2008/01/25/leopard-firewall-and-hotspot-security/</guid>
		<description><![CDATA[When I upgraded my MacBook Pro to Leopard last October, one of the first things I checked was whether the built-in firewall was running or not. To my abject horror, I found out that a) it wasn&#8217;t and b) it wasn&#8217;t really doing what I expected it to do, namely, keep incoming port-scanners out. Subsequent [...]]]></description>
			<content:encoded><![CDATA[<p>When I upgraded my MacBook Pro to Leopard last October, one of the first things I checked was whether the built-in firewall was running or not. To my abject horror, I found out that a) it wasn&#8217;t and b) it wasn&#8217;t really doing what I expected it to do, namely, keep incoming port-scanners out. Subsequent in-depth <a href="http://www.heise-security.co.uk/articles/98120" target="_blank">security analyses</a> didn&#8217;t exactly raise my confidence much.</p>
<p>Since I do most of my development work on my laptop and so much of it entails running various types of servers locally, I set out to find something that actually kept snoopers out. A quick <a href="http://seaotter.berkeley.edu/cab/mac-firewalls/" target="_blank">search</a> led me to <a href="http://www.intego.com" title="Intego Software" target="_blank">Intego Software</a> and their <a href="http://www.intego.com/netbarrier/" title="NetBarrier" target="_blank">NetBarrier</a> product (Symantec&#8217;s Norton products don&#8217;t run native on the Intel CPU). There are people out there who don&#8217;t like Intego and their offerings, especially with the &#8216;hidden&#8217; annual subscription fees associated with the software (now this isn&#8217;t unusual in the Windows world, but it&#8217;s something the folks at Intego <span style="font-style: italic;">should</span> mention right upfront.) But I haven&#8217;t had any bad experiences with them. Besides, choices were few and I found a deal for under $60.</p>
<p>To be clear, most people at home connect to the Internet through a router that offers them NAT services which effectively blocks incoming connections. For those situations, a software firewall is overkill. But if like me, you spend a lot of time at public WiFi hotspots like coffee shops or away from known, trusted routers, then you&#8217;ll want to run a firewall to keep the legions of port-scanners out there at-bay. If you think you&#8217;re unlikely to be a victim of port-scanning, think again. Last time I set up a web-server with a static IP directly connected to the net, it took less than 15 minutes from the time the ISP turned on the tap to when the first port-scans came in. By the time I turned the server off a month later, the web-server log-file was chock-a-block full of known exploits and bizarre attempts at trying to break through &#8212; most of them through overseas IP sources and zombies.</p>
<p>But I digress.</p>
<p><span id="more-16"></span></p>
<p>At the 2008 Macworld Conference in San Francisco last week, Intego had a booth and they were talking about their latest X5 version upgrade. It looked interesting, but NetBarrier was full of features I didn&#8217;t personally care about (Cookie management while doing web-service development. No thanks!) When I got home, I ran across <a href="http://www.macworld.com/article/131116/2007/12/firewall.html" target="_blank">this Macworld magazine article</a> that claimed the Leopard 10.5.1 upgrade had fixed a lot of the problems with the built-in firewall. So I set out to do some tests of my own. My primary test was for the situation you are most likely to encounter when you&#8217;re away from the comfort of your home router &#8212; to see if any TCP port on my machine was accessible from the outside.</p>
<p>First of all, to get around the NAT router firewall issue, I tried two types of tests: the first was a live test at a neighborhood coffee-shop running a standard Linksys router with no wireless security enabled. The other was with my Intel MacBook Pro running Leopard 10.5.1 and directly connected to the net via Sprint&#8217;s EVDO network. To do the actual port-scanning, I needed an external service and Steve Gibson&#8217;s excellent <a href="http://www.grc.com" title="Shields UP!" target="_blank">Shields UP!</a> service fit the bill nicely. This service opens each port sequentially and prints out a color-coded chart indicating whether the port is open (<span style="color: #FF051A;">red</span>), it&#8217;s responding but closed (<span style="color: #231BFF;">blue</span>), or it&#8217;s in <span style="font-style: italic;">stealth mode</span> (<span style="color: #36C60A;">green</span>) &#8212; meaning that it won&#8217;t even acknowledge that there is someone at the other end. Ideally, you want to have the output of Shields UP! be a field of green (all stealth). Blue squares are OK too, but certain port-scanners deduce from a reply that there&#8217;s a live machine at the other end and will keep scanning. Red boxes are really bad news, unless you&#8217;re running externally accessible services and have intentionally kept those ports open.</p>
<p>In my case, I didn&#8217;t want ANYTHING open, so I was looking for all greens. As a baseline, I turned off all firewalls and ran Shields UP! against my unprotected machine. Here&#8217;s what I got:</p>
<p>
<img src="http://ramin.firoozye.com/i/firewall-open.jpg" width="576" height="626" alt="" /><br />
Yikes! Most ports were responding as &#8216;closed&#8217; which meant that my my system was waving a red flag, saying <span style="font-style: italic;">I dare you to hit me with your best shot</span>. Here&#8217;s the same scan, this time with Intego&#8217;s NetBarrier X4 firewall enabled, using the preset <span style="font-style: italic;">Client, Local Server</span> setting. (I should also point out that NetBarrier correctly warned me about each and every port scan attempt until I told it to put the GRC server&#8217;s IP address on the trusted list):</p>
<p><img src="http://ramin.firoozye.com/i/withintego.jpg" width="560" height="625" alt="" /><br />
Looks good. Everything stealthy. Now let&#8217;s disable NetBarrier and try it with Leopard 10.5.1&#8242;s built-in firewall. You access the firewall settings from <span style="font-style: italic;">System Preferences</span> -&gt; <span style="font-style: italic;">Security</span> and then by clicking on the <span style="font-style: italic;">Firewall</span> tab. The default is set to <span style="font-style: italic;">Allow all incoming connections</span> (which gives us the mostly blue diagram above). I can understand why Apple chose to take this route. Security is often a balance between convenience and safety. Most users would be using their Macs at home behind a router or at work or school behind a firewall. These people would be protected against port scans by their NAT service (which effectively hides them from the outside world). A relatively smaller percentage visit open WiFi hotspots and of those who do, a very small number will find themselves sitting next to someone directly scanning their machine (the NAT service on the coffee shop&#8217;s wireless router will keep third-party scanners out). The only other population that would be truly at-risk would be those who run open servers with static IP addresses, and hopefully they know enough to go and manually enable their firewall.<br />
So setting the default to <span style="font-style: italic;">Allow all incoming connections</span> allows the significant majority of Mac users to hop onto the network and do their thing without having to muck with firewalls &#8212; which is as it should be. But if you&#8217;ve read this far, you (and I) are in the small majority of people paranoid enough to need better security.<br />
Anyway, this is the default&#8230;</p>
<p><img src="http://ramin.firoozye.com/i/firewallconfig1.jpg" width="493" height="303" alt="" /></p>
<p>So let&#8217;s try the <span style="font-style: italic;">Allow only essential</span> services option and run the port-scan:</p>
<p><img src="http://ramin.firoozye.com/i/firewallconfig-essential.jpg" width="576" height="626" alt="" /><br />
Hmm. Not much different than the <span style="font-style: italic;">Allow all incoming connections</span> version.<br />
Now let&#8217;s try the <span style="font-style: italic;">Set access for specific services and applications</span> option. The problem with this option is that by clicking the &#8216;+&#8217; button, you are presented with the contents of your <span style="font-style: italic;">Applications</span> folder. <span style="font-style: italic;">WTF!</span> What about background services already running or items registered to launch under the <span style="font-style: italic;">launchd</span> daemon? Obviously, if you want that level of control over your system, the simplified System Preference UI isn&#8217;t for you and should graduate to manually tweaking the <a href="http://www.ibiblio.org/macsupport/ipfw/" target="_blank">ipfw configuration</a> settings.</p>
<p>Moving along, we see an <span style="font-style: italic;">Advanced&#8230;</span> button on the bottom right:</p>
<p><img src="http://ramin.firoozye.com/i/firewall-advanced.jpg" width="595" height="319" alt="" /></p>
<p>Which brings up a dialog box to <span style="font-style: italic;">Enable Firewall</span> <span style="font-style: italic;">Logging</span> as well as <span style="font-style: italic;">Stealth Mode</span>. Aha! Let&#8217;s give that one a try.</p>
<p><img src="http://ramin.firoozye.com/i/firewall-advanced2.jpg" width="560" height="247" alt="" /><br />
And give it a go:<br />
<img src="http://ramin.firoozye.com/i/leopardfirewall.jpg" width="570" height="624" alt="" /><br />
Eureka! It&#8217;s all stealthy goodness. That&#8217;s what we want.<br />
<strong>In conclusion:</strong> if you are doing network development work under Leopard or spend a lot of time at public WiFi hotspots and have enabled sharing options on your laptop, you&#8217;d better be running some sort of software firewall. You can go with a commercial one (like NetBarrier) or use Apple&#8217;s built-in firewall, but <span style="font-style: italic;">only</span> if you tweak it so it&#8217;s set to <span style="font-style: italic;">Stealth</span> mode and it disables all incoming connections. If you do decide to go with the Apple firewall, I <span style="font-style: italic;">strongly</span> recommend you also augment it with an outbound scanner like <a href="http://www.obdev.at/products/littlesnitch/index.html" target="_blank">Little Snitch</a> (NetBarrier also provides this functionality) to make sure you know which applications on your machine are &#8216;phoning home.&#8217;<br />
Now a few caveats:</p>
<ul>
<li>We&#8217;re only looking at TCP ports here. I&#8217;m going to try to find an external UDP scanner and I&#8217;ll post the results. The UDP model behaves a little differently than TCP in that a closed UDP port is supposed to return an ICMP <span style="font-style: italic;">port unreachable</span> reply. So by staying quiet, scanners may assume that the port is open (!) and redouble their efforts. Let me repeat that. <span style="font-style: italic;">Staying quiet means your port is active</span>. But then, if you have a firewall and it&#8217;s blocking UDP requests, wouldn&#8217;t it be <span style="font-style: italic;">mistaken for the service being available?</span> The answer is&#8230; Yes. It&#8217;s a little strange and most UDP scanners sheepishly admit to that effect. But for the sake of completeness, it&#8217;s important to look for both kinds of scan, especially for <a href="http://www.cert.org/current/services_ports.html" target="_blank">well-known services</a>.</li>
<li>The GRC test only runs up to port number 1055 which covers the most commonly registered services (other than UPnP which usually runs at 5000). TCP ports technically go all the way up to 65535 but at those higher numbers there&#8217;s no guarantee any service is going to run on a given port number. I also ran all the above tests using GRC&#8217;s <span style="font-style: italic;">Common Ports</span> setting (which included UPnP) and got similar results.</li>
<li>Intego&#8217;s firewall also scans the incoming content for what they call <span style="font-style: italic;">spyware</span>, <span style="font-style: italic;">trojans</span>, and <span style="font-style: italic;">cookies</span>. There&#8217;s a little bit of poetic license being taken here. The most common methods for installing spyware and trojans on a machine is 1) through email or IM attachments, 2) if someone takes advantage of a flaw in your networked client (i.e. browser buffer overflow), or 3) if you download and run an infected application. I can&#8217;t tell from Intego&#8217;s material if they are, in fact, scanning for these vectors. If they are, good for them. But my guess is that what they&#8217;re doing is blocking spyware and trojans from <span style="font-style: italic;">going out</span>, once they&#8217;re installed on your machine. If that&#8217;s the case, you get the same effect by installing Little Snitch and monitoring outbound communications. I&#8217;ll keep digging on this.</li>
<li>Again, I&#8217;m most concerned with access to my machine while I&#8217;m out in the open and away from the comfort of my home firewall. If your use falls under that category you can choose to go with NetBarrier or Leopard firewall in stealth mode.</li>
</ul>
<p>Regardless of the firewall you run, if you spend a lot of time at public WiFi hotspots, you&#8217;ll also want to make sure you&#8217;re running some sort of VPN to keep the fellow with the mysterious smile, nursing a cold coffee, sitting across the room from you and sniffing your packets with <a href="http://kismac.macpirate.ch/" title="KisMac" target="_blank">KisMac</a> or <a href="http://www.netstumbler.com/" title="NetStumbler" target="_blank">NetStumbler</a>. Try running these programs yourself some time. You&#8217;ll be amazed how much critical stuff goes across the wire in the open. If you don&#8217;t have access to a VPN server at work or school, I suggest paying for a publicly accessible one like <a href="http://publicvpn.com/" title="PublicVPN" target="_blank">PublicVPN</a> or <a href="http://www.hotspotvpn.com/" title="HotSpotVPN" target="_blank">HotSpotVPN</a>.</p>
<p>And I&#8217;ll leave it at that.</p>
]]></content:encoded>
			<wfw:commentRss>http://ramin.firoozye.com/2008/01/25/leopard-firewall-and-hotspot-security/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)

Served from: ramin.firoozye.com @ 2010-09-09 09:17:01 -->