How the Cambridge chip and PIN attack works

Daily Newsletters

Sign up to ZDNet UK's daily newsletter.

TECH GUIDE

Cambridge University researchers have uncovered a major security flaw in chip and PIN, the UK's standard payment card system.

Chip and PIN uses a smartcard with a processor and memory to verify its own identity and that of its owner to a terminal belonging to a merchant. It is based on the EMV — Europay, MasterCard, Visa — protocol, and has been adopted practically universally within the UK for most retail card-based transactions.

The card itself runs part of the protocol on an embedded secure processor, meaning that certain secrets never leave it and are not readable from outside, no matter what.

In use, a chip-and-PIN transaction is started when the cardholder puts their card into a terminal. After verifying the card, the terminal asks for a short personal identification number, and when it receives a valid PIN, the transaction takes place.

There is no need for the card to leave the holder's control, making it very hard for dishonest merchant staff to steal details; and the PIN need be known to nobody but the holder, rendering a lost or stolen card of no use — unless EMV is itself vulnerable.

There are three stages to an EMV transaction: card authentication, cardholder verification and transaction authorisation.

Card authentication
Card authentication starts when the card is put into the terminal. The terminal asks the card for a list of applications it can support — there can be many different applications, with different keys, on one card. The terminal then selects an appropriate application and tells the card which options it wants to run.

Following that, the terminal reads the card details from the chip, which include account numbers, expiry date and information such as which methods of cardholder verification the card supports. There are also various digital signatures available from the card, depending on which variant of the protocol is in use.

Once the card has provided verifiable signed records and appropriate capabilities, the terminal is satisfied with its authenticity, and attention turns to the cardholder.

Cardholder verification
Cardholder verification starts with the card and the terminal negotiating what sort of verification is appropriate. Depending on a number of factors, including the size and nature of the transaction, the terminal picks one method from the Cardholder Verification Method (CVM) list previously provided by the card.

The CVM also specifies what should happen if verification fails: whether the transaction should be aborted or another method tried.

Most cards examined by Cambridge University security researchers in a hacking experiment had only three verification options: PIN, signature or no authentication. In theory, a terminal can tell the merchant to check the signature if the PIN fails; in practice, most failed PIN verifications terminate the transaction.

Read this

Chip and PIN is broken, say researchers

A flaw in the protocol underlying chip-and-PIN transactions allows an attacker to push through a purchase without a valid PIN...

Read more +

If PIN is chosen, the terminal asks the cardholder to enter the number. This is sent to the card, which compares it to its internal (and never revealed) PIN.

A match, and the card returns the hexadecimal code 0x9000. A failure, and the card returns 0x63Cn, where 'n' is the number of further attempts possible before the card locks up. However, the terminal does not authenticate that the response itself actually comes from the card it thinks it is talking to.

Transaction authorisation
Transaction authorisation follows. Here, the terminal asks the card to encrypt the transaction details, using various bits of data supplied by the terminal itself. The card can reject the transaction, or it can allow it — in which case, it generates a cryptogram that is sent to the financial institution.

After various checks on the card's validity, the likelihood of the transaction being fraudulent and there being enough credit available for the transaction, the institution sends back a response code telling the terminal and card what to do next, plus another cryptogram. These are sent via the terminal to the card, which checks them for validity.

The terminal then tells the card and the card issuer that the transaction is authorised, and keeps a copy of the transaction. At this point, it normally prints a receipt too, with details of the transaction and the verification method.

The Cambridge researchers' man-in-the-middle attack takes advantage of the fact that the real card does not know which form of verification succeeded, just that the terminal does not think that a PIN verification failed. The terminal does not know that the real card never received a PIN to verify, because the fake card in the middle issued an 0x9000 success code.

The terminal reports success; the real card assumes that was due to a non-PIN verification. Although the card may then report to the terminal that the verification was not via PIN, this is in a format that is not specified in the standard, so the terminal cannot tell.

Talkback

Systems broke then and all because the developer's got over confident and lazy! why on earth bother implementing additional safe guarding routines and then not use them?!

All I want to hear now from the banks is where fixing it, and where going to be issuing new cards.

CA 11 February, 2010 23:51
Reply

Post your comment

In order to post a comment you need to be registered and logged in.

You can also log in with Facebook. Log in or create your ZDNet UK account below

  • Login

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Community FAQ

Get ZDNet UK's daily newsletter

