Skip to content
Misconfiguration Write-up Beginner

How I hacked Vending Machine

The smart vending machine's Windows 10 operating system could be accessed via a swipe gesture, exposing a high-privilege terminal. An attacker could install credential-stealing tools, monitor user activity, or redirect users to phishing pages.

Valeriy Shevchenko Follow

Published on medium.com

Bounty$300 View original

#### Valeriy Shevchenko

Valeriy Shevchenko, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

The target is a "smart" vending machine. To use one, a customer registers an account and links a credit card. The machine ran a screen-based terminal application on Windows 10, and the operating system menu was reachable from the screen. The report describes two separate issues: the terminal's operating system menu being reachable from the vending application, and a CSRF plus XSS combination in the user's personal account in the web application behind the service.

Setup

The researcher interacted with a physical smart vending machine screen. No special accounts, roles or tooling are described for the first issue beyond the machine itself and the applications already installed on it. The second issue was found while checking the balance on the vending machine card in the web application's personal account. The report does not give versions, build numbers or the identity of the vendor.

Finding it

While using a machine, the researcher accidentally opened the operating system menu of the vending machine screen. It was the basic Windows submenu, reached with a swipe from the right of the screen.

Image for post
Image for post From the original on medium.com

The operating system was Windows 10.

Image for post
Image for post From the original on medium.com

On its own a start menu is not a vulnerability, but the user privilege level at the terminal was quite high, so reaching the Windows menu opened a large number of attack vectors.

Exploitation

The researcher lists five vectors that the menu made reachable. Only some were actually exercised.

Step 1: Credential theft with Mimikatz

Installing Mimikatz on the terminal would allow the password to be recovered when the terminal reboots for the next login. The researcher states plainly that this was not done, describing it as the simplest and most obvious option.

Step 2: Covert monitoring with TeamViewer

A TeamViewer application was already installed on the terminal. Using it, an attacker could secretly monitor user activity and collect information about taste preferences. The researcher checked this vector against one of the company's employees, and the data was cached in the TeamViewer session.

Step 3: Fingerprint collection

Installing a modification on the fingerprint scanner would allow employee fingerprints to be collected. This works only for users who have access to the refrigerator without an identification card. The vector was not exploited, but the information from the device list allowed the attack to be executed.

Image for post
Image for post From the original on medium.com

Step 4: Traffic redirection

Setting the redirection of all traffic in the connection settings was considered. This attack was not verified, and the researcher notes that traffic is probably going over HTTPS.

Step 5: Phishing for corporate or Facebook accounts

Redirecting the user to a login page for a corporate or Facebook account on a phishing site was the fifth vector. The level of trust in a device installed in an office is high, so a large number of users would likely expose their accounts, in the same way this happens regularly on legitimate network printers inside companies.

Result of the first report

The bug was reported to the vendor on 30 November 2018 without technical details, confirmed on 3 December 2018, and the technical details followed on 4 December 2018. After a request for an update in January and a re-report to a new contact in February, the vendor fixed the issue on 28 February 2019 with a new application screen locker. The reward of 10 Euro was transferred to the researcher's vending machine card on 18 March 2019.

Step 6: CSRF plus XSS in the personal account

While checking the amount on the card, the researcher found the possibility of an attack on a user through a CSRF plus XSS vector in the user's personal account in the web application. Many outcomes were possible with that vector, including account information disclosure and account takeover. The researcher was surprised because the service linked real payment cards with all user accounts.

Image for post
Image for post From the original on medium.com

Because communication with the subsidiary was difficult, the researcher looked for the security engineer of the main company to report the problems in the subsidiary. This time the process was much faster, and the total reward for all the problems found was revised.

Result of the second report

Contact was made with the security engineer at the main company over LinkedIn on 20 March 2019, the technical details were reported the same day, and the bug was confirmed the same day. On 22 March 2019 the researcher was informed about the revised reward and planned fixes, and on 25 March 2019 the reward was transferred. The total was a 300 Euro Amazon gift voucher.

