Chip and skim

March 15th, 2006 at 16:36 UTC by Mike Bond

We recently built an EMV transaction interceptor to aid us in understanding the viciously complex EMV protocol suite. A useful byproduct is that we can now give demonstrations of interception and relay attacks on Chip and PIN — topics discussed in our paper Chip and Spin. Since German TV picked up on our interceptor experiments, there has been some discussion about whether these attacks really work, and what it means for Chip and PIN security.

First off, intercepting smartcard communications is not rocket science; EMV is built on the ISO 7816 standard for smartcards. Interceptor hardware necessarily exists for test purposes (Micropross is a well known test rig manufacturer) but it doesn’t come cheap. Not willing to cough up a grand, we decided to do it on the cheap: we wrote a very basic microcontroller program which samples the smartcard I/O data line as fast as it can, and passes the data back via USB for decoding on a laptop.

EMV Interceptor picture

This prototype is a useful price point for the cost of a smartcard interceptor: for example, we bought a suitable microcontroller development board from Siphec for about $60. Our Chip and PIN (EMV) Point-of-Sale Terminal Interceptor page describes both this device and claims that sufficient information can be captured from a trace of an EMV transaction to recover the customer PIN, and to produce a magnetic stripe counterfeit of the card.

That we built a working interceptor is not under dispute, but is the above claim true? Would it actually work in practice? For this goal, a number of extrapolations must hold true:

  • The PIN must travel in the clear across the wires to the smartcard. UK cards are SDA cards, so the PIN is not encrypted. In theory the PIN could be routed for verification at the bank rather than by the card, but the UK also opted for local verification only.
  • The customer PAN and CVV1 must be sent by the smartcard. More generally, all the information required to reconstruct the magnetic stripe must be present. The PAN is clearly sent as it is required for the EMV transaction itself. In the half dozen or so UK cards we have examined, the same CVV1 appeared to present in the chip data as on the magstripe, though we were aware of some suggestions that the CVV1 was blanked out on the chip equivalent data. The EMV specification says that all records stored on the chip are read out during a transaction, and the traces appear to confirm this.
  • There must be no further secret authentication mechanisms for the card or magstripe. In Germany, magstripe cards carry a hidden “MM-code” which is correlated with a copy encoded on the magstripe; the method to read the MM-code is kept secret. In the USA there is some use of automated counterfeit hologram detection. It seems no such methods are in use in the UK; journalist Jonathan Maitland from Tonight with Trevor MacDonald successfully produced and used a counterfeit white card produced purely from a dump of track 1 and 2 magstripe data.
  • A suitable target ATM must be found at which to use the counterfeit card. Clearly there are plenty of ATMs in foreign countries which do not support Chip and PIN, so targets do exist. Within the UK there are three ways for an ATM to be vulnerable. First, if it has not been upgraded to support chip cards, it must necessarily use the magstripe. Second, if the chip-enabled ATM cannot tell with certainty that a card is supposed to be a chip card, then it may assume it is a magstripe card. Seeing as practically all UK ATMs are online the issuing bank can always be queried, so this second vulnerability mode is unlikely. Third, if the ATM supports fallback to magstripe, for instance in the case of damaged chips, then it will work. Conditions under which ATMs permit fallback actually appear to be quite complex, dependent for example on time of day and fraud history on that machine. There was certainly no problem finding viable ATMs in the UK when the Trevor MacDonald program aired, this time last year.
  • It must be possible to adequately miniaturise and camouflage the interceptor. Miniaturisation of the circuitry is not the bottleneck here, very small form-factor microcontrollers can be found, and few other discrete components are needed. The real miniaturisation challenge comes in gaining physical access to the electrical contacts covertly. The reader slot is wide enough to admit a thin second item, such as a flexible PCB, or maybe some other sort of plastic sheet with conductive ink, but the space is of the order of 0.1 mm, a typical card being about 0.8 mm thick. The alternative is not to go for a miniature solution per se, but a well camouflaged fake slot which sits outside the main slot. Different form-factor terminals would clearly have different optimal designs for cheap interceptors.
  • The POS terminal must not be able to detect the presence of an interceptor. Some modernised ATMs are able to detect unauthorised attachments designed to directly skim PIN and magstripe, there is no fundamental reason why such technology could not be applied to POS terminals as well. However we have found that there definitely are UK POS terminals which do not detect such attachments, for reasons of cost, we suspect.

Is there missing piece to this jigsaw that we have overlooked in our investigations, or are banks simply reluctant to admit that POS terminals are at least equally vulnerable to the same sorts of magstripe skimming attacks as ATMs? I’m eager to find out.

Entry filed under: Banking security, News coverage

