Scientists have circumvented the encryption used to protect a smartcard that's widely used to restrict access in corporate and government buildings, and to process payments in public transit systems, a feat that makes it possible to clone perfect replicas of the digital keys and steal or modify their contents.
The attack, developed by researchers at Germany's Ruhr University, takes about seven hours to recover the secret key protecting the Mifare DESFire MF3ICD40. The hack leaves no trace that the card has been compromised, and requires equipment costing $3,000.
The contactless card, which some customers adopted following the cracking of the Mifare Classic in 2008, is used by transit agencies in San Francisco, Australia, and the Czech Republic. It was adopted by NASA in 2004, although it's not clear if the agency has since upgraded.
The findings of researchers David Oswald and Christof Paar are the latest to shatter the protection in embedded electronic devices that millions of people rely on to secure homes, offices, and mobile payment accounts. In addition to the breaking of the Mifare Classic, a team of scientists that included Paar cracked the encryption of the Keeloq security system used by manufacturers of cars, garage door openers, and other devices.
Recipe for trouble
Like the previous two hacks, the latest attack recovered the card's secret key, allowing an adversary to assume the digital identity of individuals who use it to prove they are who they say they are.
NXP has marketed the DESFire MF3ICD40 despite its growing vulnerability to attack
"It provides a recipe for how to extract the secret key material non-invasively, basically by pointing a radio probe at the card and monitoring it as it performs a transaction," said cryptographer Nate Lawson, the principal of Root Labs, who has read the research. "This is something that's easily replicable with a few thousand dollars and a little amount of time, so it's practical."
Oswald and Paar's attack relied on side-channel analysis, a technique that records a device's electromagnetic radiation or other physical characteristics to learn important clues about the encryption taking place inside. In much the way a safe cracker listens to pin clicks to figure out a vault's combination, their differential power analysis allows them to recover the 112-bit secret key that locks digital information stored on the DESFire card.
It involves the use of a probe connected to an oscilloscope that records electrical emanations while the card is being read by an RFID, or radio-frequency identification, reader.
For the recovery to succeed, an attacker must first buy a DESFire card and spend months making detailed observations about its inner behaviors. It took the researchers about a year to "profile" their card, although Oswald told The Register that a trained engineer could probably cut that time in half. Using the findings in their paper, a hacker could probably shave even more time off the profiling.
With that task out of the way, all that's required for them to compromise a card is to have physical access to it for about seven hours. When they're done, they will have access to the secret key needed to clone the card and access or modify whatever data is stored on it. The hack can't be detected later.
In a message to DESFire customers, Mifare representatives said the attack works only on the MF3ICD40 model of the card, which is being discontinued at the end of the year. They encouraged users to upgrade to the EV1 version of DESFire because it isn't susceptible to the attack.
They also said customers of the weaker model can minimize the damage of attacks by assigning unique keys for each card they deploy. When the measure is accompanied by systems that monitor card readers and a key-revocation mechanism, cards that are lost or stolen can be blacklisted.
The failure of the MF3ICD40 is its almost complete lack of countermeasures to prevent differential power analysis. While the card skips a few random clock cycles in an attempt to misalign an attacker's traces, that countermeasure is now considered insufficient when used alone.
Endowing the card with additional protections was considered cost-prohibitive in 2002, the year a division of Philips designed it. Despite the growing use of attacks that use the technique, the company, which eventually became Netherlands-based NXP Semiconductors, continued to market the smartcard.
Let the upgrades begin
NXP doesn't provide figures on how many vulnerable cards have been purchased over the years, but earlier this year it did say it had sold 3.5 billion smartcards overall.
NXP says upgrading to the EV1 model is relatively painless because it is backwards-compatible with its vulnerable predecessor. But cryptographer Lawson said the logistics of swapping out tens of thousands or even millions of cards and updating back-end systems accordingly can make the task cumbersome.
With potentially billions of cards affected, shops that still rely on the card may want to think about dumping them soon. Let the upgrades begin. ®