In this guide
How Malicious USB Cables Work — and How Current Profiling and Wireless Scanning Detect Them
A USB cable looks like the simplest object on your desk: plastic, copper, two connectors. That simplicity is the whole problem. The cable is also a trusted bridge between two computers — your phone and a charger, your laptop and a public port — and anything hidden inside that bridge inherits the trust of both ends. This guide explains, at concept level, how a doctored cable works, why it is hard to spot by eye, and how two independent detection ideas — current profiling and wireless-beacon scanning — expose it. It also explains what detection cannot prove, and why a physical data-blocker remains the safest default for a cable you do not trust.
What is actually inside an ordinary USB cable
A standard USB cable carries four things that matter here: power lines (VBUS and ground), a pair of data lines (D+ and D-), shielding, and the connector shells. When you charge a phone, current flows on the power lines and nothing needs to happen on the data lines at all. When you transfer files, the host and the device negotiate over the data lines and exchange data in packets.
That split — power versus data travelling on separate wires inside one jacket — is the key to the whole topic. A cable that only charges needs just the power lines. A cable that also talks to the host needs the data lines. And a cable that hides electronics needs power for those electronics, which it steals from the very same power lines it is supposed to pass through untouched.
A related Projectech build applies these ideas in a working detector: WireBadger-Inspired Malicious USB Cable Detector.
How a doctored cable works, in concept
A doctored cable contains a tiny circuit board hidden inside one of its connector housings, where the housing is just large enough to conceal it. At concept level, such a board has three jobs:
- Stay powered. It draws a small current from the cable's power lines whenever the cable is plugged in, whether or not a device is attached. This is its most reliable tell: a plain cable has no reason to consume power on its own.
- Stay reachable. Some designs communicate over a wireless link — Wi-Fi or Bluetooth Low Energy (BLE) — so an attacker nearby can reach the hidden board without touching the cable again. Wireless communication means the board must transmit, and transmitting means advertising its presence in a way a scanner can hear.
- Use the data lines. When the cable is connected to a host, the hidden board can present itself to that host as an input device, such as a keyboard. A host trusts keyboards by design: keystrokes from a plugged-in keyboard are executed without a password prompt. That trust is what makes the attack class serious, and it is also why this guide describes the mechanism only at concept level and gives no instructions for building or using such a device.
The well-known example in this category is the O.MG Cable, an authorized penetration-testing tool sold to security professionals for testing their own systems with permission. Its existence matters for students for one reason: it proves the attack class is real, miniaturised and commercially available — not a movie prop. The defensive question is therefore practical, not theoretical: given a cable of unknown origin, how do you decide whether to trust it?
Why you cannot tell by looking
Connector housings are opaque, moulded plastic. A hidden board the size of a fingernail fits inside a standard USB-C or USB-A shell, and the cable's weight, flexibility and appearance change by less than a careful user could notice. X-ray inspection would reveal it, but nobody X-rays a charging cable. This is why detection has to be behavioural — measuring what the cable does, not how it looks.
Two behaviours are available to measure without opening the cable:
- What it consumes. Current drawn from the power lines while the cable is idle.
- What it says. Wireless signals that appear while the cable is connected.
Each channel alone is weak evidence. Together, they are much stronger, because a single fault rarely explains both at once.
Detection idea 1: current profiling
Every electronic circuit draws current, and the amount it draws has a shape over time: a brief inrush when power is first applied, then a steady idle draw, then changes as it works. A plain cable has no circuit of its own, so its idle draw is effectively zero and its current trace simply follows whatever the attached device demands.
Current profiling means recording that trace and comparing it with a baseline — the trace of a plain cable measured under the same conditions. The comparison looks at three features:
- Idle draw. Current flowing when no device is charging. A plain cable shows near zero; a cable with hidden electronics shows a small but persistent draw.
- Inrush. The spike when power is first connected. Hidden circuits add their own startup signature on top of the device's.
- Steady-state shape. The level the trace settles at during a test window, compared with the baseline level.
The instrument for this is a current sensor in series with the power line. The INA219, a common choice for student builds, measures bus voltage and current over I2C and reports them digitally, so firmware can log a full trace instead of a single reading. A single reading is easy to fool or misread; a trace with a baseline is evidence.
Current profiling has limits worth stating plainly. A very low-power implant may draw current below the noise floor of a bench sensor, and a faulty cable or an unstable charger can shift a trace for innocent reasons. That is why a responsible verdict from current data alone is "anomalous", not "malicious".
Detection idea 2: wireless-beacon scanning
Wi-Fi and Bluetooth Low Energy devices announce themselves. A Wi-Fi device looking for a network sends probe requests; a BLE device advertising its services broadcasts advertisement packets containing a name and service identifiers at regular intervals. Any radio in range can hear these broadcasts — that is how your phone builds its list of available networks and nearby accessories.
A wireless scan during a cable test works by difference, not by absolute list:
- Sweep the air first with no cable connected, and record the networks and advertisements already present — the lab router, nearby phones, the building's access points.
- Connect the cable under test and sweep again.
- Flag only the signals that are new to the second sweep.
This differencing step is essential. Without it, every ordinary device in the room would look suspicious. With it, a beacon that appears only while the cable is connected becomes a second, independent piece of evidence pointing at the cable.
The two channels corroborate each other. A cable that both draws unexplained idle current and brings a new wireless beacon into the room is far more suspicious than a cable that shows only one anomaly. A cable that shows neither is not proven clean — a radio-silent implant that sleeps between bursts could still pass — but it has passed every test available at bench level, and that result is honestly reportable as "no evidence found".
Detection idea 3: the data-blocker, or why prevention beats detection
Detection is probabilistic; prevention can be absolute, at least for one threat. A USB data-blocker is a small adapter (or a switch inside a detector) that physically disconnects the D+ and D- data lines while leaving VBUS and ground connected. Power flows, data cannot.
With the data lines cut, a hidden board inside a cable cannot present itself to the host as a keyboard or any other device, because there is no electrical path for its data to travel on. The cable can still charge. It cannot exfiltrate, inject input, or negotiate a data connection. This is the principle behind the data-disable switch built into commercial detectors such as WireBadger, and it is the correct default for any cable you must use but cannot verify: charge through a blocker, transfer data only through cables that passed inspection.
A data-blocker is not a cure-all. It does nothing about a faulty cable delivering wrong voltage, and it cannot protect a host that is already compromised. But for the specific threat of a doctored cable, it converts an uncertain detection problem into a certain prevention guarantee for the data path.
How commercial detectors put it together
Commercial detectors combine these ideas into a staged check, and the staging is the lesson. Berkeley Varitronics Systems' WireBadger, whose commercial availability was announced on 20 October 2026 and which earned a Special Mention in TIME's Best Inventions of 2026, is reported to analyse a cable's electrical current consumption and scan for suspicious Wi-Fi and BLE activity, with a built-in USB-C data-disable switch. The stages matter because each stage answers a different question: current profiling asks "does this cable consume power it should not?", wireless scanning asks "does this cable talk when it should not?", and the data-disable switch answers "what do I do while I am unsure?" — charge, but do not connect data.
A student-scale detector can reproduce the same three stages with commodity parts: an INA219 for current, an ESP32-S3 for Wi-Fi and BLE scanning, an OLED for the verdict, and a slide switch for the data lines. The commercial instrument will be more sensitive and more polished; the method is the same, and the method is what is worth learning.
Practical habits for everyday cable use
You do not need a detector to reduce most of the risk. These habits follow directly from the physics above:
- Treat found cables as untrusted. A cable left in a conference hall, a hotel room or a shared lab bench has unknown provenance. Charge through a data-blocker, or do not use it.
- Prefer your own cable for data. File transfers and device setup should use a cable you bought yourself and have never lent out.
- Use a data-blocker at public ports. Airport and hotel USB charging ports combine an unknown port with, often, a borrowed cable — two unknowns at once. A blocker removes the data risk from both.
- Watch for the tell-tale signs. A cable that feels warm while idle, or a new unknown Bluetooth device that appears whenever a particular cable is plugged in, is worth quarantining and checking.
- Never test on someone else's device. Detection experiments belong on your own hardware, with your own cables and a benign test setup — never on a borrowed phone or a lab machine you do not own.
Limitations of detection
Detection, honestly described, has boundaries that students and professionals alike must respect:
- A clean result is not a proof of innocence. A well-designed implant can sleep, draw tiny currents and transmit rarely. Absence of evidence is not evidence of absence.
- A suspect result is not a proof of guilt. Faulty cables, noisy supplies and unrelated nearby beacons can all produce false flags. A suspect cable should be quarantined and re-tested, not publicly accused.
- Detectors test cables, not chargers or hosts. A compromised charger or an already-infected host is outside the scope of a cable detector, and no cable verdict says anything about them.
- Radio scanning sees advertisements, not intent. A beacon's name and signal strength do not identify its owner with certainty. Treat an unexpected beacon as a flag, not an identification.
Frequently asked questions
Can a phone or laptop detect a doctored cable on its own?
No, not reliably. A host sees whatever device the cable presents, and it trusts input devices by design. The host has no independent view of the cable's idle current draw or of wireless signals the cable emits, because it is not measuring either channel. That is why detection needs an instrument sitting between the charger and the cable, measuring current and scanning the air from outside the host's trust boundary.
Why do detectors compare against a baseline instead of using a fixed threshold?
Because "normal" current depends on the charger, the attached device and the cable length. A fixed threshold that is safe for one setup will false-alarm on another. A baseline — the same measurement taken with a known-good cable under the same conditions — cancels out those variables, so the comparison isolates what is different about the cable under test rather than what is different about the setup.
Is a data-blocker the same as a charge-only cable?
In effect, yes for the data path. A charge-only cable is manufactured without data wires at all, while a data-blocker is an adapter or switch that disconnects the data wires of an existing cable. Both give the same guarantee: power flows, data cannot. The blocker has the advantage that it can be applied to any cable, including one you already own.
Does this guide teach how to build an attack cable?
No. It explains the attack class at concept level — what hidden electronics need (power, reachability, a data path) and what signals they leave — because defenders cannot detect what they do not understand. It gives no instructions, schematics or code for building, programming or using a doctored cable, and any student work in this area must use only benign test setups: a BLE beacon and a resistor load that simulate the detectable signals without any harmful capability.
What should a student project in this area actually deliver?
A defensible student project delivers three things: a detector that measures current against a baseline, a wireless scan that flags signals new to the test window, and a verdict rule that reports CLEAR, SUSPECT or UNKNOWN with reasons — plus a test procedure that proves the detector catches a benign simulated rogue and passes known-good cables. The report's strongest chapter is usually the limitations section, where the student states plainly what the detector cannot catch.
Limitations
This guide describes detection concepts, not a forensic certification. Current profiling and wireless scanning raise the cost and risk for a doctored cable, but they cannot guarantee that any given cable is clean, and they cannot identify the owner of an unexpected wireless signal. Commercial detectors such as WireBadger implement these stages with greater sensitivity than a student build, and even they report findings as detections, not as legal proof. The practical conclusion is a habit, not a gadget: verify what you can, block data by default for cables you cannot verify, and never test detection ideas on hardware that is not yours.