KeyPrint: Practical Black-box Keystroke Inference Attacks to Mobile Devices

Yunpeng Feng, Daibo Liu, Wenqiang Jin and Liangyi Gong

Abstract

Recent years have shown substantial interest in revealing vulnerability issues of keystroke privacy on smartphones and tablets. While significant prior works have leveraged different techniques to compromise the keystroke security of these mobile devices, existing methods are typically executed on the basic assumption of white-box scenarios where the adversary possesses prior knowledge of the victim's device and usage behavior, or they are conducted within a pre-set trap attack environment. These limitations undermine the practicality and real-world applicability of the proposed methods. In this paper, we present KeyPrint, a practical black-box keystroke inference attack system for mobile devices, without requiring any prior knowledge of the victims and attack scenarios. The primary innovation of KeyPrint is the ability to leverage both on-device acoustic source and attenuation path disparities in device medium to create the fingerprint of keystroke position. To enable their differentiation, we design a theoretical model to represent the keystroke position with the keystroke-induced sonic effect (KiSe) captured by built-in microphones. We also propose a novel approach to mitigate the impact of ambient noise and detect keystroke events, which improves KeyPrint's wide-adaptability. Finally, we propose using machine learning to cluster KiSe samples and infer keystroke content from unlabelled clustering results. We implemented KeyPrint on commercial smartphones/tablets and evaluate the prototypes in typical indoor and outdoor scenarios using different mobile devices. Experiments results demonstrate that KeyPrint can achieve an average accuracy of 55% and 70% for inference on keystroke content when the number of inputted words only reaches 30 and 40, respectively. Leveraging the spatial correlation between numeric and letter keys within the virtual keyboard, KeyPrint effectively reduces the search space for PINs from 10 digits to 10 candidates, with a probability of 63.9%.

Venue
UbiComp / IMWUT 2025
Volume
Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies, Volume 9
DOI
10.1145/3729493
PDF
https://dl.acm.org/doi/pdf/10.1145/3729493
Anthology ID
2025.imwut-9.58

Cite

@article{feng-etal-2025-keyprint,
    title = {{KeyPrint: Practical Black-box Keystroke Inference Attacks to Mobile Devices}},
    author = {Yunpeng Feng and Daibo Liu and Wenqiang Jin and Liangyi Gong},
    journal = {Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies},
    volume = {9},
    issn = {2474-9567},
    year = {2025},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    doi = {10.1145/3729493},
    url = {https://doi.org/10.1145/3729493},
    abstract = {Recent years have shown substantial interest in revealing vulnerability issues of keystroke privacy on smartphones and tablets. While significant prior works have leveraged different techniques to compromise the keystroke security of these mobile devices, existing methods are typically executed on the basic assumption of white-box scenarios where the adversary possesses prior knowledge of the victim's device and usage behavior, or they are conducted within a pre-set trap attack environment. These limitations undermine the practicality and real-world applicability of the proposed methods. In this paper, we present KeyPrint, a practical black-box keystroke inference attack system for mobile devices, without requiring any prior knowledge of the victims and attack scenarios. The primary innovation of KeyPrint is the ability to leverage both on-device acoustic source and attenuation path disparities in device medium to create the fingerprint of keystroke position. To enable their differentiation, we design a theoretical model to represent the keystroke position with the keystroke-induced sonic effect (KiSe) captured by built-in microphones. We also propose a novel approach to mitigate the impact of ambient noise and detect keystroke events, which improves KeyPrint's wide-adaptability. Finally, we propose using machine learning to cluster KiSe samples and infer keystroke content from unlabelled clustering results. We implemented KeyPrint on commercial smartphones/tablets and evaluate the prototypes in typical indoor and outdoor scenarios using different mobile devices. Experiments results demonstrate that KeyPrint can achieve an average accuracy of 55\% and 70\% for inference on keystroke content when the number of inputted words only reaches 30 and 40, respectively. Leveraging the spatial correlation between numeric and letter keys within the virtual keyboard, KeyPrint effectively reduces the search space for PINs from 10 digits to 10 candidates, with a probability of 63.9\%.}
}