Root cause

The first issue is a design failure: the terminal ran Windows 10 with a high user privilege level, and the shell could be reached with a swipe from the right edge of the screen. The Windows menu could be reached from the screen, and the applications installed on the machine, including TeamViewer, were available from there. The fix was a new application screen locker.

The second issue is the combination of CSRF and XSS in the personal account of the web application. The report does not describe the request, the parameter or the injection point, so the specific coding mistake is not stated.

Impact

On the terminal, the researcher listed possible vectors: recovering credentials at the next login with Mimikatz, monitoring users covertly through TeamViewer, collecting fingerprints from users who can open the refrigerator without an identification card, redirecting traffic, and phishing corporate and Facebook accounts of users who trust a device installed in their office. The traffic redirection vector was not verified and the researcher notes traffic is probably over HTTPS. The fingerprint vector was not exploited, though the device list made it feasible.

In the web application, the CSRF plus XSS vector could lead to account information disclosure, account takeover and similar outcomes.

Fix

The vendor fixed the terminal issue on 28 February 2019 with a new application screen locker.

Variants to test

  1. Swipe from each screen edge on kiosk terminals in shops, offices and public spaces. A positive result is any operating system menu, taskbar or window appearing over the kiosk application.
  2. Check the privilege level of the kiosk process and whether common administrative tools can be launched from the shell. A positive result is a shell running with rights that allow installing software or reading credentials.
  3. Enumerate installed remote-support software such as TeamViewer on the terminal. A positive result is an application that can be started and used to observe the session.
  4. Look for peripheral management software, such as fingerprint scanner tools, and check whether enrolled users are listed. A positive result is a device list that reveals which users can be targeted.
  5. Test the personal account pages of the web application for reflected or stored input and for state-changing requests without a CSRF token. A positive result is script execution in the account context combined with a request that changes account settings or payment details.
  6. Try the same account flows on related subsidiary services, since the second report to the main company was handled much faster.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 14 min read.

What happened, in plain words

A security researcher was using a "smart" vending machine, the kind where you register an account, link a credit card, and the machine remembers you. While poking at the screen, he accidentally discovered that a simple swipe from the right edge of the screen opened the underlying Windows menu. The machine was not locked down to just the vending app; it was a full Windows 10 computer underneath.

That one small discovery opened the door to a lot of things: reading passwords, spying on users through remote-support software, collecting fingerprints, redirecting traffic, and tricking people into handing over their corporate or Facebook logins. He reported it, and the company eventually fixed it with a screen locker.

Then, while checking the balance on his vending machine card in the web app, he found a second, separate problem: a combination of two classic web weaknesses (CSRF and XSS) in the personal account area. Because real payment cards were linked to every account, this was serious. He reported it to the parent company's security engineer, and the total reward was revised upward.

This article walks through both findings in the order they happened, explains every concept from scratch, and shows exactly what was done at each step.

Context

The target is a "smart" vending machine. To use one, a customer registers an account and links a credit card. The machine ran a screen-based terminal application on Windows 10, and the operating system menu was reachable from the screen.

A quick word on terms before we go further:

  • A kiosk appliance is a computer deliberately restricted so that users can only run one application (the vending app) and cannot reach the desktop, settings, or other programs. Think of a museum touchscreen that only shows the exhibit map.
  • A general-purpose operating system is the opposite: a normal computer (here, Windows 10) where you can open menus, launch programs, and change settings. Think of a normal laptop sitting behind the glass.

The report describes two separate issues:

  1. The terminal's operating system menu being reachable from the vending application.
  2. A CSRF plus XSS combination in the user's personal account in the web application behind the service.

We will cover them in that order.

Setup

The researcher interacted with a physical smart vending machine screen. No special accounts, roles or tooling are described for the first issue beyond the machine itself and the applications already installed on it.

The second issue was found while checking the balance on the vending machine card in the web application's personal account. The report does not give versions, build numbers or the identity of the vendor.

Finding it

