How we built our badge and reverse engineering vending machines
The speakers detail the hardware and firmware development process for a custom conference badge, including the integration of a Raspberry Pi Pico and the implementation of a custom Doom port. They also discuss the reverse engineering of an FSI Model 3159 snack vending machine, focusing on its proprietary motor control and matrix-addressed hardware. The talk provides insights into embedded systems security, hardware hacking, and the challenges of managing supply chain logistics for custom hardware projects.
Reverse Engineering Vending Machines and Custom Badge Security
TLDR: This research highlights the security implications of custom embedded hardware, specifically focusing on the reverse engineering of an FSI Model 3159 snack machine and the development of a custom conference badge. By mapping proprietary motor control logic and exploiting memory constraints in embedded systems, the researchers demonstrate how physical hardware can be manipulated to bypass intended functionality. Pentesters should view these findings as a blueprint for identifying similar logic flaws in industrial control systems and IoT devices.
Hardware hacking often feels like a black box, but the reality is that most industrial and commercial systems rely on predictable, if obscure, logic. When we look at a vending machine, we see a simple interface for buying snacks. When a researcher looks at one, they see a matrix-addressed motor controller, proprietary ASICs, and a potential goldmine for unauthorized access. The recent work presented on the FSI Model 3159 snack machine serves as a reminder that physical security is only as strong as the underlying firmware and hardware logic.
The Anatomy of a Vending Machine Exploit
Reverse engineering the FSI Model 3159 required a deep dive into its motor control system. Unlike modern, network-connected IoT devices that might have a clear API, this machine relies on a legacy architecture where motors are matrix-addressed and rotation is monitored via current sensing. The original board used custom ASICs and a significant amount of glue logic to manage these operations.
The researchers identified that the machine’s logic could be manipulated by intercepting the signals between the keypad and the controller. By replacing the proprietary board with an Arduino Mega, they were able to simulate the keypad inputs and control the motors directly. The key technical challenge here was understanding the current sensing mechanism. The machine detects a successful vend by monitoring the spike in current when a motor completes a rotation. If you can spoof that current signature, you can trick the controller into believing a product was dispensed without actually triggering the motor.
Memory Constraints and Firmware Security
The second part of this research focused on the development of a custom conference badge built around the Raspberry Pi Pico. The goal was to port the classic Doom engine to the badge, which introduced significant memory and graphics rendering challenges.
When working with the RP2040, you are limited by the available SRAM. The researchers discovered that standard Doom ports are often too resource-intensive for such constrained environments. To make it work, they had to implement a custom rendering engine that utilized scan-line drawing instead of full-frame buffering. This technique is significantly more efficient, allowing the badge to render about 70 to 80 percent of the screen at any given time.
For the remaining screen real estate, they painted a static image on the HUD. This is a classic example of resource exhaustion management in embedded systems. If you are auditing firmware for a similar device, look for these types of shortcuts. They often introduce vulnerabilities where input validation is sacrificed for performance. If the rendering engine doesn't properly sanitize the memory addresses used for the HUD, you might find an entry point for memory corruption.
Practical Implications for Pentesters
If you encounter a similar vending machine or industrial controller during an engagement, do not assume the hardware is secure just because it lacks a network interface. The attack surface is physical. Look for the communication protocol between the keypad and the main board. If it is a simple matrix-addressed system, you can often sniff the traffic with a logic analyzer or a simple microcontroller.
The OWASP Embedded Application Security project provides a solid framework for assessing these risks. When testing, focus on:
- Input Validation: Can you send malformed commands to the motor controller that cause it to enter an undefined state?
- Firmware Integrity: Is the firmware signed? If you can dump and modify the binary, can you bypass authentication or payment checks?
- Side-Channel Analysis: Does the power consumption of the device change in a predictable way when a valid vs. invalid command is processed?
In the case of the snack machine, the researchers used a POE switch for future expansion, which opens up a network-based attack vector. Once you have a network-connected device, you are back in the realm of traditional network security, where you can look for vulnerabilities in the web server or API endpoints that manage the machine's inventory and sales data.
Moving Forward
Hardware security is not just about preventing physical tampering. It is about understanding the entire lifecycle of the device, from the supply chain to the final deployment. The researchers faced significant hurdles, including supply chain delays and hardware failures, which are common in custom projects.
If you are interested in this space, start by picking up a Raspberry Pi Pico and experimenting with custom firmware. The best way to understand how to break these systems is to build them yourself. When you understand the constraints of the hardware, the vulnerabilities become much easier to spot. Don't just look for bugs; look for the design decisions that were made to save time or money, as those are almost always where the most interesting flaws reside.
Vulnerability Classes
Tools Used
Target Technologies
All Tags
Up Next From This Conference

Breaking Secure Web Gateways for Fun and Profit

Listen to the Whispers: Web Timing Attacks That Actually Work

Abusing Windows Hello Without a Severed Hand
Similar Talks

Inside the FBI's Secret Encrypted Phone Company 'Anom'

Kill List: Hacking an Assassination Site on the Dark Web

