Recognition: unknown
QUACK! Making the (Rubber) Ducky Talk: A Systematic Study of Keystroke Dynamics for HID Injection Detection
Pith reviewed 2026-05-10 08:12 UTC · model grok-4.3
The pith
Keystroke timing patterns alone enable robust detection of automated HID injection attacks without accessing typed content or building user profiles.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
Through a systematic study guided by five research questions, we characterize keystroke dynamics for distinguishing human input from machine-generated HID injections. We demonstrate that lightweight models relying only on timing features achieve robust detection, independent of user identity. Our findings indicate that robustness stems from exposure to diverse attack generation strategies rather than model complexity, and we identify optimal sequence lengths for balancing detection speed and reliability.
What carries the argument
Lightweight machine learning classifiers that use only inter-keystroke timing intervals to perform human-versus-automated discrimination on HID input streams.
If this is right
- Detection performance improves more from training on structurally different attack generators than from increasing model size or complexity.
- Reliable classification becomes practical after only a modest number of keystrokes, allowing early intervention before an attack sequence completes.
- Simple speed or regularity heuristics are insufficient because they can be evaded, whereas timing-based models resist basic randomization.
- No user-specific profiles or inspection of actual keystroke content is required, removing major privacy and deployment barriers.
Where Pith is reading between the lines
- Operating systems could incorporate these timing checks at the input driver level to block physical-access USB attacks by default.
- The same timing-only approach might extend to other automated input vectors such as scripted mouse movements or touch events.
- Organizations could add the detection layer to existing security monitoring without new consent or data-retention obligations.
Load-bearing premise
Human keystroke timing distributions stay distinct enough from machine-generated ones even when attackers apply sophisticated randomization, and models trained on known strategies will still work against new ones.
What would settle it
A new attack generator that produces keystroke timing sequences matching the statistical distribution of human typists on previously unseen input lengths, causing the trained timing models to classify them as human at high rates.
Figures
read the original abstract
Modern computing systems inherently trust human input devices, creating an exploitable attack surface for adversarial automation. USB Human Interface Device (HID) emulation attacks, such as those enabled by the USB Rubber Ducky, exploit this assumption to inject arbitrary keystroke sequences while bypassing traditional defenses. Existing countermeasures rely on simple heuristics based on typing speed or timing regularity, which can be easily evaded through basic randomization. Keystroke dynamics analysis offers a more robust alternative by modeling temporal typing behavior. However, prior work frames this problem as behavioral authentication, verifying whether input originates from a specific user rather than detecting automated injection. An alternative approach is continuous monitoring via keylogging integrated with intrusion detection systems, but this requires access to input content, raising significant privacy concerns. In this paper, we provide the first systematic characterization of keystroke dynamics for human-vs-machine discrimination, independent of user identity. Guided by five research questions, we show that robust, privacy-preserving detection is achievable using lightweight models operating solely on timing features, eliminating the need for content access or user profiling. Our analysis reveals that attacker sophistication does not monotonically translate into improved evasion. Instead, robustness depends on exposure to structurally diverse generation strategies rather than increased model complexity. Finally, we quantify the trade-off between detection timeliness and reliability across varying keystroke sequence lengths, identifying practical operating points for early and effective attack interception.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper provides the first systematic characterization of keystroke timing dynamics for distinguishing human typing from automated HID injection attacks (e.g., USB Rubber Ducky), independent of user identity or content. Guided by five research questions, it evaluates timing features for privacy-preserving detection using lightweight models, examines how attacker randomization and sophistication affect evasion, and quantifies the timeliness-reliability trade-off across keystroke sequence lengths. The central claims are that robust detection is achievable without content access or profiling, that robustness depends more on exposure to diverse generation strategies than model complexity, and that attacker sophistication does not monotonically improve evasion.
Significance. If the empirical results hold, the work offers a practical advance in defending against HID emulation attacks by demonstrating effective, lightweight, content-agnostic detection based solely on timing features. The systematic framing via five RQs, the counterintuitive finding on attacker sophistication, and the analysis of sequence-length trade-offs provide actionable insights for IDS design. Strengths include the focus on reproducible timing-based models and explicit privacy benefits over keylogging approaches.
major comments (2)
- [Section 4] Section 4 and RQ results: performance is shown only on the fixed corpus of Rubber Ducky variants plus the studied randomization heuristics. The headline claim of robustness to any future adaptive attacker requires either a covering argument that these strategies span the space of possible inter-keystroke timing distributions or an explicit limitation statement; without it, generalization rests on empirical coverage alone.
- [Research Questions and Evaluation] Methodology and datasets (implied in the five RQs): the abstract and high-level claims rest on experiments whose full participant count, dataset sizes, exact feature definitions, and cross-validation details are needed to verify the reported separation between human and machine timing distributions under randomization.
minor comments (2)
- [Abstract] The abstract could briefly note the scale of the human typing corpus and the number of attack variants evaluated to give readers immediate context for the quantitative claims.
- [Background and Features] Notation for timing features (e.g., inter-keystroke intervals, first- and second-order statistics) should be defined consistently in the main text before the results sections.
Simulated Author's Rebuttal
We appreciate the referee's detailed feedback, which has helped us identify areas to strengthen the presentation of our results and claims. We address the major comments below and will incorporate revisions accordingly.
read point-by-point responses
-
Referee: [Section 4] Section 4 and RQ results: performance is shown only on the fixed corpus of Rubber Ducky variants plus the studied randomization heuristics. The headline claim of robustness to any future adaptive attacker requires either a covering argument that these strategies span the space of possible inter-keystroke timing distributions or an explicit limitation statement; without it, generalization rests on empirical coverage alone.
Authors: We acknowledge that our evaluation is limited to the Rubber Ducky variants and randomization heuristics described in the paper. A formal covering argument for the entire space of possible inter-keystroke timing distributions is not feasible, as this space is continuous and unbounded. However, our central finding is that robustness arises primarily from training on structurally diverse generation strategies rather than model complexity. To address the concern, we will add an explicit limitations paragraph in Section 4 (and the conclusion) stating that while our results demonstrate strong performance against the studied attacks, generalization to arbitrary future adaptive attackers remains an empirical question and may require retraining as new attack strategies emerge. This clarifies that our claims are grounded in the evaluated corpus. revision: yes
-
Referee: [Research Questions and Evaluation] Methodology and datasets (implied in the five RQs): the abstract and high-level claims rest on experiments whose full participant count, dataset sizes, exact feature definitions, and cross-validation details are needed to verify the reported separation between human and machine timing distributions under randomization.
Authors: We thank the referee for highlighting the need for complete methodological details. The participant count, dataset sizes, exact feature definitions, and cross-validation procedure are detailed in Section 3 and Appendix A of the manuscript. To improve accessibility and address the concern, we will add a concise summary of these elements, including a table of key parameters, in the main body of the paper near the description of the research questions. This will ensure that the abstract and high-level claims are transparently supported by the full experimental setup. revision: yes
Circularity Check
No significant circularity; empirical study is self-contained
full rationale
The paper presents an empirical characterization of keystroke timing features for human-vs-machine discrimination in HID attacks. All claims rest on experimental results from collected datasets, model training, and evaluations across attack variants and sequence lengths. No derivation, prediction, or uniqueness claim reduces by construction to fitted parameters, self-definitions, or self-citation chains. Generalization concerns are empirical coverage issues, not circular reductions in the reported analysis.
Axiom & Free-Parameter Ledger
free parameters (1)
- model hyperparameters and thresholds
axioms (1)
- domain assumption Human keystroke timing exhibits natural variability that automated generators cannot perfectly replicate even with randomization
Reference graph
Works this paper leans on
-
[1]
Collection of rubberducky-like payloads,https://github.com/topics/ ducky-payloads?o=desc&s=updated
-
[2]
Fbi warns cybercriminals have tried to hack us firms by mailing malicious usb drives, https://edition.cnn.com/2022/01/07/politics/fbi-usb-hackers-warning
2022
-
[3]
In: 2021 International Conference on Computing, Communication, and Intelligent Systems (ICCCIS)
Arora, L., Thakur, N., Yadav, S.K.: Usb rubber ducky detection by us- ing heuristic rules. In: 2021 International Conference on Computing, Communication, and Intelligent Systems (ICCCIS). pp. 156–160 (2021). https://doi.org/10.1109/ICCCIS51004.2021.9397064
-
[4]
In: 2024 International Conference on Intelligent Systems for Cybersecurity (ISCS)
Arun Jothi, N.T., Anu, S., Harsha, K., Devi Priya, R.: Usb rubber ducky hunter a proactive defense against malicious usb attacks domain: Cybersecurity. In: 2024 International Conference on Intelligent Systems for Cybersecurity (ISCS). pp. 1–6 (2024).https://doi.org/10.1109/ISCS61804.2024.10581045
-
[5]
Caudill, A., Wilson, B.: Making badusb work for you,https://www.youtube.com/ watch?v=xcsxeJz3blI
-
[6]
International Journal of Information Security24(2), 79 (2025)
Chillara, A.K., Saxena, P., Maiti, R.R.: Usb-gate: Usb-based gan-augmented transformer reinforced defense framework for adversarial keystroke injection attacks. International Journal of Information Security24(2), 79 (2025)
2025
-
[7]
In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops
DeAlcala, D., Morales, A., Tolosana, R., Acién, A., Fierrez, J., Hernández, S., Ferrer, M.A., Diaz, M.: Becaptcha-type: Biometric keystroke data generation for improved bot detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops. pp. 1051–1060 (June 2023)
2023
-
[8]
Farhi, N., Nissim, N., Elovici, Y.: Malboard: A novel user keystroke imper- sonation attack and trusted detection framework based on side-channel anal- ysis. Computers & Security85, 240–269 (2019).https://doi.org/https: //doi.org/10.1016/j.cose.2019.05.008,https://www.sciencedirect.com/ science/article/pii/S0167404818309957
-
[9]
Gaines, R.S., Lisowski, W., Press, S.J., Shapiro, N.: Authentication by keystroke timing: Some preliminary results. Tech. rep. (1980)
1980
-
[10]
González, N., Calot, E.P., Ierache, J.S., Hasperué, W.: Towards live- ness detection in keystroke dynamics: Revealing synthetic forgeries. Sys- tems and Soft Computing4, 200037 (2022).https://doi.org/https: //doi.org/10.1016/j.sasc.2022.200037,https://www.sciencedirect.com/ science/article/pii/S2772941922000047
-
[11]
In: Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., Garnett, R
Gulrajani, I., Ahmed, F., Arjovsky, M., Dumoulin, V., Courville, A.C.: Im- proved training of wasserstein gans. In: Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., Garnett, R. (eds.) Advances in Neural Information Processing Systems. vol. 30. Curran Associates, Inc. (2017),https://proceedings.neurips.cc/paper_files/paper/2...
2017
-
[12]
Product page,https://shop.hak5.org/products/ usb-rubber-ducky
Hak5 LLC: USB Rubber Ducky. Product page,https://shop.hak5.org/products/ usb-rubber-ducky
-
[13]
Hazan, I., Margalit, O., Rokach, L.: Securing keystroke dynamics from replay attacks. Applied Soft Computing85, 105798 (2019).https://doi.org/https: //doi.org/10.1016/j.asoc.2019.105798,https://www.sciencedirect.com/ science/article/pii/S1568494619305794
-
[14]
Killourhy, K.S., Maxion, R.A.: Comparing anomaly-detection algorithms for keystroke dynamics. In: 2009 IEEE/IFIP International Conference on Dependable Systems & Networks. pp. 125–134 (2009).https://doi.org/10.1109/DSN.2009.5270346 QUACK! Making the (Rubber) Ducky Talk 23
-
[15]
In: 2019 International Conference on Cyberworlds (CW)
Mhenni, A., Migdal, D., Cherrier, E., Rosenberger, C., Essoukri Ben Amara, N.: Vulnerability of adaptive strategies of keystroke dynamics based authentication against different attack types. In: 2019 International Conference on Cyberworlds (CW). pp. 274–278 (2019).https://doi.org/10.1109/CW.2019.00052
-
[16]
Migdal, D., Rosenberger, C.: Statistical modeling of keystroke dynamics samples for the generation of synthetic datasets. Future Generation Computer Systems100, 907–920 (2019).https://doi.org/https://doi.org/10.1016/j.future.2019.03.056, https://www.sciencedirect.com/science/article/pii/S0167739X18331212
-
[17]
Mirza, M., Osindero, S.: Conditional generative adversarial nets (2014), https://arxiv.org/abs/1411.1784
work page internal anchor Pith review arXiv 2014
-
[18]
In: 2015 IEEE 7th International Confer- ence on Biometrics Theory, Applications and Systems (BTAS)
Monaco, J.V., Ali, M.L., Tappert, C.C.: Spoofing key-press latencies with a generative keystroke dynamics model. In: 2015 IEEE 7th International Confer- ence on Biometrics Theory, Applications and Systems (BTAS). pp. 1–8 (2015). https://doi.org/10.1109/BTAS.2015.7358795
-
[19]
Future Generation Computer Systems16(4), 351–359 (2000)
Monrose, F., Rubin, A.D.: Keystroke dynamics as a biometric for authen- tication. Future Generation Computer Systems16(4), 351–359 (2000). https://doi.org/https://doi.org/10.1016/S0167-739X(99)00059-X, https://www.sciencedirect.com/science/article/pii/S0167739X9900059X
-
[20]
In: 2021 8th International Conference on Signal Processing and Integrated Networks (SPIN)
Negi,A.,Rathore,S.S.,Sadhya,D.:Usbkeypressinjectionattackdetectionviafree-text keystroke dynamics. In: 2021 8th International Conference on Signal Processing and Integrated Networks (SPIN). pp. 681–685 (2021)
2021
-
[21]
Nissim, N., Yahalom, R., Elovici, Y.: Usb-based attacks. Computers & Security70, 675– 688 (2017).https://doi.org/https://doi.org/10.1016/j.cose.2017.08.002, https://www.sciencedirect.com/science/article/pii/S0167404817301578
-
[22]
Rahman, K.A., Balagani, K.S., Phoha, V.V.: Making impostor pass rates mean- ingless: A case of snoop-forge-replay attack on continuous cyber-behavioral verification with keystrokes. In: CVPR 2011 WORKSHOPS. pp. 31–38 (2011). https://doi.org/10.1109/CVPRW.2011.5981729
-
[23]
Serwadda, A., Phoha, V.V.: Examining a large keystroke biometrics dataset for statistical-attack openings. ACM Trans. Inf. Syst. Secur.16(2) (Sep 2013). https://doi.org/10.1145/2516960,https://doi.org/10.1145/2516960
-
[24]
Stanciu, V.D., Spolaor, R., Conti, M., Giuffrida, C.: On the effectiveness of sensor- enhanced keystroke dynamics against statistical attacks. In: Proceedings of the Sixth ACMConferenceonDataandApplicationSecurityandPrivacy.p.105–112.CODASPY ’16, Association for Computing Machinery, New York, NY, USA (2016).https://doi. org/10.1145/2857705.2857748,https:/...
-
[25]
Stefan, D., Shu, X., (Daphne) Yao, D.: Robustness of keystroke-dynamics based biometrics against synthetic forgeries. Computers & Security31(1), 109–121 (2012).https://doi.org/https://doi.org/10.1016/j.cose.2011.10.001, https://www.sciencedirect.com/science/article/pii/S0167404811001179
-
[26]
Stefan, D., Yao, D.: Keystroke-dynamics authentication against synthetic forgeries. In: 6th International Conference on Collaborative Computing: Net- working, Applications and Worksharing (CollaborateCom 2010). pp. 1–8 (2010). https://doi.org/10.4108/icst.collaboratecom.2010.16
-
[27]
University of Amsterdam, System and Network Engineering Master Research Project (2015)
Vouteva, S., Verbij, R., Roos, J.: Feasibility and deployment of bad usb. University of Amsterdam, System and Network Engineering Master Research Project (2015)
2015
-
[28]
In: Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., Garnett, R
Yoon, J., Jarrett, D., van der Schaar, M.: Time-series generative adversarial networks. In: Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., Garnett, R. (eds.) Advances in Neural Information Processing Systems. vol. 32. Curran Associates, Inc. (2019),https://proceedings.neurips.cc/paper_files/paper/2019/file/ c9efe5f26cd17ba6216bbe2...
2019
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.