13 comments Add your own

  • 1. Chris Lightfoot  |  March 15th, 2006 at 19:47 UTC

    Is point-of-sale equipment usually tamper-proof enough to prevent an insider from installing the skimmer within the enclosure itself, rather than in the slot between contacts and card?

  • 2. Steven J. Murdoch  |  March 15th, 2006 at 20:17 UTC

    @Chris Lightfoot

    We bought the terminal pictured in the article off Ebay, and it did not have any tamper resistance, but we are not sure of which country it came from. In the UK I believe that terminals do have tamper detection, but I am not sure what they do when tampering is detected, and what extra security this adds.

    The traditional action to perform when tampering is detected is to wipe keys, but my understanding is that keys are stored in SAMs which are removable smartcards with the same form factor as SIMs. So the worst a tamper detector could do is wipe the firmware, potentially requiring a reload. This might be possible to do over the phone-line, or might require an engineer to come out. In the latter case, the manufacturer could have a policy of replacing the terminal completely, but this would be expensive to do each time a battery fails.

    But even if the tamper detection is perfect (it won’t be), and the attacker wants to put the skimmer inside the enclosure, an alternative is to replace the entire terminal, by putting custom electronics into a real shell. Driving the screen and printer is non-trivial, but still feasible. If the attacker still wants transactions to go through, the fake terminal could be connected to a real terminal, and the PIN pad controlled through electronic or mechanical actuators.

  • 3. Jon  |  March 15th, 2006 at 23:00 UTC

    Well it’s hard to generalize on POS design, but at least in the EU POS terminals are generally required to have physical security measures. Additionally for many markets they are required to be evaluated against standards such as PCI. Keys need to be stored in volatile memory so that when a tamper alarm is generated power is cut from this memory. As is usually the case some manufactures of POS terminals are VERY physically secure, and some are not. Additionally one of the design requirements of a good POS terminal is to make it difficult to tap any lines running from the PIN pad to the ‘secure area’ of the terminal.

  • 4. .$author.  |  March 30th, 2006 at 13:05 UTC

    [...] Once we’d exorcised the camera crew from the building that morning, I showed off the photos to my colleagues. Now I have done a fair bit of research into skimming, including compiling a list of pictures of ATM skimmers for my Phantom Withdrawals site, and a study of the cost and difficulty of making a skimmer which could attach to the chip card slot of a Point-of-Sale terminal, the design of which is reported on my interceptor page and in a previous LBT post Chip and Skim. Also we were aware that anti-fraud attachments have been trialled on Barclays ATMs about a year ago. But for the life of me, I did not know for certain whether this was a genuine skimmer, or a product of my own paranoia and Barclays unusual decision to literally “release a patch” for their ATM. [...]

  • 5. Tony Finch  |  May 8th, 2006 at 12:22 UTC

    There is (or perhaps was) a chip & pin terminal in the M&S Simply Food shop at Cambridge Station which has a thoroughly busted case “repaired” with sticky tape, which appers to work fine. I refuse to us it…

  • 6. Nick Murray  |  May 9th, 2006 at 08:10 UTC

    Nick Murray 8th May 2006

    We are seeking a major joint venture manufacturing partner to work with us in the development of a new biometrics chip + pin card system for reducing identity theft and High Street card fraud at the sales terminal.

    This is a unique biometrics opportunity and not another finger print device.

    The Royal Bank of Scotland has expressed interest in marketing the finished product but they don’t want to be involved in development projects.

    I look forward to receiving contacts from any of the major players, IBM etc.

    Best Regards,

    nickmurray1@aol.com

  • 7. .$author.  |  June 12th, 2006 at 11:54 UTC

    [...] The 12:30 ITN news on ITV1 today featured a segment on Chip and PIN, and should also be shown at 19:00 and 22:30. It included an interview with Ross Anderson and some shots of me presenting our Chip and PIN interceptor. The demonstration was similar to the one shown on German TV but this time we went all the way, borrowing a magstripe writer and producing a fake card. This was used by the reporter to successfully withdraw money from an ATM (from his own account). [...]

  • 8. Donal  |  June 13th, 2006 at 07:36 UTC

    Any relevent information for EFTPOS systems down under in Oz?

    Thanks for any lnks / refs …..

    D.

  • 9. .$author.  |  September 4th, 2006 at 14:47 UTC

    [...] Chip and skim – popisuje jakým způsobem a za jakých podmínek lze pomocí speciálního testovacího přístroje, jehož pořizovací cena je kolem 60$, získat z čipových karet cenné údaje jako třeba PIN. [...]

  • 10. kitayn  |  November 2nd, 2006 at 20:25 UTC

    I am looking for the material
    usandeu dumps+pin

  • 11. kuki  |  January 3rd, 2008 at 21:10 UTC

    Is not possible to copy chip+pin, just magnetic band + pin.
    Bye

  • 12. kuki  |  January 3rd, 2008 at 21:12 UTC

    Is not possible to copy the chip+pin, was pissible to copy Magnetic
    card + pin.
    Ciao

  • 13. Billy  |  June 23rd, 2008 at 14:10 UTC

    Excellent device, its quite simple to build if know your eletronics and programming ;)

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to the comments via RSS Feed


Calendar

March 2006
M T W T F S S
« Feb   Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031