While using a machine, the researcher accidentally opened the operating system menu of the vending machine screen. It was the basic Windows submenu, reached with a swipe from the right of the screen.

Image for post
Image for post From the original on medium.com

On a normal Windows 10 machine, swiping in from the right edge of a touchscreen brings up the Action Center or a similar system panel. On a kiosk, that should never be possible, because the kiosk app is supposed to cover the whole screen and swallow every gesture.

The operating system was Windows 10.

Image for post
Image for post From the original on medium.com

On its own a start menu is not a vulnerability. A start menu on your own laptop is fine. But the user privilege level at the terminal was quite high, so reaching the Windows menu opened a large number of attack vectors.

Two concepts to unpack here:

  • A privilege level is how much power a program has on the computer. A low-privilege program can only do small things (show a screen, read its own files). A high-privilege program (often called "administrator" or "root") can install software, read other users' data, and change system settings. Think of it as the difference between a hotel guest key (opens your room) and a master key (opens every room).
  • An attack vector is a path an attacker can take to do something harmful. If a door is unlocked, the door is the vector. Here, the Windows menu was the unlocked door, and the high privilege level meant that behind the door there were many valuable things.

Exploitation

The researcher lists five vectors that the menu made reachable. Only some were actually exercised. We will go through each one, explain what it means, and say whether it was actually tried.

Step 1: Credential theft with Mimikatz

Installing Mimikatz on the terminal would allow the password to be recovered when the terminal reboots for the next login. The researcher states plainly that this was not done, describing it as the simplest and most obvious option.

What is Mimikatz? It is a well-known free tool that reads passwords and password hashes out of Windows memory. When Windows is running, it keeps login secrets in memory so that programs do not have to ask you for your password every few seconds. Mimikatz grabs those secrets. Think of it as a device that reads the ink off a form that has just been filled in but not yet filed away.

Why would rebooting matter? Because at the next login, the machine has to check the password again, and during that check the password (or a form of it) sits in memory. If an attacker has already planted Mimikatz on the machine, it can capture that moment.

The researcher did not actually do this. He simply notes that it would have been the easiest path.

Step 2: Covert monitoring with TeamViewer

A TeamViewer application was already installed on the terminal. Using it, an attacker could secretly monitor user activity and collect information about taste preferences. The researcher checked this vector against one of the company's employees, and the data was cached in the TeamViewer session.

What is TeamViewer? It is a legitimate remote-support program. Companies use it so that an IT person can see and control an employee's screen from another location. It is like a video call where the other person can also move your mouse.

Why is that dangerous here? Because if TeamViewer is already installed and running on the vending machine, and the attacker can reach the Windows menu, the attacker can start a TeamViewer session and watch what the person in front of the machine is doing. The report says the researcher tested this against one employee and the data was cached in his TeamViewer session. "Cached" means stored locally for a while, so it could be reviewed later.

The phrase "taste preferences" is the researcher's way of saying: what people buy, when, and how often. That is personal data.

Step 3: Fingerprint collection

Installing a modification on the fingerprint scanner would allow employee fingerprints to be collected. This works only for users who have access to the refrigerator without an identification card. The vector was not exploited, but the information from the device list allowed the attack to be executed.

Image for post
Image for post From the original on medium.com

A device list is simply a list of hardware and software the machine knows about. If the fingerprint scanner appears there, an attacker knows it exists and can plan around it.

Why does the refrigerator matter? The report says the fingerprint feature works only for users who can open the refrigerator without an identification card. In other words, some employees have fingerprint-based access to a fridge, and those are the people whose fingerprints would be exposed. The researcher did not actually collect fingerprints, but the device list made the attack feasible.

Step 4: Traffic redirection

Setting the redirection of all traffic in the connection settings was considered. This attack was not verified, and the researcher notes that traffic is probably going over HTTPS.

What is traffic redirection? It means changing the machine's network settings so that data meant for one destination is sent somewhere else instead. Think of it as filling in a forwarding address on someone else's mail.

