Skip to main content

Keyloggers - How They Steal Your Passwords

About 2 min read

A keylogger is a type of malware that secretly records keyboard input. There are software-based and hardware-based types, and software-based keyloggers are distributed embedded in Trojan horses and the like. The recorded data is sent to the attacker, and confidential information such as passwords and credit card numbers is stolen.

How Keyloggers Work

Software-based keyloggers record keystrokes by methods such as hooking the API functions that process keystrokes. Advanced ones also capture screenshots and monitor the clipboard. Hardware-based types are small devices physically inserted between the USB connector and the keyboard, and they are difficult to find with software-based scans.

Why Discovering a Keylogger Does Not End with Removal

A distinctive feature of keylogger damage is that, at the moment of discovery, the scope of the damage has already been determined retroactively. Recording continues throughout the period from infection to discovery, so removal only stops the recording from that point on; input that has already been transmitted cannot be taken back. For this reason, the response after discovery must assume that everything typed on the device during the infection period (passwords for each service, the contents of emails and documents, credit card numbers, and so on) has reached a third party. Passwords in particular affect every service that was typed into, so identifying the affected accounts and changing their passwords becomes the core of the response. This is also why pinpointing when the infection began matters: if the period cannot be determined, there is no choice but to cast a wider net and change more.

Concrete Damage Scenarios

One example scenario is one in which a hardware-based keylogger is planted on a shared PC in a hotel business center or an airport lounge. When a business traveler logs in to their email or online banking, all of their credentials are recorded.

Practical Countermeasures

Using the auto-fill feature of a password manager reduces typing on the keyboard. With two-factor authentication set up, a leaked password alone is less likely to be enough for an unauthorized login.

Was this article helpful?

Related Terms