Microscope-wielding boffins crack Tube smartcard
The keys to London Underground, and plenty more
Security researchers say they've found a way to crack the encryption used to protect a widely-used smartcard in a matter of minutes, making it possible for them to quickly and cheaply clone the cards that are used to secure office buildings and automate the collection of mass transportation fares.
The attack works against the Mifare Classic, a wireless card made by Netherlands-based NXP Semiconductors. It is used by transit operators in London, Boston and the Netherlands and by organizations in the public and private sectors to control access to sensitive areas, according to Karsten Nohl, a PhD candidate at the University of Virginia and one of the cryptographers who discovered the weakness. NXP says it's sold 1 billion to 2 billion of the cards.
The wireless devices are growing in popularity because of their low cost - about 50 cents apiece - and they offer many of the advantages of radio frequency identification (RFID) technology. Specifically, smartcards don't require contact with the mechanical readers used by transit agencies, which lowers operators' costs and are quicker and more convenient for users.
The research team was able to obtain the card's proprietary encryption scheme by physically dissecting its chip and examining it under a microscope. They then photographed various levels of its circuitry and used optical recognition software to produce a 3D representation of the entire chip. By examining the logic gates in great detail, they were able to deduce the proprietary algorithm, which NXP dubs Crypto1.
Under normal circumstances, knowing the encryption algorithm allows a hacker to perform a brute-force attack in which every possible key is entered until the correct combination unlocks the scrambled code. But that would have taken days, given Mifare Classic's key length of 48 bits.
The research team, which also included Henryk Plötz and an individual who goes by the moniker Starbug, soon found out that Cypto1 has a flaw that causes it to produce cryptographically weak outputs. The weakness allows them to make intelligent guesses about the possible key by swiping the smartcard against an RFID reader and observing the data that reader sends back.
"It only takes a few minutes to break any card in particular," Nohl said in an interview. He said the modest amount of time and equipment required to crack any Mifare Classic card - in many cases less than 10 minutes on a typical PC - makes the attack ripe for criminals to carry out in the real-world attacks.
"If you want to get into a high-security building, spending a matter of days is OK," he said. "Now, it doesn't take days; it takes minutes for subways and military installations alike."
A Hole in the Underground
Since the hack was first disclosed in December, NXP executives have downplayed its severity. For one, they say the Mifare Classic is a lower-end product that was never designed for locking down cars, bank accounts, or electronic passport information. They also say the attack defeats only a single layer of security and that additional layers would most likely prevent any misuse.
Paul de Bot, an NXP vice president of strategy and business development, also pointed to a report issued two months ago by a Dutch research institute called TNO. It concluded that the attack would be costly to carry out and would require hours to break each card. It also said that it would take several more years before the attackers are able to lower their costs and cut the amount of time.
"You need to start this procedure over and over again for each individual card," de Bot told El Reg. "Even though there may be possibilities to review keys for individual cards, if the infrastructure has appropriate measures, it would not be possible to build a criminal business case" around the attack.
Nohl says this analysis is flat out wrong. Any cryptographer in possession of the weak algorithm used in the Mifare Classic can crack the card in a matter of minutes, he insisted. On Monday, he published this detailed response to the report.
NXP is correct in describing the Mifare Classic as a lower-end product. The company on Monday announced the Mifare Plus, which gives system integrators the option of using the so-called Advanced Encryption Scheme (AES), a time-tested algorithm that is widely believed to be secure. An even more expensive card doesn't use Crypto1 at all.
Still, with as many as 2 billion Mifare Classic cards sold, there's no doubt they are widely deployed. They were recently rolled into the $3bn Dutch OV-Chipkaart transportation system. It's also used by public transit systems in Boston and London. Additionally, companies and government agencies around the world use the product to control access to telecommunications equipment, chemical labs and other sensitive areas.
In addition, the attack could leak individuals' private details if the smartcards were designed to allow holders to access information such as monthly billing statements, Nohl said.
Nohl, whose PhD research involves the building of a secure, low-cost smartcard, said the moral of the story is that proprietary encryption schemes like NXP's Crypto1 are almost always a bad idea. He said the Mifare Classic isn't the only smartcard to use a home-grown algorithm, and he predicted those devices are susceptible to similar attacks.
"These standardized schemes provide a level of security that's very well understood," he said. "With anything proprietary, you can never guaranty that." ®