39

I was entering my Google account recently and noticed that not only did it say which browser I was currently using - it also knew the exact name of the computer I was using. How is Google able to fetch these informations?

Google screenshot

I have been browsing the internet for javascript methods that should give me computer name or similar - but I am sure that Javascript is not able to read these data. If for anything, the site should maybe contain a small java application that executes and fetches the data, but that would usually require for me to accept that java is running in the browser by clicking a modal opening box.

Then I thought maybe they executed some C code in the browser - but how do they do it and access data outside the browsers "sandbox"? A third theory I have is that when I installed the Google Chrome browser, it was able to pass along these details - but it didn't make sense neither when I note that it also knows my iPads exact name though I haven't installed any google applications on my ipad at all. (neither google maps, gmail, chrome or anything).

UPDATE 01/25/2016

I have given this some extra thought and seemed to stumble across something else. I went through possible solutions using node.js or Flash to do the same, but I recalled that Google writes everything in Python, which made me think if it was simple enough using Python. I found this post: How can I use Python to get the system hostname? and thought that this might be a way for Google to it. I don't know if this is still achievable when you are writing a website and if this is a browser-based method as well (mind you I am not Python programmer at any level).

Community
  • 1
  • 1
Corfitz.
  • 1,864
  • 3
  • 31
  • 53
  • Google chrome extension? or Google app launcher? – void Jan 10 '16 at 11:33
  • The browser and OS are easy to get from the User Agent string of the browser, but not the computer name. Where exactly did you see this information? – Tasos K. Jan 10 '16 at 11:41
  • I just realized that Google can do this... I am using Firefox, and Google displayed my computer name in Google Account --> security --> Recently used devices. It also showed the device model of my Samsung phone. – Charly Jan 10 '16 at 11:44
  • 1
    http://stackoverflow.com/questions/922476/how-can-i-read-the-clients-machine-computer-name-from-the-browser – Mi-Creativity Jan 10 '16 at 11:44
  • 1
    Java Applets can do this. http://stackoverflow.com/questions/3964595/how-to-find-client-computer-name-in-java-script-jsp – CoderPi Jan 10 '16 at 11:46
  • 1
    @CodeiSir Java Applets are depending on the Java functionality in the browser. Currently most browsers are removing java as a browser functionality - how do they preserve this functionality then? – Corfitz. Jan 10 '16 at 11:54
  • @Dimser I have no Idea, but I hope they won't be able to in the future – CoderPi Jan 10 '16 at 12:01
  • @Charly, I was going to say since Chrome is by Google, then it can send such data to its servers. – Adam Azad Jan 10 '16 at 12:01
  • 8
    I nominate to reopen because I believe this case may be unique from the linked question. Google is not using ActiveX/IE, Java, or reverse DNS to determine my machine name on their "Recently used devices" page. – quietmint Jan 22 '16 at 23:29
  • 4
    What programming language Google uses on their end has no relevance. *Any* general-purpose language on the remote end has the exact same amount of information available; Python doesn't have some mystical power to access extra information. – JJJ Jan 25 '16 at 11:55
  • 1
    On the Mac, between Chrome, Flash, Java and other plug-ins, there's probably more than one way for them to get the info. On the iPad, though, most of those are not possible (Flash, Java, plug-ins...). Are you sure you haven't installed any Google app (check out the list [here](https://itunes.apple.com/us/developer/google-inc./id281956209))? – jcaron Jan 25 '16 at 12:10
  • @jcaron Actually yes - I have installed Youtube app of course.. Kinda forgot that was a Google App - which of course makes sense.. Youtube would also be able to fetch hostname using action script via their flash player in the browser. But it still doesn't explain how they get the "current used device" when I simply log in and access my account data. How can they still know which computer I am using exactly. – Corfitz. Jan 25 '16 at 12:31
  • 1
    On the Mac, the page itself could contain a flash or Java applet to fetch the info. On the iPad, it's a bit more tricky, but is doable if you manage to share an identifier between a native app and Safari cookies. Apple normally doesn't like you doing that, but Google is known for ignoring what Apple wants. – jcaron Jan 25 '16 at 12:36
  • 1
    You are using Chrome so I guess Chrome is able to read that information and *send* it to Google whatever the way. I mean it's easy for Chrome to get this information and given you are using it while browsing Google's services, Google has access to this data through their browser (if that makes sense :P). – PinkTurtle Jan 25 '16 at 13:22
  • @PinkTurtle Yes - it makes sense :) But how about when I am using the iPad Safari? og even Safari on my iMac? How can Google be 100% certain that I am actually using that computer? – Corfitz. Jan 25 '16 at 14:23
  • PinkTurtle is correct, the same way Google Chrome's extension is able to pick up your custom Chromecast name you defined outside of your browser. When choosing devices for casting the names are what you defined while setting it up. This still doesn't answer the question "how?" but it's the right path to look into. Also, a quick search revealed that if you Sign-in into Google Chrome with your gmail account that will have your computer name displayed in the Settings section which seems to be a popular issue for people to change. – dchayka Jan 25 '16 at 23:12
  • @dchayka That seems to be achievable - I can see that. But if I login via Safari, there is nothing that sends the information along unless chrome browsers tampers with all other installed browsers. – Corfitz. Jan 26 '16 at 08:26
  • @Bugfixer that would provide the hostname of the public address, e.g. the name your internet connection is known by, not the computer itself. – Rogier Spieker Jan 27 '16 at 09:11

4 Answers4

17

I did some testing. I have 2 Google accounts, and what I found was that on my main account (which I use with Chrome), Google knows my computer name. On another account, I am logged in with Edge and Firefox, but neither of them show my computer name. It was not until I logged into the Chrome browser ITSELF (not the Google page) as a Chrome user that my second Google account showed the browser I was using.

I verified this on my laptop: I logged in with my second account into the Google website on a new user, which didn't update the computer name on either device in the security settings. Once I logged into the Google Browser with that account, it showed my computer name. So it looks like because you're logged into Google Chrome, Google knows your computer name.

Note that Google using a sandbox does not make any difference for this. It is trivial to find your computer name, all it takes is hostname in a command prompt.

Nzall
  • 3,439
  • 5
  • 29
  • 59
  • 2
    Interesting. How does it identify that, say, Firefox is running on the same machine as Chrome? Is there a shared device identifier that Firefox reports? Or would they be using heuristics (e.g. same browser version, screen resolution, etc.)? – Shimon Rura Feb 10 '16 at 03:31
  • As if Google wasn't spying on us enough with their search engine, Gmail, Youtube, etc.. Now they are also using Chrome to look into our machines as well. That's it. I'm moving to Edge. It's too much data in the hands of one company. – Mercalli Jan 04 '22 at 13:46
-3

the problem here is if there was a way to get dekstop name though headers that means the browser has that info and if it has there will definitely be some way of getting the name from javascript but there is not i support the above answer that the google uses some sync bad habits or it may be that it stores the ip address which btw we can get with headers this might be the case as with tokens and this ip address thing ddos attacks will be quite easier to deal with so this ip address storing might be true but still its just a guess

-7

Because when you connect to Google they install cookie in your compputer for they know your information and for say you are alerady come here its Like ID Installor

Cookie its file (ID) when you connect to site, the site use this file for know if you alerady came here or not and they can get all your infos: IP, Computer Name, Access To WIFI I thing and create special and unique ID on your pc that are why they know your computer name

iBug
  • 35,554
  • 7
  • 89
  • 134
Skiller Dz
  • 897
  • 10
  • 17
  • Please add some explanation to your answer such that others can learn from it. What makes you think that something like the computer name or WIFI data can be added to a cookie? – Nico Haase Jan 05 '22 at 21:31
-10

I don't know you still want to know that or not but anyway, Every requests that browser sends to loading every pages on the web has some headers, and this headers has some information about browser, referral url and etc.. The important one in this case is "User-Agent" header which includes information about browser, OS and few more information.

You could access the browsers User-Agent string using Java Script in client side via:

navigator.userAgent

and even in server side programming languages like PHP and ASP and etc.. .

This is and example User-Agent string of Safari browser on Macintosh Device:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A

Also you can get yourself User-Agent string and all of analysed datas here

Rancbar
  • 184
  • 12