Why might it not work? Because HTTPS is the encrypted version of web traffic. Even if you redirect the traffic, the attacker sees only scrambled data unless they can also break the encryption. The researcher did not verify this attack and notes that traffic is probably HTTPS.

Step 5: Phishing for corporate or Facebook accounts

Redirecting the user to a login page for a corporate or Facebook account on a phishing site was the fifth vector. The level of trust in a device installed in an office is high, so a large number of users would likely expose their accounts, in the same way this happens regularly on legitimate network printers inside companies.

What is phishing? It is tricking someone into typing their password into a fake page that looks real. The fake page then sends the password to the attacker.

Why would this work here? Because the machine sits in an office. People trust office equipment. If the vending machine screen suddenly shows a "please sign in with your corporate account" page, many people will just do it. The researcher compares this to network printers inside companies, which are often trusted and therefore often abused in the same way.

Result of the first report

The bug was reported to the vendor on 30 November 2018 without technical details, confirmed on 3 December 2018, and the technical details followed on 4 December 2018. After a request for an update in January and a re-report to a new contact in February, the vendor fixed the issue on 28 February 2019 with a new application screen locker. The reward of 10 Euro was transferred to the researcher's vending machine card on 18 March 2019.

A screen locker is a program that forces the vending app to stay in front and blocks gestures like the swipe from the right edge. It is like putting a locked frame around the screen so the user cannot escape to the desktop.

Notice the timeline: the bug was confirmed quickly, but the fix took about three months and required chasing. That is common in bug bounty work.

Step 6: CSRF plus XSS in the personal account

While checking the amount on the card, the researcher found the possibility of an attack on a user through a CSRF plus XSS vector in the user's personal account in the web application. Many outcomes were possible with that vector, including account information disclosure and account takeover. The researcher was surprised because the service linked real payment cards with all user accounts.

Image for post
Image for post From the original on medium.com

Two new terms need explaining.

XSS (Cross-Site Scripting) is when a website takes something a user typed (or something in a URL) and puts it back on the page without cleaning it up, so that a malicious script runs in the victim's browser. Think of a guestbook where someone writes a note that says "when you read this, hand me your wallet", and the guestbook actually does it.

CSRF (Cross-Site Request Forgery) is when a malicious site makes your browser send a request to a site you are already logged into, without you meaning to. Think of a form letter that says "I agree to transfer 100 pounds" and someone slips it under your hand while you are signing something else. Your signature is real; the letter is not what you thought you were signing.

Putting them together: XSS lets an attacker run code in the victim's account page, and CSRF lets that code make requests as the victim. The result can be account information disclosure (the attacker reads the victim's data) or account takeover (the attacker gains control of the account).

The researcher was surprised because real payment cards were linked to every account. That raises the stakes: a takeover is not just a lost login, it is access to payment methods.

Because communication with the subsidiary was difficult, the researcher looked for the security engineer of the main company to report the problems in the subsidiary. This time the process was much faster, and the total reward for all the problems found was revised.

A subsidiary is a smaller company owned by a larger one. The vending service appears to have been run by a subsidiary, while the parent company had its own security team. Going to the parent got a faster response.

Result of the second report

Contact was made with the security engineer at the main company over LinkedIn on 20 March 2019, the technical details were reported the same day, and the bug was confirmed the same day. On 22 March 2019 the researcher was informed about the revised reward and planned fixes, and on 25 March 2019 the reward was transferred. The total was a 300 Euro Amazon gift voucher.

Root cause

The first issue is a design failure: the terminal ran Windows 10 with a high user privilege level, and the shell could be reached with a swipe from the right edge of the screen. The Windows menu could be reached from the screen, and the applications installed on the machine, including TeamViewer, were available from there. The fix was a new application screen locker.

In plain words: the machine was built like a normal PC with a vending app on top, not like a locked kiosk. The swipe was just the easiest way in.

The second issue is the combination of CSRF and XSS in the personal account of the web application. The report does not describe the request, the parameter or the injection point, so the specific coding mistake is not stated.

