Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
BadUSB describes attacks where a USB device reprogrammes its own controller firmware to impersonate a keyboard, network adapter, or storage device and run commands the moment it is plugged in.

What Is BadUSB?
Plug a USB stick into a workstation and the operating system asks it what it is. BadUSB is the family of attacks that answer that question dishonestly. By reprogramming the microcontroller inside the device, an attacker turns what looks like ordinary storage into a keyboard that types commands, a network adapter that redirects traffic, or a composite device that does both while still presenting a working filesystem to the user.
Karsten Nohl and Jakob Lell presented BadUSB at Black Hat in August 2014. Their point was structural rather than incidental: USB controller firmware on many commodity devices could be rewritten over the bus itself, the USB specification contains no requirement for firmware signing, and the host has no way to verify that a device is what it claims. Within two months, proof-of-concept code was public, and the technique moved from conference talk to commodity tooling.
The economics changed again when purpose-built hardware appeared. A Rubber Ducky or a Digispark board costs a few pounds and needs no firmware reverse engineering at all; it is simply a keyboard with a script. The O.MG cable hides the same capability inside a charging lead with a wireless control channel, and the device is externally indistinguishable from the genuine article.
Human interface device emulation is the dominant pattern. The device enumerates as a keyboard, waits a second or two for driver installation, then types faster than any human: open a run dialogue, launch PowerShell with an encoded command, fetch a payload, exit. The whole sequence completes in under five seconds and leaves a process creation event rather than any removable media artefact.
Other variants matter too. A device that claims to be a USB Ethernet adapter can win the route for DNS or DHCP on many systems and silently intercept traffic, a technique used by tools such as the Bash Bunny. USB Killer devices discharge stored voltage back into the port and physically destroy the host, which is sabotage rather than intrusion but arrives through the same socket. And plain old infection by file still works: Stuxnet spread through USB media into air-gapped Iranian facilities, and the Raspberry Robin worm has used malicious LNK files on USB drives since 2021 as an initial access vector for ransomware crews.
The FBI issued a flash alert in January 2022 describing FIN7 posting BadUSB devices to organisations in defence, transport, and insurance. The packages imitated the US Department of Health and Human Services or Amazon, included a decoy gift card or a COVID-19 guidance letter, and contained a LilyGO-style board that emulated a keyboard and ultimately delivered ransomware tooling. Earlier campaigns from the same group used Best Buy branding.
That is the detail defenders tend to miss: the attack does not require physical access by the attacker. It requires an envelope, a plausible brand, and one employee who plugs the device in to find out what it is.
explorer.exe spawning an interpreter within seconds of a new HID enumeration, and on unexpected network adapters taking priority.For segregated or operational technology networks, add a data diode or a scanning kiosk so that files arriving on removable media are transferred without the original device ever touching a production host. Our Hardware Penetration Test Services include drop tests with implanted cables and devices to show how far one of these reaches inside your estate.
Not at the hardware level. There is no file to scan, because the device presents itself as a legitimate keyboard or network adapter and the malicious behaviour is in its firmware. Detection depends on what happens next: the commands typed, the process that is launched, or the payload downloaded. Endpoint detection products catch the second stage, not the device itself.
No. Autorun protection stops files executing automatically from removable storage, which is a different attack. A BadUSB device never asks the operating system to run anything from a disk; it emulates a keyboard and types the commands itself, so the host sees ordinary user input. The controls that help are device installation restrictions and execution control.
A cable from a known supplier is fine. Malicious variants such as the O.MG cable hide a microcontroller and a wireless radio inside a standard connector, and look identical to a genuine lead. The practical advice for travelling staff is to carry their own cable and a data-blocking adapter, and never to use a lead or charging point found in a hotel, lounge, or conference room.
Block mass storage by default and allow encrypted corporate devices by hardware ID, which covers the common data exfiltration case. For keyboards and other HID devices, use a policy that permits currently connected hardware and requires approval for anything new, so that staff keep working while an unexpected keyboard raises an alert for the security team to review.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.