views:

4651

answers:

16

I need to figure out a way uniquely identify each computer which visits the web site I am creating. Does anybody have any advice on how to achieve this?

Because i want the solution to work on all machines and all browsers (within reason) I am trying to create a solution using javascript.

I appreciate the help. Thanks.

+1  A: 

I think cookies might be what you are looking for; this is how most websites uniquely identify visitors.

Steve
+17  A: 

It's not possible to identify the computers accessing a web site without the cooperation of their owners. If they let you, however, you can store a cookie to identify the machine when it visits your site again. The key is, the visitor is in control; they can remove the cookie and appear as a new visitor any time they wish.

erickson
If he visits your site with 3 different browsers, then he will have 3 different cookies since cookies are not shared among apps. Further, if he uses DHCP rather than a static IP address, he probably will not have the same IP address for his computer for long.
JohnnySoftware
A: 

Do you require a solution which is robust against attempts by users to spoof?

Thomas L Holaday
Yes, I need a solution which is very difficult for a user to spoof.
thatisvaliant
A: 

Cookies won't be useful for determining unique visitors. A user could clear cookies and refresh the site - he then is classed as a new user again.

I think that the best way to go about doing this is to implement a server side solution (as you will need somewhere to store your data). Depending on the complexity of your needs for such data, you will need to determine what is classed as a unique visit. A sensible method would be to allow an IP address to return the following day and be given a unique visit. Several visits from one IP address in one day shouldn't be counted as uniques.

Using PHP, for example, it is trivial to get the IP address of a visitor, and store it in a text file (or a sql database).

A server side solution will work on all machines, because you are going to track the user when he first loads up your site. Don't use javascript, as that is meant for client side scripting, plus the user may have disabled it in any case.

Hope that helps.

different
This would work if everybody had a different IP address.
Joe Lencioni
My wife and I browse from four different computers behind a NAT firewall at home. We show up as having the same IP, so by your scheme we show up as the same user.
Adam N
+4  A: 

As with the previous solutions cookies are a good method, be aware that they identify browsers though. If I visited a website in Firefox and then in Internet Explorer cookies would be stored for both attempts seperately. Some users also disable cookies (but more people disable JavaScript).

Another method to consider would be I.P. and hostname identification (be aware these can vary for dial-up/non-static IP users, AOL also uses blanket IPs). However since this only identifies networks this might not work as well as cookies.

Ross
Good point with IP address identifying point of access to network - with NAT, there could be entire *countries* hidden behind a single IP address and you'd be none the wiser. With the IPv4 address shortage, you'll still see pretty large companies or schools/universities sharing a single IP address for its outbound Internet traffic.
Piskvor
+9  A: 

A possibility is using flash cookies:

  • Ubiquitous availability (95 percent of visitors will probably have flash)
  • You can store more data per cookie (up to 100 KB)
  • Shared across browsers, so more likely to uniquely identify a machine
  • Clearing the browser cookies does not remove the flash cookies.

You'll need to build a small (hidden) flash movie to read and write them.

Whatever route you pick, make sure your users opt IN to being tracked, otherwise you're invading their privacy and become one of the bad guys.

