Timing-only models can reliably detect HID injection without content or user profiling
Lightweight keystroke timing models can accurately discriminate human input from automated injection attacks
Security & privacy arXiv 17 Apr 2026 Measurement Prototype evidence
Published as “QUACK! Making the (Rubber) Ducky Talk: A Systematic Study of Keystroke Dynamics for HID Injection Detection”
Why it matters
Deployable, low-overhead keystroke-timing detectors can feasibly protect systems against HID-based injection attacks without compromising user privacy.
Summary
The study finds that lightweight random-forest detectors using only keystroke timing (hold and flight times) can achieve ROC-AUC > 0.9 after observing about 70 keystrokes, enabling early and privacy-preserving detection of HID injection attacks. Detection performance varies across attacker families, with strong generalization when training on representative generators but notable drops for Cond-Bin and Emp-Pair generators. Mixed-generator training can improve robustness but may also degrade performance on specific generators, and inference latency remains low (~90 ms) with constant CPU usage. The paper does not provide an abstract, so the summary is based on the introduction, evaluation, and conclusion sections.
What they found 5
- Random-forest detector reaches ROC-AUC > 0.9 for most synthetic generators after 70 keystrokes, except for Cond-Bin and Emp-Pair.
“UC3 achieves ROC-AUC > 0.9 for all synthetic generators considered in this study, except for Cond-Bin and Emp-Pair (Fig. 9).”
- Detectors trained on Statistical generators generalize well to PRNG generators but fail to generalize to Cond-Bin and Emp-Pair generators.
“Detectors trained on Statistical generators generalize effectively to PRNG generators, achieving consistently high ROC-AUC scores. However, this generalization does not extend to Cond-Bin and Emp-Pair generators, where performance drops significantly.”
- Inference latency of the RF detector stays between ~89 ms and ~94 ms with constant CPU utilization, supporting continuous background deployment.
“preprocessing latency is nearly constant, while inference latency increases only slightly (from ∼89 ms to ∼94 ms, Fig. 10a). CPU utilization also remains constant (Fig. 10b), supporting continuous background deployment.”
- The authors explicitly state the work does not aim to design a defense or evasion solution.
“This work does not aim to design the keystroke injection defense or evasion solution.”
- Mixed-generator configuration BC3 degrades performance on several Statistical and GAN-based generators.
“BC3 exhibits degradation against several Statistical generators and GAN-based samples, despite”
Caveats 4
- Detection performance drops for Cond-Bin and Emp-Pair generators, where ROC-AUC falls below 0.9.
- The BC3 mixed-generator training configuration reduces separability for certain generators despite overall robustness gains.
- This work does not aim to design the keystroke injection defense or evasion solution.
- BC3 exhibits degradation against several Statistical generators and GAN-based samples, despite
What’s new here 4
- Frames keystroke injection detection as a user-independent human-vs-machine discrimination problem.
- Demonstrates that timing-only random-forest models achieve high detection accuracy with minimal computational overhead.
- Shows that coverage of structurally distinct attacker families, rather than model complexity, drives detection robustness.
- Quantifies the trade-off between observation window length and detection latency, identifying 70-keystroke windows as practical.