Hacking RFID payment smart cards with an Android App

Pierluigi Paganini November 25, 2014

TrendMicro explained the mechanisms behind the hacking of RFID payment smartcards, explained how to do it with an Android App.

Security experts recently spotted an Android app used to hack the NFC based electronic payment system used in Chile, the “Tarjeta BIP!”. The malicious Android app detected as ANDROIDOS_STIP.A was designed to attack NFC devices and distributed online through forums and blogs. TrendMicro published an interesting post to explain how it is possible to hack RFID Payment Cards with Android App, the post focuses on the security risk of RFID payment cards in general.

Payments through RFID technology are becoming very popular also thanks to the rapid diffusion of NFC technology on mobile devices. Several institutions and merchants issue RFID cards to their customers with prepaid credits, but it is important to consider the security Issues related to their adoption.

Analyzing the case of Tarjeta bip! card hacking the experts highlighted that the they were Mifare smartcards, a contactless and proximity technology that is wide spread (billions of Mifare smart card chips are available on the market).

“Looking at the code of the Android app, we found that if it runs on a device equipped with NFC it can read and write to these cards.  The malicious app writes predefined data onto the card, raising the user’s balance to 10,000 Chilean pesos (approximately 15 US dollars). This particular trick will only work with this particular fare card, since it relies on the format of the card in question.” states the blog post from Trend Micro.

The analysis of the source code of the Android app reveals that it is able read and write smartcard running on NFC enable mobile devices. As highlighted in the post published by Trend Micro, the author of the app was able to interact with the card without being blocked by authentication mechanism, because the smartcards are based on an older implementation of the Mifare (MIFARE Classic), which is affected by multiple security problems. The vulnerability presents in the implementation of Mifare allows a bad actor to clone or modify an MIFARE Classic card using an equipment which is common available online (i.e. Proxmark3).

Mifare RFID implementation Proxmark3

The attacker can easily crack the card’s authentication key using one of the tools widely available, once obtained the key the attacker can easily implement a mobile app that is able to reprogram the card using the native NFC support in Android a device.

Mifare RFID Key cracking tool

As explained in the post, not only MIFARE Classic cards are vulnerable to attacks, also MIFARE DESFire and MIFARE Ultralight are affected by security issues.

“We know of at least three vulnerable cards which we have: a social security card with banking service, a payment card for transportation and shopping, and a dining card. The social security card has approximately seven million users.” states the post.

One of the card tested by experts at Trend Micro was a MIFARE Classic card, the other two were MIFARE DESFire smarcards, which are vulnerable to side-channel attacks.

“The cryptosystems in these cards leak information if the power used is monitored; the keys can be recovered within seven hours. If the issued keys are not random, customer cards can be cloned or manipulated similarly to MIFARE Classic cards.  Or even worse, credits can also be manipulated within a NFC-enabled mobile device.”

The principal cause for the success of the attacks is the adoption of an outdated technology still issued because their low price.

The experts suggest to customers to periodically check the balances of their accounts and take care of the type of cards they are currently using.

Pierluigi Paganini

(Security Affairs –  RFID – Mifare, hacking)

you might also like

leave a comment