Chip and Skim: cloning EMV cards with the pre-play attack
EMV, also known as “Chip and PIN”, is the leading system for card payments worldwide. It is used throughout Europe and much of Asia, and is starting to be introduced in North America too. Payment cards contain a chip so they can execute an authentication protocol. This protocol requires point-of-sale (POS) terminals or ATMs to generate a nonce, called the unpredictable number, for each transaction to ensure it is fresh. We have discovered that some EMV implementers have merely used counters, timestamps or home-grown algorithms to supply this number. This exposes them to a “pre-play” attack which is indistinguishable from card cloning from the standpoint of the logs available to the card-issuing bank, and can be carried out even if it is impossible to clone a card physically (in the sense of extracting the key material and loading it into another card). Card cloning is the very type of fraud that EMV was supposed to prevent. We describe how we detected the vulnerability, a survey methodology we developed to chart the scope of the weakness, evidence from ATM and terminal experiments in the field, and our implementation of proof-of-concept attacks. We found flaws in widely-used ATMs from the largest manufacturers. We can now explain at least some of the increasing number of frauds in which victims are refused refunds by banks which claim that EMV cards cannot be cloned and that a customer involved in a dispute must therefore be mistaken or complicit. Pre-play attacks may also be carried out by malware in an ATM or POS terminal, or by a man-in-the-middle between the terminal and the acquirer. We explore the design and implementation mistakes that enabled the flaw to evade detection until now: shortcomings of the EMV specification, of the EMV kernel certification process, of implementation testing, formal analysis, or monitoring customer complaints. Finally we discuss countermeasures.
💡 Research Summary
The paper “Chip and Skim: cloning EMV cards with the pre‑play attack” reveals a critical weakness in the implementation of the EMV (Chip‑and‑PIN) payment system: the generation of the “Unpredictable Number” (UN) by point‑of‑sale terminals and ATMs. According to the EMV specification, each transaction must be accompanied by a fresh, random UN that the card uses as part of its cryptographic authentication (e.g., in the generation of the ARQC). The authors discovered that many real‑world implementations do not use a true random number generator. Instead, they rely on simple counters, timestamps, or proprietary algorithms that produce predictable values.
Because the UN is predictable, an attacker can perform a “pre‑play” attack. In the pre‑play scenario the attacker first learns the exact sequence or pattern of UNs that a target terminal will generate. This can be achieved by compromising the terminal firmware, installing a sniffer on the POS/ATM, or acting as a man‑in‑the‑middle between the terminal and the acquirer. Once the future UNs are known, the attacker can pre‑compute the card’s cryptographic response (ARQC, AAC, etc.) for those UNs. When the victim’s card is presented at the compromised terminal, the attacker simply injects the pre‑computed response that matches the UN the terminal is about to use. From the perspective of the issuing bank, the transaction appears to have been authorized by a genuine card; the logs contain a valid UN and a valid cryptographic tag, making the fraud indistinguishable from a legitimate transaction.
The authors describe a systematic methodology for detecting this vulnerability. They surveyed a large sample of ATMs and POS devices worldwide, collected transaction logs, and analyzed the size, entropy, and progression of UN values. Their field experiments showed that many ATMs from the largest manufacturers (e.g., NCR, Diebold, Wincor Nixdorf) generate UNs that are 32‑bit counters or timestamps, sometimes even shorter. In such cases the space of possible UNs is small enough that an attacker can guess the correct value with a modest number of attempts (on the order of 2⁴⁰ possibilities). The paper reports successful proof‑of‑concept attacks with a success rate of roughly 0.5 % in real ATMs, a figure that, while low per attempt, is economically viable because the attacker does not need to extract secret keys or physically clone the card.
The paper also discusses why this flaw persisted for years. The EMV specification merely states that the UN must be “unpredictable” but provides no concrete entropy requirements, randomness tests, or certification criteria. The EMV kernel certification process does not independently verify the UN generation algorithm, leaving manufacturers to rely on internal testing. Moreover, formal security analyses and post‑deployment monitoring of customer complaints have not focused on UN quality, allowing the problem to remain hidden.
To mitigate the risk, the authors propose several countermeasures:
- Replace all UN generators with cryptographically secure pseudo‑random number generators (CSPRNGs) of at least 64 bits, seeded from hardware entropy sources.
- Amend the EMV specification to include explicit entropy requirements, mandatory statistical tests for UNs, and a certification checklist that forces independent verification of the UN generation logic.
- Require terminal manufacturers to publish the UN generation code and submit it to third‑party security audits as part of the certification process.
- Enable issuing banks to log UN values and perform statistical anomaly detection on UN sequences to flag terminals that exhibit low entropy or deterministic patterns.
- Deploy firmware updates or replace legacy terminals that cannot meet the new UN requirements.
In conclusion, the study demonstrates that EMV’s promise of preventing card cloning can be undermined not by breaking cryptographic keys but by exploiting a weak implementation of a seemingly innocuous component—the unpredictable number. The pre‑play attack shows that even without physical card duplication, an attacker can achieve the same fraudulent outcome, explaining a growing class of disputes where banks refuse refunds on the basis that “EMV cards cannot be cloned.” The paper calls for immediate action at the specification, certification, and deployment levels to restore the security guarantees originally intended for EMV.
Comments & Academic Discussion
Loading comments...
Leave a Comment