Keypocalypse
Emilien Le Jamtel (DevSecOps Team Lead · CERT-EU)
Insomni'hack 2026 · Day 1 · Main Track
Overview
Modern mechanical keyboards have evolved far beyond simple input devices. Equipped with embedded microcontrollers, RAM, flash memory, and advanced software layers, today's keyboards are essentially auxiliary computers connected directly to workstations. In this talk, Emilien Le Jamtel, DevSecOps Team Lead at CERT-EU, explores the hidden security risks associated with modern custom mechanical keyboards and their open-source firmware ecosystems. Dubbed "Keypocalypse," the presentation investigates how attackers can weaponize keyboard firmware to achieve persistent, endpoint-evasive compromise.

Key moments
- 0:00 Introduction and speaker background
- 2:00 Mechanical keyboard anatomy and supply chain overview
- 6:00 Modern keyboard hardware, software, and open-source firmwares
- 14:00 Threat modeling and offensive capabilities of keyboards
- 24:00 Live demo: Remote firmware flashing and macro attacks
- 30:00 Mitigation strategies and zero-trust keyboard implementation
- 32:38 Live demo: Zero-trust cryptographic challenge response
- 38:00 Audience Q&A session
Keypocalypse
Speakers: Emilien Le Jamtel (DevSecOps Team Lead, CERT-EU)
Conference: Insomni'hack
YouTube: https://www.youtube.com/watch?v=sinhjBmZeNc
Overview
Modern mechanical keyboards have evolved far beyond simple input devices. Equipped with embedded microcontrollers, RAM, flash memory, and advanced software layers, today's keyboards are essentially auxiliary computers connected directly to workstations. In this talk, Emilien Le Jamtel, DevSecOps Team Lead at CERT-EU, explores the hidden security risks associated with modern custom mechanical keyboards and their open-source firmware ecosystems. Dubbed "Keypocalypse," the presentation investigates how attackers can weaponize keyboard firmware to achieve persistent, endpoint-evasive compromise.
The research matters because mechanical keyboards have exploded in popularity among programmers, security professionals, and enthusiasts who frequently connect personal, high-end hardware to corporate networks. Because enterprise security monitoring tools rarely inspect USB Human Interface Device (HID) endpoints or analyze device firmware integrity, a compromised keyboard can serve as an invisible, long-term persistence mechanism. Le Jamtel demonstrates how adversaries can leverage legitimate firmware configuration protocols—specifically QMK (Quantum Mechanical Keyboards) and VIA—to dynamically install malicious payloads without triggering standard endpoint detection and response (EDR) solutions.
Background
▶ Watch: Introduction and speaker background (0:00)
Mechanical keyboards have experienced a massive resurgence, driven largely by the gaming industry and professional typists seeking tactile feedback and rapid actuation. While legacy keyboards relied on basic microcontrollers and proprietary ROM chips, modern enthusiast keyboards run sophisticated open-source operating environments. Projects like QMK support over 3,000 different keyboard models, utilizing microcontrollers ranging from legacy 8-bit Atmel AVR ATmega32U4 chips to modern, high-performance Raspberry Pi RP2040 silicon.
Concurrently, configuration tools like VIA provide user-friendly web interfaces—accessible directly through browsers via Web HID—allowing users to remap keys, adjust RGB lighting, and record macros on the fly without recompiling firmware. However, this flexibility introduces significant supply chain and architectural risks. While the market leadership for key switches remains in Europe (notably Germany), over 80% to 90% of keyboard PCBs (Printed Circuit Boards) and assembly take place in manufacturing hubs in China and Taiwan. This global supply chain creates opportunities for malicious firmware modification, third-party vendor tampering, and insecure distribution channels.
Key Findings
▶ Watch: Modern keyboard hardware, software, and open-source firmwares (6:00)
Le Jamtel’s research into keyboard firmware security highlights several critical attack vectors that transform standard input peripherals into offensive security tools:
- Firmware as a Persistence Mechanism: Modern keyboards possess non-volatile storage (EEPROM / flash memory) capable of storing custom code, key logs, and execution triggers that evade traditional antivirus and XDR solutions running on the host operating system.
- Abuse of VIA Endpoints: VIA creates a secondary HID endpoint alongside standard keystroke reporting, allowing bidirectional communication between host software and the device. This protocol includes command IDs capable of remapping keys, executing macros, and triggering firmware resets.
- Insecure Supply Chain and Firmware Distribution: Third-party and budget vendors frequently distribute compiled binaries or configuration files through unverified channels (such as untrusted Google Drive links), often omitting source code modifications required by open-source licenses like QMK.
- Air-Gapped Exfiltration Potential: Keyboards equipped with Bluetooth, 2.4 GHz wireless adapters, or programmable RGB lighting (capable of Morse-code visual signaling or covert RF transmission) can theoretically capture keystrokes in secure environments and exfiltrate data when reconnected to unsecure personal networks.
Technical Deep Dive
▶ Watch: Live demo: Remote firmware flashing and macro attacks (24:00)
Modern QMK-based firmware architectures allocate dedicated memory spaces for operational logic, keymaps, and runtime configurations. When VIA is enabled, the firmware exposes a secondary USB HID endpoint that parses incoming vendor-defined report IDs. Examining the QMK header files reveals powerful command identifiers, including functions to dynamically reassign keycodes, modify layers, and interact with the EEPROM.
The technical mechanics of the attack rely on manipulating these endpoint capabilities. Specifically, command ID 0x05 allows host-side scripts to assign a reset keycode to a specific physical key on the keyboard.
Once a key is bound to a reset function, the adversary can induce the keyboard to enter DFU (Device Firmware Upgrade) or bootloader mode. On Atmel chipsets, this requires specific bootloader handshakes; on RP2040 controllers, it maps a virtual drive where new binary payloads can be dropped instantly. Because the host operating system recognizes the device as a standard keyboard throughout the process, kernel-level input monitoring typically fails to flag the transition.
Demo / Proof of Concept
▶ Watch: Mitigation strategies and zero-trust keyboard implementation (30:00)
Le Jamtel demonstrated a complete, end-to-end endpoint compromise and firmware replacement chain during the talk.
Assuming an initial foothold on a target workstation via traditional malware, the attacker identifies that the victim is using a QMK-compatible macro pad. The attack unfolds in distinct phases:
- Endpoint Enumeration & Macro Assignment: Using a script interacting with the VIA Web HID endpoint, the attacker queries the keyboard's descriptors, records a macro containing malicious payload execution commands (such as opening a PowerShell instance, executing a
curlcommand to download a secondary script, and closing the window), and assigns it to a macro key (M0). Simultaneously, another key is assigned theRESETkeycode. - Triggering Firmware Flashing: The victim presses the assigned reset key, causing the microcontroller to reboot into bootloader mode.
- Malicious Flash Deployment: Monitoring the device state from the compromised workstation, the attacker immediately deploys a custom, malicious QMK binary over the DFU interface.
- Trace Erasure: The attack script clears the VIA configuration, removing the temporary macro and reset bindings from the EEPROM to eliminate forensic artifacts in the user-facing configuration interface.
- Execution: Subsequent presses of the designated keys execute the embedded firmware-level payload directly, bypassing software security controls entirely.
To counter this, Le Jamtel demonstrated a defensive prototype: a custom keyboard daemon running on the host paired with a keyboard hardcoded with a private cryptographic key. When connected, the host workstation issues a cryptographic challenge; only if the keyboard correctly solves the challenge using its embedded private key does the daemon authorize the HID input endpoints.
Defensive Implications
▶ Watch: Audience Q&A session (38:00)
Defenders must recognize that peripherals represent an unmonitored trust boundary. Organizations should implement several mitigation strategies to address hardware-level risks:
- Enforce Endpoint Peripherals Control: Restrict unauthorized USB devices using endpoint management software, and block unverified HID endpoints where feasible.
- Disable VIA in Corporate Hardware Builds: When deploying organization-approved mechanical keyboards or compiling custom QMK firmware, disable VIA and dynamic configuration features in the source configuration (
rules.mk) to prevent runtime remapping and macro injection. - Standardize and Audit Firmware: Organizations should maintain internal repositories of approved, audited firmware binaries for standardized hardware, rather than allowing employees to flash unverified third-party code.
- Implement Zero-Trust Peripherals: Adopt input-validation daemons or hardware security tokens that require cryptographic authentication between the peripheral device and the host operating system before accepting HID events.
Key Takeaways
- Mechanical keyboards operate as fully functional auxiliary computers equipped with microcontrollers, RAM, and flash memory.
- Open-source firmware frameworks like QMK and configuration layers like VIA can be abused by compromised endpoints to achieve invisible, persistent code execution.
- Attackers with initial workstation access can dynamically remap keys, trigger bootloader modes, and flash malicious firmware within seconds.
- Standard endpoint detection and response (EDR) agents and antivirus solutions rarely inspect USB HID communication or validate peripheral firmware integrity.
- Implementing zero-trust host-to-keyboard authentication helps ensure that only cryptographically verified peripherals can transmit keystrokes.
About the Speaker(s)
- Emilien Le Jamtel (DevSecOps Team Lead, CERT-EU): Emilien Le Jamtel has been a cyber security expert for 15 years, with experience in penetration testing, red teaming, threat intelligence analysis, and digital forensics and incident response. Since 2021, he has led the DevSecOps team at CERT-EU, responsible for the infrastructure and tooling used to deliver services to European Union entities.