Researchers at Cambridge University have found a fundamental (and, by the sound of it, elementary) flaw in the chip-and-PIN protocol used to authenticate European bank cards, which allows a chip-and-PIN terminal to be tricked into authenticating a transaction with any chip-and-PIN card, regardless of whether the correct PIN is entered. The required device is simple to construct and use. Details of the attack here.
The crucial detail here is this one:
The majority of transactions require PIN verification. The customer enters their number on a PIN entry device. The PIN is then sent to the card, which compares it to a PIN that it stores on its chip. If the PIN is correct, the card sends a verification code — 0x9000 — back to the terminal, which completes the transaction.
The problem here — and this really is a complete beginner's design error — is that the verification code sent back by the card is both fixed and sent in clear, and contains no mechanism whatsoever either to protect the conversation or to encode the data that it is verifying (or rejecting) in the reply. So all an attacker need do is intercept the card's "reply" and replace it with the constant 0x9000 "Verified" response.
This has been a solved problem for over thirty years. To be failing at it in a supposedly-secure financial transaction protocol introduced only four years ago lies somewhere between appalling and inexcusable.
Afterthought over supper: The last paragraph above is probably over-simplified. I should clarify that the problem of non-spoofable authentication remains to be fully solved. However, techniques for exchanging data securely over an insecure channel have been known for more than thirty years. Just as a first cut, a much better way of handling the PIN and verification exchange might be as follows: The terminal and the card use Diffie-Hellman key exchange or some other mechanism to establish a one-time shared secret. The terminal encrypts the PIN with the shared secret, saves that value temporarily, then sends the PIN in clear¹ to the card. The card then validates that PIN in a secure manner; if it matches, it too encrypts the PIN with the shared secret, and sends the ciphertext back. If it does NOT match, the card encrypts a random false PIN and sends that instead. The terminal compares that ciphertext to the one it generated; if they match, the transaction is authenticated. Without knowing the shared secret, a man-in-the-middle attacker cannot spoof the correct response, because the attacker cannot know in advance what it will be.
This is of course an oversimplification, for two reasons:
- It handwaves the problem of securely authenticating the PIN;
- If a MITM attack is a possibility, then the terminal needs to be able to confirm that it is in fact talking to the card and not to the MITM, or the MITM could hypothetically simply spoof the entire handshake.
[1] "In clear? Isn't that insecure?" Well, yes, in principle, but for the purposes of defeating this attack it wouldn't matter; not only does the attacker already know what PIN he just entered, but in this attack it's a false PIN anyway, so no actual sensitive information is exposed. However, if the terminal sends the ciphertext of the PIN to the card, then the hypothetical possibility of a known-plaintext attack exists. So in this — admittedly hypothetical and incomplete — example case, it is actually more secure to send the PIN candidate to the card in clear.
Afterthought two: W00t! I beat Bruce Schneier to this one!
no subject
no subject
no subject
no subject
Those are the dominant style of ATM here. What makes them less vulnerable to having a skimmer installed? It's not like you need your PIN to open the door, just something with a magstripe, and if they did require the pin at the door, well, just skim the door...
no subject
no subject
Well, I'll tell you this much too. The PIN is not on the card and never was.
no subject
http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.csfb400/csfb4z80541.htm
Very small.
no subject
Communications between US ATMs and the switch and between the switch and the host are triple-DES.
So in any event, this UK shit can't happen in the US.
no subject
I repeat: US credit cards do not even make a pretense of secure authentication. All anyone who steals your credit card has to do is use it for online or telephone purchases, or spend a few minutes practicing forging your signature well enough to fool a bored sales clerk who's never seen it before.
no subject
There is in fact a second problem, in many places the DECT protocol is used to transmit the data between the card reader and the basestation which contacts the bank. DECT has now been cracked - http://www.theregister.co.uk/2010/02/08/dect_phone_encryption_cracked/
The combination of these two is that someone ought to be able to use a radio to do MITM by setting themselves in between the DECT handset and DECT basestation.