I've been thinking about this for a while; I know people are aware of wireless wiretapping of keyboards. However, has there been research on how to wiretap keyboards based on typing patterns? I'm thinking whether microphones can be used to build a model of typing patterns to extrapolate what someone is typing on a keyboard.
This is known as "Acoustic Keyboard Eavesdropping". In 2004 Dmitri Asonov and Rakesh Agrawal from IBM published a paper (pdf) that describes such an attack. The following is the abstract of that paper:
We show that PC keyboards, notebook keyboards, telephone and ATM pads are vulnerable to attacks based on differentiating the sound emanated by different keys. Our attack employs a neural network to recognize the key being pressed. We also investigate why different keys produce different sounds and provide hints for the design of homophonic keyboards that would be resistant to this type of attack.
Berkeley researchers reached similar results in a paper published in 2005 (pdf). The following is taken from the abstract of that paper:
We examine the problem of keyboard acoustic emanations. We present a novel attack taking as input a 10-minute sound recording of a user typing English text using a keyboard and recovering up to 96% of typed characters. There is no need for training recordings labeled with the corresponding clear text. A recognizer bootstrapped from a 10-minute sound recording can even recognize random text such as passwords: In our experiments, 90% of 5-character random passwords using only letters can be generated in fewer than 20 attempts by an adversary; 80% of 10-character passwords can be generated in fewer than 75 attempts by an adversary. In the attack, we use the statistical constraints of the underlying content, English language, to reconstruct text from sound recordings without knowing the corresponding clear text.
The motion sensor in a mobile phone can be used to wirelessly tap a keyboard by placing the phone close to the keyboard. A similar and clever approach to your suggestion.
I believe it's discussed in this TED talk: http://www.ted.com/talks/avi_rubin_all_your_devices_can_be_hacked.html .
There's a paper on the topic "Keyboard Acoustic Emanations Revisited" available here: https://people.eecs.berkeley.edu/~tygar/papers/Keyboard_Acoustic_Emanations_Revisited/TISSEC.pdf
We present a novel attack taking as input a 10-minute sound recording of a user typing English text using a keyboard and recovering up to 96% of typed characters. There is no need for training recordings labeled with the corresponding clear text.
Once the model is trained, it can even be used for recognising random strings like passwords, although it won't do numbers, and is relatively limited on punctuation.
"Skype&Type" is a research project among three universities, which explores a keyboard acoustic eavesdropping attack:
VoIP software acquires and faithfully transmits all sounds, including emanations of pressed keystrokes, which can include passwords and other sensitive information.
This acoustic information from keyboard's noise is used by S&T in order to understand what has been typed on the victim's keyboard. The following figures depict a possible S&T scenario: first, the attacker and the victim VoIP call each other (in our example, a Lawyer's firm as victim, and our Research Group as attacker). Then, the victim proceeds to inadvertentely type sensitive information during the call (in our example, their Gmail ID and password). With the keyboard noise collected through VoIP, the attacker is then able to recover the full typed text of the victim.
There's an open source GUI tool that uses the microphone to capture keyboard noise and guess keyboard keys.
Smartphones with accelerometers have also been used to interpret the vibrations sent by typing.