Two more terms:

  • Output encoding means converting special characters so the browser shows them as text instead of running them as code. If a user types <script>, encoding turns it into something the browser displays, not executes.
  • A CSRF token is a random value the server puts in each form and checks when the form is submitted. A malicious site cannot guess it, so it cannot forge the request. Think of it as a one-time stamp on a form that only the real site can issue.

Impact

On the terminal, the researcher listed possible vectors: recovering credentials at the next login with Mimikatz, monitoring users covertly through TeamViewer, collecting fingerprints from users who can open the refrigerator without an identification card, redirecting traffic, and phishing corporate and Facebook accounts of users who trust a device installed in their office. The traffic redirection vector was not verified and the researcher notes traffic is probably over HTTPS. The fingerprint vector was not exploited, though the device list made it feasible.

In the web application, the CSRF plus XSS vector could lead to account information disclosure, account takeover and similar outcomes.

Fix

The vendor fixed the terminal issue on 28 February 2019 with a new application screen locker.

Variants to test

If you want to look for similar issues yourself, here are the same ideas in beginner-friendly form. Each one says what to do and what a positive result looks like.

  1. Swipe from each screen edge on kiosk terminals in shops, offices and public spaces. A positive result is any operating system menu, taskbar or window appearing over the kiosk application.
  2. Check the privilege level of the kiosk process and whether common administrative tools can be launched from the shell. A positive result is a shell running with rights that allow installing software or reading credentials.
  3. Enumerate installed remote-support software such as TeamViewer on the terminal. A positive result is an application that can be started and used to observe the session.
  4. Look for peripheral management software, such as fingerprint scanner tools, and check whether enrolled users are listed. A positive result is a device list that reveals which users can be targeted.
  5. Test the personal account pages of the web application for reflected or stored input and for state-changing requests without a CSRF token. A positive result is script execution in the account context combined with a request that changes account settings or payment details.
  6. Try the same account flows on related subsidiary services, since the second report to the main company was handled much faster.

A reflected input is one that comes back on the same page immediately (for example, a search term shown in the results). A stored input is one that is saved and shown later to other users (for example, a comment). Both are common places to look for XSS.

Glossary

  • Kiosk appliance: a computer locked down to run only one application, with no access to the desktop or settings.
  • General-purpose operating system: a normal computer system (here, Windows 10) where users can open menus, launch programs and change settings.
  • Privilege level: how much power a program has on a computer; high privilege means it can install software and read other users' data.
  • Attack vector: a path an attacker can take to do something harmful.
  • Mimikatz: a free tool that reads passwords and password hashes out of Windows memory.
  • TeamViewer: a legitimate remote-support program that lets someone see and control another computer's screen.
  • Cached: stored locally for a while so it can be reviewed later.
  • Device list: a list of hardware and software the machine knows about.
  • Traffic redirection: changing network settings so data meant for one destination is sent somewhere else.
  • HTTPS: the encrypted version of web traffic; an attacker who redirects it sees only scrambled data.
  • Phishing: tricking someone into typing their password into a fake page that looks real.
  • Screen locker: a program that forces the kiosk app to stay in front and blocks gestures that would escape to the desktop.
  • XSS (Cross-Site Scripting): when a website puts user-supplied input back on the page without cleaning it, so a malicious script runs in the victim's browser.
  • CSRF (Cross-Site Request Forgery): when a malicious site makes your browser send a request to a site you are already logged into, without you meaning to.
  • Account information disclosure: the attacker reads the victim's account data.
  • Account takeover: the attacker gains control of the victim's account.
  • Subsidiary: a smaller company owned by a larger one.
  • Output encoding: converting special characters so the browser shows them as text instead of running them as code.
  • CSRF token: a random value the server puts in each form and checks on submission, so a malicious site cannot forge the request.
  • Reflected input: input that comes back on the same page immediately, such as a search term shown in results.
  • Stored input: input that is saved and shown later to other users, such as a comment.

More by Valeriy Shevchenko

View all

11 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.