Using XSS & Google To Find Physical Location
wiredmikey sends along a brief (and quite poorly written) report from Security Week on Samy Kamkar's talk at Black Hat last week. In the video, which is amusing, he demonstrates how to obtain location information (within 30 feet, in the example he shows) of a user who does no more than visit a malicious website. The technique involves sniffing out the local router, breaking into it to obtain its MAC address, and sending that to Google to extract the router's location from Google's Street View database.
What scares me the most is that to get the location they demonstrate a plausible way to access the settings on your router (if you use the default credentials.) If I was evil (or more evil) I wouldn't care about the location, I would just changed the router's DNS settings and redirect all the traffic through a server of my choice.
sheep.horse - does not contain information on sheep or horses.
Apple Computer Inc
1 Infinite Loop
Cupertino, CA 95014
Inputting my friend's router's MAC address on his site (here) results in a location circle about 3km wide and about 10km away from his house. Close, but not close enough.
So nobody is Anonymous on the Internet? This is know fact since ages, but now with revealing geo-location it us much easier to find people who commit crimes over the Internet. Cyberstalkers, scammers and crooks - watch out, if they can so easily locate you, so can the police. Of course revealing this information now, means the crooks will take precaution actions to hide their traces even more deeply.
Any technology that requires the local router to be easily and mechanically hackable is not a reliable one. The title on this post is thus terribly chosen.
For every problem, there is at least one solution that is simple, neat, and wrong.
Google has been driving around and scanning WiFi networks in order to use it as a location service (Read: cheap GPS). Thus Google now have a cross referenced list of Wireless networks ("mac addresses") with GPS location data on that network's source (based on triangulation).
We've already seen attacks that allow web-sites to break into routers when the default password isn't change, and for example change their DNS servers to servers operated by the attacker. This is an attack that is also assuming the default router password (and address) and retrieving the WiFi mac address, which is then sent back using postback.
You then create a web-site, when someone visits it, it logs into their router, sends the mac address back to the site, which the owner can then search for on Google Maps for that WiFi network giving you a rough location of that person (without about two street blocks).
The fundamental question is: Should Google be snooping and publishing MAC locations at all?
Do I have the right to opt out of their system - albeit at the cost of not automatically getting the shortest rout to my nearest pizza place on my iPad without manually entering my address?
What happens when the first battered wife is tracked down and murdered by her husband at a woman's shelter because her hacker smart husband crafts an exploit?
"Knowing everything doesn't help..."
Ok a standard home router has 2 interfaces, one to the WAN (the ISP) the other to the LAN. Each of these has a unique MAC address.
The WAN is known by the ISP and hopefully is not used in this example as it would mean he has no clue. (Google would not know it I hope as it should only be know if you actually connect). It could be used for location services to some extent, but the wireless angle would be a red herring
The other MAC address is for the LAN. You do not need to crack the router to get it as the local machine must have it. Just do an arp -a at a command prompt.
Unless Java script is blocked from getting this info. (I do not do Java script coding at that level in Windows)
I also thought Google tossed encrypted packet, so only people who did not care would be vulnerable.
I'm not sure what sort of checks google does on the MAC addresses, but in my case not much. For about 12 months depending on where I stood in my house google maps reported my location as either within 30m of my house in Melbourne (Australia) or downtown London England. When I eventually bothered to try and figure out why I realised they'd scanned by SSID when they drove by for streetmap and either it or my wireless MAC address matched the one in England. I am running a version of DDWRT and I think in the flashing process the MAC was changed. Short story is that it looks like it was taking the MAC address/SSID from the strongest signal only and not the surrounding AP's or the cell phone towers nearby. I stumbled across a form where I could register my MAC address (or SSID, I forget which but I think it was the MAC) with google to correct my location and now "oh my god, they've found me" , I'm thinking that was not such a good idea now...
so this is the real reason for WLAN sniffing of Google!