Researchers have shown that it is possible for attackers to bypass an Apple iPhone’s lock screen to access payment services and make contactless transactions. The issue, which only applies to Apple Pay and Visa, is caused by the use of so-called magic bytes, a unique code used to unlock Apple Pay.

In the full paper, researchers from two UK universities—the University of Birmingham and the University of Surrey—show how this feature makes it possible to wirelessly pickpocket money.

The underlying issue

What happens often is that a feature designed to make our lives easier, also makes it easier for clever attackers to use that same feature against us. The vulnerability identified by the researchers is only present when Visa cards are set up using Express mode in an iPhone’s wallet. Express mode allows iPhone owners to use transit or payment cards, passes, a student ID, a car key, and more, without waking or unlocking their device, or authenticating with Face ID, Touch ID, or a passcode. The user may even be able to use their card, pass, or key when their device needs to be charged.

Transport mode

Contactless Europay, Mastercard, and Visa (EMV) payments are a fast and easy way to make payments, particularly at a time when we’re all much more wary about the hygiene of the surfaces we touch.

Normally, payments via smart-phone apps need to be confirmed by the user via a fingerprint, PIN code, or Face ID. Apple Pay elevated the EMV standard for usability, by introducing a feature that allows it to be used at a ticketing barriers (like those used to access the London underground railway network) without unlocking the phone. And Apple is not alone. Samsung has introduced the same “transport mode” feature as well.

The researchers found that Transport for London (TfL) ticket barriers broadcast a non-standard sequence of bytes—so-called “magic bytes”—which bypass the Apple Pay lock screen. Apple Pay then checks that its other requirements are met (which are different for Visa and Mastercard) and if they are it allows a payment to be performed with no user interaction. In this way it allows underground passengers to move through the barriers without stopping, in the same as they do with Oyster cards.

Taking payments

For Apple Pay Visa, the researchers were able to craft messages that resulted in fraudulent payments from a locked iPhone to any EMV shop reader, for any amount. The tests were made for payments up to £1,000 (roughly US$ 1,350). Mastercard is stricter, requiring readers to have a transit merchant code before allowing this functionality.

The researchers also found that Samsung Pay does not use magic bytes, but it was always possible to perform an EMV transaction with a locked Samsung phone. However, they also found that locked Samsung Pay would only allow a zero-value payment. Transport providers (which is only TfL right now) must have an arrangement with their banks to make good the value of the tickets. According to the researchers, “this makes it impossible to relay Samsung Pay to shop readers to buy goods, but it is still possible to relay Samsung Pay to other transport readers”.

Pointing fingers

When the attack was disclosed to Apple and Visa, Apple reportedly said that the problem was with Visa (stop us if you’ve heard this one before), and Visa said it was with Apple. Apple insisted it was up to Visa to implement additional fraud detection checks. Visa pointed out that the same problem did not exist in the Samsung Pay and Visa combination.

For now, as the academics stated, while the problems are acknowledged by both parties, who have been spoken to extensively, the issue remains unfixed. Apparently, when two industry parties each have partial blame, neither are willing to accept full responsibility. Needless to say, while nobody fixes the problem, all users are vulnerable.

It seems unlikely that transport modes will be removed from phones, so the researchers have proposed an EMV relay-resistant protocol.

Where does that leave you?

The attack has only been demonstrated in a lab and there is no evidence that criminals are currently exploiting the vulnerability.

However, if you are worried about falling victim to this type of attack, you should disable the Express Mode if you don’t need it. When you add an eligible transit card to an Apple Wallet, Express Mode is turned on by default.

Should you lose your phone or have it stolen, there is now—in theory at least—a way for thieves to extract funds from it without having to guess your passcode. To avoid that, we suggest that you inform your bank or payment provider if your phone is stolen so they can block your cards.

Stay safe, everyone!