MIFARE Classic: exposing the static encrypted nonce variant... and a few hardware backdoors
2024-8-20 06:0:0 Author: blog.quarkslab.com(查看原文) 阅读量:3 收藏

We studied the most secure static encrypted nonce variant of "MIFARE Classic compatible" cards -- meant to resist all known card-only attacks -- and developed new attacks defeating it, uncovering a hardware backdoor in the process. And that's only the beginning...

Introduction

MIFARE Classic contactless cards, developed and licensed by NXP Semiconductors1, are widely used but have been subjected to numerous attacks over the years. Despite the introduction of new versions, these cards have remained vulnerable, even in card-only scenarios, i.e. attacking the card alone, without access to the corresponding reader.

In 2020, the FM11RF08S, a new variant of MIFARE Classic, was released by Shanghai Fudan Microelectronics, the leading Chinese manufacturer of unlicensed "MIFARE compatible" chips. This variant features specific countermeasures designed to thwart all known card-only attacks and is gradually gaining market share worldwide.

We published a paper where we present several attacks and unexpected findings regarding the FM11RF08S.

The full paper and annexes of our security analysis can be found on the ePrint website.

Findings

  • We found the first attack capable of cracking FM11RF08S sector keys in a couple of minutes in the specific case of keys being reused across at least three sectors or three cards.
  • Through quick fuzzing, we discovered a hardware backdoor that allows authentication with an unknown key.
  • We cracked the secret key with our new attack and found it to be common to all existing FM11RF08S cards!
  • We designed several other attacks leveraging the backdoor to crack all the keys of any card in a few minutes, without the need to know any initial key (besides the backdoor one).
  • The optimized versions of these attacks required a successful partial reverse-engineering of the internal nonce generation mechanism of these cards in black-box mode.
  • We demonstrated how these attacks could be executed instantaneously by an entity in a position to carry out a supply chain attack.
  • We then found a similar backdoor in the previous generation, the FM11RF08, protected with another key.
  • We cracked this second key and discovered that the key is common to all FM11RF08 cards, as well as other Fudan references (FM11RF32, FM1208-10, and probably more), and even old cards from NXP1 (MF1ICS5003 & MF1ICS5004) and Infineon (SLE66R35)!
  • Finally, we described how existing attacks can be adapted to leverage this second backdoor key to accelerate them.

Conclusion

The FM11RF08S backdoor enables any entity with knowledge of it to compromise all user-defined keys on these cards, even when fully diversified, simply by accessing the card for a few minutes.

Therefore, we considered it important to share this information and alert potential users of the risks.

Consumers should swiftly check their infrastructure and assess the risks. Many are probably unaware that the MIFARE Classic cards they obtained from their supplier are actually Fudan FM11RF08 or FM11RF08S, as these two chip references are not limited to the Chinese market. For example, we found these cards in numerous hotels across the US, Europe, and India.

Nevertheless, it is important to remember that the MIFARE Classic protocol is intrinsically broken, regardless of the card. It will always be possible to recover the keys if an attacker has access to the corresponding reader. There are many more robust alternatives on the market (but we cannot guarantee the absence of hardware backdoors...).

The various tools and attacks developed in the context of this paper have now been merged into the Proxmark3 source code. At this stage, a few technical questions remain unanswered, and some of them might lead to even faster attacks. We have grouped these questions at the end of the annexes and hope they will inspire additional research within the community.

You can get the full paper and annexes here (pdf).


If you would like to learn more about our security audits and explore how we can help you, get in touch with us!


文章来源: http://blog.quarkslab.com/mifare-classic-static-encrypted-nonce-and-backdoors.html
如有侵权请联系:admin#unsafe.sh