<?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>Nicola Moretti - Hanicker IT Blog &#187; hacking</title>
	<atom:link href="http://blog.nicolamoretti.com/tag/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nicolamoretti.com</link>
	<description>Tecnologia e Digital Hacks</description>
	<lastBuildDate>Thu, 12 Aug 2010 22:51:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Google Wifi DB</title>
		<link>http://blog.nicolamoretti.com/2010/01/google-wifi-db/</link>
		<comments>http://blog.nicolamoretti.com/2010/01/google-wifi-db/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 15:31:38 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Sicurezza]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[eng]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://blog.nicolamoretti.com/?p=137</guid>
		<description><![CDATA[<br/>Try compiling this form with a wifi MAC Address and press Enter (iframe): The source code is: #!/usr/bin/python # Copyright (C) 2010 Kees Cook # License: GPLv3 # Find location of a MAC address via Google Location Services # http://code.google.com/p/gears/wiki/GeolocationAPI import cgi import sys, urllib2 import simplejson import pprint form = cgi.FieldStorage() if not form: [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Try compiling this form with a wifi MAC Address and press Enter (iframe):</p>
<p><iframe src="http://outflux.net/geoloc/" width="500"></iframe></p>
<p>The source code is:</p>
<pre name="code" class="py">
#!/usr/bin/python
# Copyright (C) 2010 Kees Cook <kees@outflux.net>
# License: GPLv3
# Find location of a MAC address via Google Location Services
# http://code.google.com/p/gears/wiki/GeolocationAPI
import cgi
import sys, urllib2
import simplejson
import pprint

form = cgi.FieldStorage()
if not form:
    print "Content-type: text/html"
    print ""
    print "<html><head></head><body>"
    print "Enter MAC address to locate:
<form>
<input type=text name=mac length=20></form>

"
    print '<a href="index.txt">source</a>'
    print "</body></html>"
    sys.exit(0)

#try:
if True:
    loc_req = { 'version': '1.1.0',
                'request_address': True,
                'address_language': 'en',
                'wifi_towers': [] }
    bssid = form['mac'].value
    loc_req['wifi_towers'] += [{ 'mac_address': bssid.replace(':','-'),
                                 'signal_strength': 1 } ]

    data = simplejson.JSONEncoder().encode(loc_req)

    output = urllib2.urlopen('https://www.google.com/loc/json', data).read()
    output = simplejson.loads(output)

    print "Content-type: text/plain"
    print ""
    pprint.pprint(output)
    if output['location']['accuracy'] >= 22000:
        print "# N.B. Accuracy of 22000 or higher seems to indicate unknown location..."
else:
    print "Content-type: text/html"
    print ""
    print "<html><head></head><body>"
    print "Sorry, something went wrong"
    print "</body></html>"
</pre>
<p>Think at the possibility for somebody to bruteforce Google DB and retrieve these infos.</p>
<p>Starting from <a href="http://standards.ieee.org/regauth/oui/oui.txt" >http://standards.ieee.org/regauth/oui/oui.txt</a>, for example, i can try 16^6 mac addresses starting from 00-18-84 to get info about FON hotspots and achieve locations in a day or less.</p>
<p>I think this is not illegal as this is what my GPhone actually does. PS: I have not checked against any bruteforce prevention.</p>
<p>Thanks to Kees Cook.</p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Facebook" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Delicious" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Twitter" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Google Reader" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Orkut" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a> <a href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/myspace?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="MySpace" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/myspace.png" width="16" height="16" alt="MySpace"/></a> <a href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Slashdot" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a> <a href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a> <a href="http://www.addtoany.com/add_to/yahoo_bookmarks?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Yahoo Bookmarks" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a href="http://www.addtoany.com/add_to/blogger_post?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Blogger Post" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/blogger.png" width="16" height="16" alt="Blogger Post"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Netlog" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Tumblr" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a> <a href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="Digg" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fblog.nicolamoretti.com%2F2010%2F01%2Fgoogle-wifi-db%2F&amp;linkname=Google%20Wifi%20DB" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.nicolamoretti.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.nicolamoretti.com/2010/01/google-wifi-db/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
