Security Experts:

Samsung Pay Token Flaw Allows Fraudulent Transactions

A researcher has discovered several security issues in the Samsung Pay mobile payment service, including a vulnerability that can be exploited to make fraudulent transactions.

Samsung Pay provides users a digital wallet where they can keep their plastic credit, debit, gift, loyalty and membership cards. When customers want to use one of their cards, they simply select it, enter their PIN or scan their fingerprint, and hold their smartphone near the card reader.

At the Black Hat security conference last week, researcher Salvador Mendoza shared the results of his Samsung Pay analysis. The expert discovered static passwords used to protect databases, weak obfuscation, and comments in the code – all of which could eventually allow a clever attacker to access sensitive data.

Mendoza also noticed that the mobile application uses tokens to perform transactions instead of the actual card data – this ensures that the original card data is not exposed. A new token is generated for each transaction and, according to the researcher, an attacker might be able to predict future tokens based on previously used tokens.

Another attack method, which the expert has managed to put into practice, is related to unused tokens. Each token is invalidated after the transaction is completed. However, if for some reason the transaction is not completed, the token remains valid for one day, even after a new token is generated.

If attackers can obtain unexpired tokens, they can use them to make transactions without needing the victim’s smartphone. Mendoza created a small device, one that can be attached to a person’s wrist, that can capture tokens from nearby phones running Samsung Pay. In a scenario described by the expert, the attacker asks the victim to show them how the mobile payment system works, a process in which a token is generated, but remains unused.

The captured token can then be added to a device such as MagSpoof, an open source wireless credit card and magstripe spoofer created by researcher Samy Kamkar. MagSpoof can emulate a traditional magnetic stripe card by generating a strong electromagnetic field.

A video made available by Mendoza shows how he was able to use a slightly modified version of MagSpoof to make a purchase with the captured Samsung Pay token.

SecurityWeek has reached out to Samsung to find out if the company is aware of the vulnerability and if it plans on addressing it.

“Samsung Pay has to work harder on the token’s expiration date to suspend it as quickly as possible after the app generates a new one, or the app may dispose of the tokens which were not implemented to make a purchase,” Mendoza explained in a paper published after Black Hat. “Also, Samsung Pay needs to avoid using static passwords to ‘encrypt’ its files and databases with the same function because eventually someone will be able to reverse it. The databases are very sensitive. They contain delicate information to update the token status, server connection instructions and validation certificates.”

UPDATE. Samsung has published a brief statement, calling the recent report inaccurate:

"Each Samsung Pay transaction uses a digital token to replace a card number. The encrypted token combined with certificate information goes through multiple security layers and can be used only once to make a payment. Samsung Pay is designed so that merchants and retailers cannot see or store the actual card data, and our customers are notified with each transaction. Multiple layers of security from Samsung Pay and our partners are in place to detect threats to security," the company said.

However, Mendoza told SecurityWeek that he reported the issues in May and Samsung said it was working on addressing them. The researcher last tested the application before his Black Hat presentation and the token flaw was still there.

Related: Flaws in Venmo Payment App Allowed Hackers to Steal Money

Related: SSL Flaw in Intel Crosswalk Exposes Apps to MitM Attack

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.