Enter your email address to sign up

ZDNet UK Live

annonymous2

If Piratebay is a crime then so is borrowing a dvd you purchased to a family member or a friend. Why should we not be aloud to share. Most of the...

2 hours ago by annonymous2 on UK ISPs ordered to block Pirate Bay website
NanWag

File Services For Macintosh was causing Excel to prompt for Overwriting changes or Save Another Copy because it was changing the timestamp on the...

2 hours ago by NanWag on Windows Server 2008 drops the ball for Mac compatibility
Regis Machado

creative cloud $48/month in the USA, £48/month in the UK ($79). good for the competitors

4 hours ago by Regis Machado via Facebook on Adobe move promotes piracy
Tom Espiner

Hello KosGirl, Good question. I've asked Belfius for a response. The latest post I can find on Pastebin about it is here:...

4 hours ago by Tom Espiner on Hackers hold bank to ransom over stolen data
KosGirl

Have there been any further updates to this story? I can't find any information on whether the hackers released the data or not.

5 hours ago by KosGirl on Hackers hold bank to ransom over stolen data
SandJ

I have done 7 speed tests this morning on different speed test tools. They tell me my download speed is: 12.3, 12.3, 12.3, 11.1, 12.7, 12.7, 11.7...

6 hours ago by SandJ on Watchdog: TalkTalk's broadband speed test misled users
Jack Schofield

@Mary Microsoft could always send Mozilla a spec sheet and oblige them to meet the same standards as IE. Then Mozilla can spend millions of...

9 hours ago by Jack Schofield on Windows RT browsers and the point of Windows RT
goth1csnake3

Not before time, that people making films,dvd's get whats coming to them. Well done, Virgin Media.

11 hours ago by goth1csnake3 on Virgin Media: Spotify deal will bring down piracy
Simon Bisson and Mary Branscombe

Apex - the question then is what about letting the user choose to have a tablet where they don't have to have that responsibility? why can't the...

21 hours ago by Simon Bisson and Mary Branscombe on Windows RT browsers and the point of Windows RT
Simon Bisson and Mary Branscombe

Moley, Apex, thanks; I think there's an interesting other dimension of choice - the choice to have a platform that is 'locked down' in the sense...

21 hours ago by Simon Bisson and Mary Branscombe on Mozilla accuses Microsoft of shutting Firefox out of WOA
Yellowcave

Not surprised. I once used the methods to let my firewall just notify me of breaches. Not one single logged event was genuine. Once, we all...

1 day ago by Yellowcave on Mobile porn filters catch innocent content, says report
duplex

live realy sucks in facebook becuase people hack your profile

1 day ago by duplex on Irish watchdog: Facebook privacy still falls short
Ed Macnair

If only it was that simple. When you start accessing Cloud applications you are stuck with the security model the vendor provides...........unless...

1 day ago by Ed Macnair via Facebook on IT security? You're doing it wrong!
Phil at Cloud4

Another good updaet, I have enjoyed going on the journey reading this series on SharePoint 2010 and have learned alot. Great writing.

1 day ago by Phil at Cloud4 on Designing a SharePoint farm: Tiers before bedtime
muteen

roumers of an ipad Mini, isnt that just an iTouch!?

1 day ago by muteen on Apple rebrands iPad 4G as 'Wi-Fi + Cellular' for UK
apexwm

Thanks for this article and bringing this issue to light. Unfortunately this type of activity is common not only with Adobe, but many other...

1 day ago by apexwm on Adobe move promotes piracy
Andy Bolstridge

there's a very thin line between tax avoidance and tax efficiency - earning £850 a month and claiming dividends to bring my income up to normal...

1 day ago by Andy Bolstridge via Facebook on The Idle Self-employed
Andy Bolstridge

I see that they are happy to announce these numbers.. but no-one will take any notice until they start announcing sales numbers too.

1 day ago by Andy Bolstridge via Facebook on Microsoft's score card for Smoked by Windows Phone
AndyPagin

I saw a Windows phone about a year ago, haven't seen once since, and quite a few people own phones in the City of London.

1 day ago by AndyPagin on Microsoft's score card for Smoked by Windows Phone
helice041

Well said. You can add the change differences between US $ and Euro for the adobe cloud subscription and the very clouded informations about when...

2 days ago by helice041 on Adobe move promotes piracy

Latest in IT At Work