views:

73

answers:

5

My bank website has a security feature that let me register the machines that are allowed to make banking transactions. If someone steals my password, he won't be able to transfer my money from his computer. Only my personal computers are allowed to make transcations from my account. So...

What are the approaches to restrict the access to a group of machines in a web system?

In other words, how to identify the computer who made the http request in the web server?

A: 

If you are looking for the IP address of the computer that makes an account-creation request, you can easily pull that from the Request. In ASP.NET, you'd use:

string IPAddress = Request.UserHostAddress;

You could then store that with the account record and only accept logins for that account from that IP address. The problem, of course, is that this will not work for a public site at all. Most people come through an ISP that assigns IP addresses dynamically. Even with an always-on internet connection, the ISP will occasionally drop and re-open the connection, resulting in a change of IP address.

Anyway, is this what you are looking for?

Update: if you are looking to register a specific computer, have you considered using cookies? The drawback, of course, is that someone may clear their cookies and thus "unregister" their computer. The problem is, the web only has so much access to your computer (not much) so there is no fool-proof way to "register" a computer. Even if you install an ActiveX control, they could uninstall or delete it (although this is more persistent than a cookie). In the end, you'll always have to provide the end-user with some method for re-registering. And, if you do that, then you might as well have then log in anyway.

Mark Brittingham
No... Because of NAT, IP isn't reliable for this (the same IP may be used by a group of machines). Also, the IP may be dynamic.I need a way to identify a specific machine.
Daniel Silveira
Hmmm...I didn't even think of NAT (pun accidental but left in anyway). Well, it seems to me that if you really want to limit it to a single computer then you have to drop a cookie on login and forever demand that it remain. Of course, if someone clears their cookies...
Mark Brittingham
A: 

Did you actually install something?

Over and above what Mark Brittingham mentions about IP addresses, I suppose some kind of hash code that is known only to your bank's computer and your computer(s) would work, provided you installed something. However, if you don't have a very strong password to begin with, what would stop someone from "registering" their computer to steal money from you?

GregD
In my bank system the process to register a computer isn't THAT simple. In there case, after you register the computer you have to make contact with the bank by phone to unlock the registered computer. Only then you can make transactions from it.
Daniel Silveira
By the way... they use Java Applets
Daniel Silveira
A: 

I would guess your bank was doing it by using a trusted applet - my bank used to have a similar approach (honestly I thought it was a bit of a hassle - now they're using a calculator-like code generator instead). The trusted applet has access to your file system, so it can write some sort of identifier to a file on your system and retrieve this later.

A tutorial on using trusted applets.

Kristian J.
Yes... that is what they do, But this question is to discuss the variuos approches to do it.
Daniel Silveira
+2  A: 

Why not using a clients certificate inside the certificate store of an authorized host or inside a cryptographic token such as smartcard that can be plugged into any desired computer?

Update: You should take into account that uniquely identifying a computer means obtaining something that is at a relative low level, unaccessable to code embeded in an html page (Javascript, not signed applet or activeX), unless you install something in the desired computer (or executing something signed such as an applet or activeX).

One thing that is unique per computer is the MAC address of the Ethernet card, that is almost ubiquitous on every rather modern (and not so modern) computer. However that couldn't be secure enough since many cards allow changing its MAC address.

Pentium III used to have an unique serial number inside CPU, that could fit perfect for your use. The downside is that no newer CPUs come with such a thing due to privacy concerns from most users.

You could also combine many elements of the computer such as CPU id (model, speed, etc.), motherboard model, hard disk space, memory installed and so on. I think Windows XP used to gather such type of information to feed a hash to uniquely identify a computer for activation purposes.

Update 2: Hard disks also come with serial numbers that can be retrieved by software. Here is an example of how to get it for activation purposes (your case). However it will work if sb takes the HD to another computer. Nonetheless you can still combine it with more unique data from computer (such as MAC address as I said before). I would also add a unique key generated for a user and kept in a database of your own would (that could be retrieved online from a server) along with the rest to feed a hash function that identifies the system.

Fernando Miguélez
A hardware-free solution would be more desirable. Thanks!
Daniel Silveira
A: 

I'm thinking about using Gears to store locally a hash-something to flag that the computer is registered.

Daniel Silveira