top | item 8749917

How does Starbucks knows how to grab my MAC Address?

1 points| larrywallace | 11 years ago

To all hacker out there, how in the world can a website grab your mac address from the browser http://oi61.tinypic.com/s263ib.jpg. I've heard responses from "it is not possible" to "they use flash". But this happens every time I go to Starbucks and I am pretty sure Flash is not used.

I'm posting on HN to get the low down if anyone who has ACTUALLY first hand know how on how this is accomplished.

9 comments

order

dalke|11 years ago

That web site for me says "Looks like you might be outside a Starbucks store / Our local store web site is only available when you’re connected to Wi-Fi at most U.S. Starbucks stores."

If you are on their network then they can see your MAC address. That's how Ethernet works.

See http://en.wikipedia.org/wiki/MAC_address#Spying for an example of how Apple has changed iOS so it uses a random MAC address. See also http://security.stackexchange.com/questions/6868/randomizing... .

larrywallace|11 years ago

Yes, I am connected to the store's wifi. Once I am on their network, how do they actually grab it? What headers names do they inspect for, etc. I'd like to actually know the implementation details and code sample. I looked everywhere on Stackeroverflow and can't find anyone who has done this.

greenyoda|11 years ago

How do you know they're getting it from your browser? They could have just stored your MAC address somewhere when you connected to their wireless router. For example, they might have a custom DHCP server that stores your MAC address along with the IP address it assigns to you in some database that's accessible to the web server. The web server can then look up your IP address in the database and obtain your MAC address.

0x0|11 years ago

The wifi router knows your mac and probably intercepts a HTTP request (like a "captive portal"), which probably redirects you to that URL while including the MAC address

larrywallace|11 years ago

Yes, I am connected to the store's wifi. Can you point me to some code that actually can grab the mac address? As the title suggests -- I want to know how they do it.