<?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>SourceSec Security Research &#187; Hardware</title>
	<atom:link href="http://www.sourcesec.com/category/hardware/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sourcesec.com</link>
	<description>Security research and vulnerability assesment</description>
	<lastBuildDate>Tue, 19 Jan 2010 05:15:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building WPA Hardware Backdoors</title>
		<link>http://www.sourcesec.com/2009/05/11/building-wpa-hardware-backdoors/</link>
		<comments>http://www.sourcesec.com/2009/05/11/building-wpa-hardware-backdoors/#comments</comments>
		<pubDate>Mon, 11 May 2009 16:21:34 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://www.sourcesec.com/?p=110</guid>
		<description><![CDATA[It used to be that building a hardware back door into a router was a difficult, resource-intensive task that only the most skilled hardware hacker would dare to undertake, but thanks to a new feature prevalent to nearly all new SOHO routers, just about anyone can build such a back door.
This new feature is called [...]]]></description>
			<content:encoded><![CDATA[<p>It used to be that building a hardware back door into a router was a difficult, resource-intensive task that only the most skilled hardware hacker would dare to undertake, but thanks to a new feature prevalent to nearly all new SOHO routers, just about anyone can build such a back door.</p>
<p>This new feature is called WiFi-Protected Setup. WPS is a standard designed to ease the distribution of strong WPA/WPA2 encryption keys. Anyone who has tried to enter a 60-character WPA key into a Wii will immediately appreciate WPS; when you want to add a new client to your wireless network, you simply push a button on the router, push a button on the client (clients typically have &#8220;soft&#8221; buttons), and the two will negotiate an 802.11 EAP session which the router uses to securely send the network encryption key to the client.</p>
<p>Unfortunately, along with this ease-of-use, WPS brings a whole new threat into SOHO router networks: physical attacks. Physical tampering with a router used to mean some malicious person bringing in a laptop, plugging it into the router, and trying to brute force the router login. But now, an attacker can install a simple hardware back door which activates WPS at a specified interval. In fact, in some cases this can be done with nothing more than a stick of gum.</p>
<p style="text-align: center;">
<p><span id="more-110"></span></p>
<p style="text-align: center;">
<p>The attack is very simple; you just have to create a circuit that &#8220;pushes&#8221; the WPS button on the router. With some routers, such as Linksys, you can simply short out the pins on the WPS button, causing WPS to remain permanently on. This can be done very easily using the foil wrapper from a stick of gum:</p>
<p style="text-align: center;">
<div id="attachment_114" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.sourcesec.com/wp-content/uploads/2009/05/linksys_hw6.jpg"><img class="size-medium wp-image-114" title="Foil Placement" src="http://www.sourcesec.com/wp-content/uploads/2009/05/linksys_hw6-300x225.jpg" alt="Place the foil in the Linksys' case" width="300" height="225" /></a><p class="wp-caption-text">Place the foil in the Linksys&#39; case</p></div>
<div id="attachment_115" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.sourcesec.com/wp-content/uploads/2009/05/linksys_hw7.jpg"><img class="size-medium wp-image-115" title="Foil shorts the WPS button pins" src="http://www.sourcesec.com/wp-content/uploads/2009/05/linksys_hw7-300x68.jpg" alt="When the board is placed back in the case, the foil shorts the pins on the WPS button" width="300" height="68" /></a><p class="wp-caption-text">When the board is placed back in the case, the foil shorts the pins on the WPS button</p></div>
<div id="attachment_116" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.sourcesec.com/wp-content/uploads/2009/05/linksys_hw9.jpg"><img class="size-medium wp-image-116" title="linksys_hw9" src="http://www.sourcesec.com/wp-content/uploads/2009/05/linksys_hw9-300x225.jpg" alt="Use the remaining foil to cover up the WPS light" width="300" height="225" /></a><p class="wp-caption-text">Use the remaining foil to cover up the WPS LED</p></div>
<p>Note that since WPS will always be activated, the WPS LED will be constantly blinking, so it&#8217;s probably a good idea to cover up the LED as shown in the above picture.</p>
<p style="text-align: center;">
<p>Although a simple hack, using gum to back door a router is not the best solution. In the routers tested, the gum hack only worked on our Linksys router; the rest require us to push, hold, and release the WPS button before they would activate WPS. Even in the Linksys device, this is a non-stealthy hack, as the administrative interface will (rather obnoxiously) indicate that WPS is activated whenever an administrator logs in to view the wireless settings.</p>
<p>A far better solution can be found by using a simple NE555 timer circuit. The push buttons are typically configured with one contact connected to ground, and the other contact connected to something else that reads the button&#8217;s state. Using an NE555, we can connect the non-ground pin on the button to ground for a second or two, and then return the pin to it&#8217;s open state. The following circuit will push the WPS button for 1.5 seconds every 2.5 minutes:</p>
<div id="attachment_119" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.sourcesec.com/wp-content/uploads/2009/05/ne555_schematic.jpg"><img class="size-medium wp-image-119" title="ne555_schematic" src="http://www.sourcesec.com/wp-content/uploads/2009/05/ne555_schematic-300x184.jpg" alt="NE555 Schematic Diagram" width="300" height="184" /></a><p class="wp-caption-text">NE555 Schematic Diagram</p></div>
<p>Vcc and ground are connected to the router&#8217;s DC power supply. Since the 555 can be powered from a wide range of voltage sources (4.5v &#8211; 16v), no voltage regulator should be required (routers typically run off of 5 &#8211; 12 volt DC power adapters). Conn1 is connected to the non-grounded pin on the WPS button.</p>
<p>The output (pin 3) stays high for 2.5 minutes and goes low (i.e., is grounded) for 1.5 seconds. D1 ensures that there is no charge flowing into pin 3 (probably not likely, but we don&#8217;t know exactly what the WPS button is connected to). When pin 3 goes low, it effectively grounds the button connected to Conn1; resistor R3 limits any current flowing through D1 during this period. The circuit can be modified to stay high for much longer periods of time by increasing the value of the R1 resistor.</p>
<p>Although the NE555 is not very precise when used to time long periods, precision is not really a concern in this application, so activating WPS once every 10-12 hours is possible. This has the added benefit of making such a back door more difficult to detect; WPS has a two minute time out period (if no client is found within two minutes, the router stops looking for a client until the button is pushed again), so the light will only be blinking for two two-minute intervals throughout a 24 hour period.</p>
<p style="text-align: center;">
<p>Below are pictures of the above circuit connected to several routers from various vendors. Since the WPS button works the same way on basically all routers, this circuit is a universal hardware back door for practically any router that has WPS support:</p>
<div id="attachment_123" class="wp-caption aligncenter" style="width: 234px"><a href="http://www.sourcesec.com/wp-content/uploads/2009/05/ne555.jpg"><img class="size-medium wp-image-123" title="NE555 Linksys" src="http://www.sourcesec.com/wp-content/uploads/2009/05/ne555-224x300.jpg" alt="The circuit connected to a Linksys WRT160N" width="224" height="300" /></a><p class="wp-caption-text">The circuit connected to a Linksys WRT160N</p></div>
<div id="attachment_124" class="wp-caption aligncenter" style="width: 235px"><a href="http://www.sourcesec.com/wp-content/uploads/2009/05/ne555_dlink.jpg"><img class="size-medium wp-image-124" title="NE555 D-Link" src="http://www.sourcesec.com/wp-content/uploads/2009/05/ne555_dlink-225x300.jpg" alt="The circuit connected to a D-Link DIR-628" width="225" height="300" /></a><p class="wp-caption-text">The circuit connected to a D-Link DIR-628</p></div>
<div id="attachment_125" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.sourcesec.com/wp-content/uploads/2009/05/belkin_555_1.jpg"><img class="size-medium wp-image-125" title="NE555 Belkin" src="http://www.sourcesec.com/wp-content/uploads/2009/05/belkin_555_1-300x225.jpg" alt="The circuit soldered up and placed inside a Belkin router" width="300" height="225" /></a><p class="wp-caption-text">The circuit soldered up and placed inside a Belkin F5D8233-4v3</p></div>
<p>Now, you just wait for WPS to be activated (WPS state can be passively monitored real-time using our <a href="http://www.sourcesec.com/2009/05/09/wpscan-wpspy-tools/">WPSpy tool</a>) and use a WPS-capable <a href="http://www.belkin.com/au/IWCatProductPage.process?Product_Id=474682">WiFi card</a> (or <a href="http://hostap.epitest.fi/wpa_supplicant/">software</a>) to retrieve the key:</p>
<div id="attachment_127" class="wp-caption aligncenter" style="width: 303px"><a href="http://www.sourcesec.com/wp-content/uploads/2009/05/linksys_key.jpg"><img class="size-medium wp-image-127" title="Linksys WPA Key" src="http://www.sourcesec.com/wp-content/uploads/2009/05/linksys_key-293x300.jpg" alt="Using a Belkin WiFi card to retrieve the WPA key via WPS" width="293" height="300" /></a><p class="wp-caption-text">Using a Belkin WiFi card to retrieve the WPA key via WPS</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sourcesec.com/2009/05/11/building-wpa-hardware-backdoors/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
