An Introduction to Reverse Engineering
This talk provides a foundational introduction to the reverse engineering process, covering both hardware and software analysis techniques. The speaker demonstrates how to identify components on an Arduino board, perform continuity testing, and extract firmware for analysis. The session concludes with a practical walkthrough of using Ghidra to decompile binary code and identify hardcoded credentials. This presentation is designed for beginners looking to understand the fundamentals of hardware and software inspection.
From Silicon to Shell: Extracting Secrets from Arduino Hardware
TLDR: This talk demonstrates a practical workflow for hardware-based reverse engineering, moving from physical component identification to firmware extraction and binary analysis. By using a multimeter for continuity testing and tools like Ghidra for decompilation, researchers can uncover hardcoded credentials that often remain hidden in plain sight. This process highlights how easily OWASP A07:2021 – Identification and Authentication Failures manifest in embedded systems when developers treat firmware as a black box.
Hardware security often feels like a dark art, reserved for those with expensive logic analyzers and specialized lab equipment. Most software-focused researchers treat the physical device as an impenetrable wall, assuming that if they cannot see the source code, the logic is secure. This assumption is dangerous. As demonstrated in this research, the barrier to entry for hardware reverse engineering is significantly lower than many realize, and the payoff—often in the form of hardcoded credentials—is immediate.
The Physical Reconnaissance Phase
Before touching a single line of code, you must understand the hardware. The talk emphasizes that reverse engineering begins with identifying the components on the PCB. Using a multimeter to perform continuity testing is the most reliable way to map out the board's architecture. By identifying power and ground pins, you can verify the board's health and trace the connections between the microcontroller and other peripherals.
This step is not just about curiosity; it is about mapping the attack surface. When you identify the microcontroller—in this case, the ATmega328P—you gain access to its datasheet, which reveals the communication protocols it supports, such as UART or SPI. These ports are your gateway to the firmware. If a manufacturer leaves these diagnostic ports exposed, they are essentially handing you the keys to the kingdom.
Firmware Extraction and Binary Analysis
Once the hardware is mapped, the next step is dumping the firmware. The research utilizes flashrom and AVRDUDE to pull the binary data directly from the chip. This process transforms a physical object into a file you can manipulate on your workstation.
After you have the binary, the real work begins. Using binwalk allows you to identify the file structure and extract embedded files. The goal here is to move from raw machine code to something human-readable. This is where Ghidra becomes indispensable. By loading the binary into the decompiler, you can view the C-like representation of the assembly code.
The following command is a standard starting point for inspecting the binary structure before decompilation:
objdump -D -m avr firmware.bin
This command disassembles the binary, allowing you to look for function calls or data structures that look suspicious. In the context of the demo, the researcher identified a main function that handled user input. By analyzing the decompiled output, they located hardcoded strings that were being compared against user-provided credentials.
Identifying Hardcoded Credentials
The most common finding in these engagements is the presence of hardcoded secrets. Developers often embed usernames and passwords directly into the firmware to simplify testing or automated deployments. Because these devices are rarely updated, these credentials remain static for the entire lifecycle of the product.
When you perform a search for strings within the decompiled code, you are looking for patterns that resemble authentication logic. In the provided example, the researcher used the Ctrl+F search function within the decompiler to find specific data types. They discovered that the firmware stored characters of a password at distinct memory locations. This is a classic example of OWASP A07:2021, where the authentication mechanism relies on secrets that are easily extracted by anyone with physical access to the device.
Defensive Realities
Defending against this level of access is difficult once the device is in the hands of an attacker. However, the primary failure here is the reliance on "security through obscurity." If your authentication logic depends on the secrecy of the firmware, you have already lost.
Manufacturers should implement secure boot mechanisms to prevent unauthorized firmware modification and ensure that sensitive data is never stored in plaintext within the binary. For developers, the takeaway is clear: treat your firmware as if it will be decompiled. If you are hardcoding credentials, you are creating a vulnerability that cannot be patched without a physical recall.
What to Do Next
If you are a pentester, stop ignoring the hardware. The next time you are on an engagement involving IoT devices or embedded systems, look for the debug headers. If you find a UART port, you have a potential entry point. If you are a developer, audit your build process to ensure that no secrets are being baked into your production binaries.
Reverse engineering is a skill built on repetition. Start by picking up a cheap Arduino, dumping its firmware, and trying to find the main loop in the decompiler. The tools are free, the documentation is abundant, and the vulnerabilities are everywhere. The only thing standing between you and a successful exploit is the time you spend practicing the process.
Vulnerability Classes
Target Technologies
Attack Techniques
OWASP Categories
All Tags
Up Next From This Conference
Similar Talks

Hacking Apple's USB-C Port Controller

Unmasking the Snitch Puck: The Creepy IoT Surveillance Tech in the School Bathroom