Joeri Sebrechts
Many user use Flashblock. Flash will activated from the user with a click if he want see it.
Horcrux7
There are methods to remove the cookies, but they are beyond the average user. There are pages on Adobe's website for viewing and removing LSO's (Local Shared Object http://en.wikipedia.org/wiki/Local_Shared_Object) although for Firefox users the Objection add-on is the easiest method to remove them
Sam Hasler
I think this is one of the best solutions. Youtube, Google etc. use LSOs to fight abuse.
Uku Loskit
A: 

Because i want the solution to work on all machines and all browsers (within reason) I am trying to create a solution using javascript.

Isn't that a really good reason not to use javascript?

As others have said - cookies are probably your best option - just be aware of the limitations.

Draemon
A: 

Cookies will not do.

I need the ability to basically create a guid which is unique to a computer and repeatable, assuming no hardware changes have happened to the computer. Directions i am thinking of are getting the MAC of the network card and other information of this nature which will id the machine visiting the web site.

thatisvaliant
You can't get the mac of their network card - IP doens't contain that information, the best you can get is the IP address of their ISP gateway. For some ISPs that could be the same for all users in a given city.
Martin Beckett
You really should include this info in your original question and the fact you do not want the user to be able to spoof it. The answer is of course this can't be done without some priviledged component of yours installed on the users machine.
AnthonyWJones
MAC addresses are trivially easy to spoof. My crummy little wireless connection will pass through your MAC, substitute its own, or use the one you specify.
Kent Brewster
This can't be done - cookies are your best bet
Draemon
A: 

Assuming you don't want the user to be in control, you can't. The web doesn't work like that, the best you can hope for is some heuristics.

If it is an option to force your visitor to install some software and use TCPA you may be able to pull something off.

John Nilsson
+1  A: 

Really, what you want to do cannot be done because the protocols do not allow for this. If static IPs were universally used then you might be able to do it. They are not, so you cannot.

If you really want to identify people, have them log in.

Since they will probably be moving around to different pages on your web site, you need a way to keep track of them as they move about.

So long as they are logged in, and you are tracking their session within your site via cookies/link-parameters/beacons/whatever, you can be pretty sure that they are using the same computer during that time.

Ultimately, it is incorrect to say this tells you which computer they are using if your users are not using your own local network and do not have static IP addresses.

If what you want to do is being done with the cooperation of the users and there is only one user per cookie and they use a single web browser, just use a cookie.

JohnnySoftware
+1  A: 

There is only a small amount of information that you can get via an HTTP connection.

  1. IP - But as others have said, this is not fixed for many, if not most Internet users due to their ISP's dynamic allocation policies.

  2. Useragent String - Nearly all browsers send what kind of browser they are with every request. However, this can be set by the user in many browsers today.

  3. Collection of request fields - There are other fields sent with each request, such as supported encodings, etc. These, if used in the aggregate can help to ID a user's machine, but again are browser dependent and can be changed.

  4. Cookies - Setting a cookie is another way to identify a machine, or more specifically a browser on a machine, but as others have said, these can be deleted, or turned off by the users, and are only applicable on a browser, not a machine.

So, the correct response is that you cannot achieve what you would live via the HTTP over IP protocols alone. However, using a combination of cookies, as well as IP, and the fields in the HTTP request, you have a good chance at guessing, sort of, what machine it is. Users tend to use only one browser, and often from one machine, so this may be fairly relieable, but this will vary depending on the audience...techies are more likely to mess with this stuff, and use more machines/browsers. Additionally, this could even be coupled with some attempt to geo-locate the IP, and use that data as well. But in any case, there is no solution that will be correct all of the time.

cdeszaq
A: 

I guess the verdict is i cannot programmatically uniquely identify a computer which is visiting my web site.

I have the following question. When i use a machine which has never visited my online banking web site i get asked for additional authentification. then, if i go back a second time to the online banking site i dont get asked the additional authentification. reading the answers to my question i decided it must be a cookie involved. therefore, i deleted all cookies in IE and relogged onto my online banking site fully expecting to be asked the authentification questions again. to my surprise i was not asked. doesnt this lead one to believe the bank is doing some kind of pc tagging which doesnt involve cookies?

further, after much googling today i found the following company who claims to sell a solution which does uniquely identify machines which visit a web site. http://www.the41.com/products.asp.

i appreciate all the good information if you could clarify further this conflicting information i found i would greatly appreciate it.

thatisvaliant
Based on this:http://www.the41.com/download/PCPrint%20for%20FI%20Product%20Overview_SL08PCT%20FSv1.pdf It looks like their solution is to make the user download a piece of software which creates a unique identifier based on the machine and ties it to some login credentials.
mmacaulay
As mentioned already, you didn't rule out your bank using a Flash cookie. How to clear Flash cookies and other discussion about the issue: http://tips.vlaurie.com/2007/10/24/how-you-are-secretly-tracked-with-flash-cookies/
micahwittman
My guess: The bank probably trusts that you are you if you (1) know your username, (2) know your password, and either (3a) have their cookie, or else (3b) come from an IP address they've previously associated with you.
Zack Peterson
+1  A: 

The suggestions to use cookies aside, the only comprehensive set of identifying attributes available to interrogate are contained in the HTTP request header. So it is possible to use some subset of these to create a pseudo-unique identifier for a user agent (i.e., browser). Further, most of this information is possibly already being logged in the so-called "access log" of your web server software by default and, if not, can be easily configured to do so. Then, a utlity could be developed that simply scans the content of this log, creating fingerprints of each request comprised of, say, the IP address and User Agent string, etc. The more data available, even including the contents of specific cookies, adds to the quality of the uniqueness of this fingerprint. Though, as many others have stated already, the HTTP protocol doesn't make this 100% foolproof - at best it can only be a fairly good indicator.

Danny Whitt
A: 

When i use a machine which has never visited my online banking web site i get asked for additional authentification. then, if i go back a second time to the online banking site i dont get asked the additional authentification...i deleted all cookies in IE and relogged onto my online banking site fully expecting to be asked the authentification questions again. to my surprise i was not asked. doesnt this lead one to believe the bank is doing some kind of pc tagging which doesnt involve cookies?

This is a pretty common type of authentication used by banks.

Say you're accessing your bank website via example-isp.com. The first time you're there, you'll be asked for your password, as well as additional authentication. Once you've passed, the bank knows that user "thatisvaliant" is authenticated to access the site via example-isp.com.

In the future, it won't ask for extra authentication (beyond your password) when you're access the site via example-isp.com. If you try to access the bank via another-isp.com, the bank will go through the same routine again.

So to summarize, what the bank's identifying is your ISP and/or netblock, based on your IP address. Obviously not every user at your ISP is you, which is why the bank still asks you for your password.

Have you ever had a credit card company call to verify that things are OK when you use a credit card in a different country? Same concept.

Anirvan
A: 

I would do this using a combination of cookies and flash cookies. Create a GUID and store it in a cookie. If the cookie doesn't exist, try to read it from the flash cookie. If it's still not found, create it and write it to the flash cookie. This way you can share the same GUID across browsers.

Eric Hogue
+3  A: 

These people have developed a fingerprinting method for recognising a user with a high level of accuracy:

https://panopticlick.eff.org/browser-uniqueness.pdf

Jonathan