Hacking

Hacking Nespresso machines to have unlimited funds to purchase coffee

Some commercial Nespresso machines that are used in Europe could be hacked to add unlimited funds to purchase coffee.

Some Nespresso Pro machines in Europe could be hacked to add unlimited funds to purchase coffee. The attack is possible because the machines use a smart card payment system that leverages insecure technology, the MIFARE Classic smart cards.

The vulnerability was disclosed by the security researcher Polle Vanhoof.

The Mifare Classic smart card technology is known to be insecure since 2008, when security researchers from Radboud University Nijmegen performed reverse engineering of the chip and published their findings.

The experts demonstrated how to clone and manipulate the contents of a MIFARE Classic chip.

The chipmaker NXP Semiconductor tried to stop the publication of the research by requesting a preliminary injunction that was denied.

Then NXP Semiconductor recommended customers to use its Mifare Plus cards that use AES-128.

Vanhoof’s arsenal included an NFC card reader / writer, the nfc-mfclassic – MIFARE classic command line tool, and a version of mfoc MIFARE Classic offline cracker that he modified.

The researchers wrote a Python script that used to crack the weak encryption and dumped the card’s binary.

The researcher was able to crack the keys and dumping the smartcard.

“To start things off, we will want to crack any non-default keys present on the Nespresso card.” wrote the expert. We can easily do this using the mfoc tool. We run the following command:

mfoc -P 500 -O nespresso.dmp

“We see in the output below that the card uses default keys for most sectors except the last 4. It takes the tool a couple of minutes to break the remaining 4 keys and they are dumped to our screen.”

Then he was able to manually grab the keys that were found in the data dump.

In the second part of the attack, the expert attempted to find the field associated with the funds while purchasing a coffee. To do this he made different purchases with different amounts of money.

“We are working on the assumption that the value of the card is kept on the card itself rather than on some centralized server. This is a much simpler and cost effective design, requiring less hardware and software to implement, making it a likely choice for anyone developing such a system unaware of the security weaknessess of the MIFARE Classic.” Vanhoof added. “We charge our card with some value.”

Once identified the bytes on the card that were changing while purchasing the coffee (three bytes), Vanhoof demonstrated that by altering them he was able to manipulate the money amount to pay the coffee. He wrote a value of €167,772.15 on the card using the nfc-mfclassic tool.

The expert also provided potential mitigations to secure the payment process such as:

  • Hardware upgrade: Upgrade the smartcards for future products and use more secure alternatives
  • Software mitigation: Upgrade the machines to keep the money value on a backend server rather than on the card itself, only using the cards as a “Personal ID”

“After talking to Nespresso, it seems they already offer both of these options. Clients concerned with the security of their systems should look into these alternatives.” concludes the expert.

Below the disclosure timeline:

  • 24 September 2020: Initial disclosure of findings to Nestlé Nespresso S.A
  • 24 September 2020: The vendor was quick in communicating and setting up a meeting to discuss the vulnerability
  • 09 October 2020: Full disclosure of technical details to vendor
  • 02 February 2021: Nespresso confirmed they agreed with publishing this writeup

If you want to receive the weekly Security Affairs Newsletter for free subscribe here.

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – hacking, Nespresso)

[adrotate banner=”5″]

[adrotate banner=”13″]

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Experts warn of an ongoing malware campaign targeting WP-Automatic plugin

A critical vulnerability in the WordPress Automatic plugin is being exploited to inject backdoors and…

4 hours ago

Cryptocurrencies and cybercrime: A critical intermingling

As cryptocurrencies have grown in popularity, there has also been growing concern about cybercrime involvement…

6 hours ago

Kaiser Permanente data breach may have impacted 13.4 million patients

Healthcare service provider Kaiser Permanente disclosed a security breach that may impact 13.4 million individuals…

7 hours ago

Over 1,400 CrushFTP internet-facing servers vulnerable to CVE-2024-4040 bug

Over 1,400 CrushFTP internet-facing servers are vulnerable to attacks exploiting recently disclosed CVE-2024-4040 vulnerability. Over…

9 hours ago

Sweden’s liquor supply severely impacted by ransomware attack on logistics company

A ransomware attack on a Swedish logistics company Skanlog severely impacted the country's liquor supply. …

11 hours ago

CISA adds Cisco ASA and FTD and CrushFTP VFS flaws to its Known Exploited Vulnerabilities catalog

CISA adds Cisco ASA and FTD and CrushFTP VFS vulnerabilities to its Known Exploited Vulnerabilities…

22 hours ago

This website uses cookies.