<?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>Neohaxor.org &#187; motorola</title>
	<atom:link href="http://www.neohaxor.org/tag/motorola/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.neohaxor.org</link>
	<description>InfoSec / Critical Thinking / Misc Crap</description>
	<lastBuildDate>Wed, 18 Aug 2010 17:12:47 +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>CSRF Vulns on Local Network Devices</title>
		<link>http://www.neohaxor.org/2008/12/01/csrf-vulns-on-local-network-devices/</link>
		<comments>http://www.neohaxor.org/2008/12/01/csrf-vulns-on-local-network-devices/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 20:47:00 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Vulnerabilities]]></category>
		<category><![CDATA[CSRF]]></category>
		<category><![CDATA[dsl router]]></category>
		<category><![CDATA[local net]]></category>
		<category><![CDATA[motorola]]></category>
		<category><![CDATA[motorola 2000]]></category>
		<category><![CDATA[motorola 2200]]></category>
		<category><![CDATA[motorola 2210]]></category>
		<category><![CDATA[netopia]]></category>
		<category><![CDATA[netopia 2000]]></category>
		<category><![CDATA[netopia 2200]]></category>
		<category><![CDATA[netopia 2210]]></category>
		<category><![CDATA[remote admin]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=52</guid>
		<description><![CDATA[As you probably know, Cross-Site Request Forgery (CSRF) can be a devastating vulnerability. Much of the focus has been on how this can affect your online accounts. CSRF can be used to exploit the trust of an authenticated connection you have to a web application. As an example, Shawn Moyer and I demonstrated several of [...]]]></description>
			<content:encoded><![CDATA[<div><img src="http://farm4.static.flickr.com/3046/3069562260_0c424658f7_o.png" alt="Motorola / Netopia" /></div>
<p>As you probably know, Cross-Site Request Forgery (CSRF) can be a devastating vulnerability. Much of the focus has been on how this can affect your online accounts. CSRF can be used to exploit the trust of an authenticated connection you have to a web application. As an example, Shawn Moyer and I demonstrated several of these on Social Networks for our <a href="http://www.blackhat.com">Black Hat 2008</a> / <a href="http://www.defcon.org">Defcon 16</a> talk. Slides from our talk can be downloaded <a href="http://www.hexsec.com/docs/Satan_Blackhat_Defcon.pdf">here</a>. I mean, the vulnerability itself was originally reported in 1988 so it is an old issue. Many people don&#8217;t realize that you can use CSRF to attack local network devices even services on the Localhost. For more information on localhost web services and CSRF check out an Rob Carter&#8217;s example for uTorrent <a href="http://r00tin.blogspot.com/2008/04/utorrent-pwn3d.html">here</a>. Any network device on your local network that runs a web server can be vulnerable to the same attack as the Motorola / Netopia device I am about to discuss.</p>
<p>Recently, while getting ready for a web cast I am doing called: Cross-Site Request Forgery and Beyond, I was messing around with a Motorola / Netopia 2210 DSL modem. AT&amp;T started issuing these modems in <a href="http://www.dslreports.com/shownews/ATT-DSL-Customers-Getting-New-Modems-88088"> 2007</a>. While looking at this device I noticed it was particularly vulnerable to a devastating attack. This demonstrates a perfect example of attacking local network devices though CSRF. This vulnerability isn&#8217;t just isolated to the Motorola / Netopia DSL modems, but most of them out there. By default most DSL modems, don&#8217;t require authentication to access the configuration menu. This is because of a mistaken assumption that only trusted devices would be on the local network. This is a mistake, because the user and their browser are on the local network, and they can&#8217;t always be trusted. People access so much content on the web, they never seem to know where their browser is sending requests.</p>
<h3>Motorola / Netopia 2210 DSL modem Vulnerability</h3>
<p>The reason this makes a perfect example is because it exploits an assumed trust relationship, allows request transformations, and complete ownage. When a user on the local network browses to the following URL they are greeted with the DSL configuration homepage. This is with no authentication by default. http://192.168.1.254</p>
<p><img src="http://farm4.static.flickr.com/3212/3075229114_932e335bda.jpg" alt="" /></p>
<p>If you notice on the right hand side there is a menu option that says <strong>Remote Access</strong>. When you click on this option it takes you to the following screen.</p>
<p><img src="http://farm4.static.flickr.com/3179/3075229004_1b8af94c82.jpg" alt="" /></p>
<p>As you can see remote admin is disabled by default. There is, however, a default username, empty password, and a couple of other options including Enable Permanent Remote Management. When you click the <strong>enable</strong> button a POST is sent to the device. This POST looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">POST /Forms/remoteRES_1 HTTP/<span style="color: #ff4500;">1.0</span>
Host: 192.168.1.254
&nbsp;
NSS_RemotePassword=blehblah<span style="color: #66cc66;">&amp;</span>amp<span style="color: #66cc66;">;</span>NSS_EnableWANAdminAccessRES=on<span style="color: #66cc66;">&amp;</span>timeoutDisable=<span style="color: #ff4500;">0</span><span style="color: #66cc66;">&amp;</span>Enable=Enable</pre></div></div>

<p>This POST will enable remote admin on the DSL modem, set the password to blehblah, and enable permanent remote access. Now, this is bad because this is done with no authentication. So if someone were to stage an auto-submitting JavaScript form, they would be able to submit values for this and enable their own password. So, let&#8217;s make matters a little worse. It appears that the DSL modem allows you to transform requests and still accept values. So, you can transform the previous POST request to a GET and get the same results. This means just getting the user to send a request to the following URL causes a compromise:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">http://192.168.1.254/Forms/remoteRES_1<span style="color: #66cc66;">?</span>NSS_RemotePassword=blehblah<span style="color: #66cc66;">&amp;</span>NSS_EnableWANAdminAccessRES=on<span style="color: #66cc66;">&amp;</span>timeoutDisable=<span style="color: #ff4500;">0</span><span style="color: #66cc66;">&amp;</span>Enable=Enable</pre></div></div>

<p>As you can see this is bad. Just getting a user to forge a request to that URL gets them to enable remote admin and set a password of an attacker&#8217;s choice. Ouch! This can be done a few different ways, but the most simple is an HTML img tag that is 1 x 1 px. So, the little red X doesn&#8217;t show when no image is retrieved.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>img src=<span style="color: #483d8b;">&quot;http://192.168.1.254/Forms/remoteRES_1?NSS_RemotePassword=blehblah&amp;NSS_EnableWANAdminAccessRES=on&amp;timeoutDisable=0&amp;Enable=Enable&quot;</span> alt=<span style="color: #483d8b;">&quot;&quot;</span> width=<span style="color: #483d8b;">&quot;1&quot;</span> height=<span style="color: #483d8b;">&quot;1&quot;</span> /<span style="color: #66cc66;">&gt;</span></pre></div></div>

<p>If anyone with this DSL modem visits a page with this image tag on it, they will have remote admin set and a password of an attacker&#8217;s choice set. An attacker doesn&#8217;t have to just do this. They can pretty much control other options from the DSL modem as well through other submissions to the DSL modem. I mean, this stuff is incredibly simple and nothing complicated is required to exploit these types of issues.</p>
<h3>Vulnerability Impacts</h3>
<p>Remember that attacker has remote admin on your routing device. So, even if you have a network inside with private IP addresses, the attacker has access to your logs. It is trivial at that point to identify internal IP addresses and configure pass-through to these machines so they can attack them directly. Basically the machines on your local network can be compromised.</p>
<p>The attacker already has pieces of static information, that is the username: admin and the port number: 2420. A simple sweep for that port number could reveal results from compromise. Also, the attacker can have two img tags on a page, one that sets the remote admin and the other that just allows them to log the IP address of people visiting the content. This would help narrow down potential victims.</p>
<p>People have the ability to place their own content in many different popular locations. One of the biggest is of course Social Networks. For example, this vulnerability means that your DSL modem could be compromised just by visiting <a href="http://www.myspace.com">MySpace</a>. That&#8217;s pretty scary. Just one more instance of how a social network can be turned in to an attack platform. I think I heard some people were talking about that not to long ago <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>This attack only took one request, just one HTTP GET. This attack could have been made a bit more difficult by not allowing requests to be sent in the form of an HTTP GET request. Not quite sure why this is, but it is a good bet that Motorola is not aware their little web server allows this. That is just a guess of course.</p>
<h3>Mitigation</h3>
<p>Um, just like you learned (or didn&#8217;t learn) with your Linksys wireless devices, change your defaults. CSRF vulnerabilities are exploited based off static, known data. Setting a password on your DSL modem and changing the default IP address of the device is a good start. While your at it why don&#8217;t you choose a strong password. I wouldn&#8217;t set remote admin in your DSL modem ever. Did you see what happened when you enabled remote admin? No cryptographic protections for your credentials, over the web, to your routing device. If you want to get fancy, configure yourself a Linux firewall and just let your DSL do IP passthrough to that device and do your configurations on that.</p>
<p>Don&#8217;t keep learning these lessons. Anything on your local network or localhost that has default settings, passwords, predictable locations, etc change them. This way, when future vulnerabilities arise, you will be better protected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2008/12/01/csrf-vulns-on-local-network-devices/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
