The Quarterly Threat Landscape Report is out. See what attackers are targeting now.Read report

What Is a Keylogger?

A keylogger is software or hardware that records what someone types on a device. It can support authorized monitoring, but attackers use it to capture passwords, messages, and other sensitive information.

Why keyloggers matter

A keylogger can turn everyday typing into a source of sensitive data. Someone entering a work password, payment details, or a private message may have no indication that their input is being recorded.

Malicious keylogging is one way attackers collect information after gaining access to a device. It can also be part of broader malware attacks, in which unwanted software performs actions without the user's knowledge or permission.

Possible consequences include:

  • Credential theft: Recorded usernames and passwords may give an attacker access to accounts.
  • Data exposure: Messages, financial details, and information entered into business applications may be recorded.
  • Account compromise: Stolen credentials can help an attacker impersonate a user or access additional services.
  • Privacy violations: Unauthorized monitoring may reveal personal or confidential activity.

Not every keylogger is malware, as organizations may use disclosed, authorized monitoring for legitimate purposes, while malicious operators deploy similar technology to collect information secretly. The distinction is the purpose, authorization, and handling of the captured data.

How keyloggers work

Keyloggers intercept or observe keyboard input and create a record of that activity. The details vary by device and technology, but most follow a recognizable sequence.

  1. Access: A software keylogger runs on a device or within an application, or a hardware device is connected where it can intercept keyboard signals.
  2. Capture: The keylogger observes keystrokes as a person types. Some related monitoring tools also collect information from forms or other device activity.
  3. Recording: Captured input is stored in a log, which may include timing or application context.
  4. Access or transfer: Someone may retrieve the log locally, or the software may transmit it to another system.

The capture may happen before the typed text reaches its destination. As a result, an encrypted connection to a website doesn’t necessarily protect information already recorded on the device. What a keylogger captures depends on its capabilities, permissions, and where it operates.

Types and components of keyloggers

Keyloggers are generally divided into software and hardware categories. Both record input, but their placement and detection challenges differ.

Software keyloggers

Software keyloggers are programs or code that monitor input on a computer or mobile device. They may run as ordinary processes, use operating-system input interfaces, or operate with elevated privileges.

Some are installed through deceptive downloads or phishing attacks. Others are deployed through authorized device-management processes. Browser-based scripts and tools that capture web form contents are sometimes discussed alongside keyloggers, although they don’t always record individual keystrokes.

Hardware keyloggers

Hardware keyloggers are physical devices positioned to intercept keyboard input, such as an adapter between a keyboard and a computer. Actual physical access is typically important for installing or retrieving these devices.

A hardware keylogger may leave no suspicious software process behind, so software scanning alone might not identify it.

Core components

Although designs differ, keyloggers commonly involve:

  • An input capture mechanism that receives or observes keyboard activity.
  • A recording function that organizes captured information.
  • Storage or a transfer method that makes the recorded data available for later access.

Keylogger examples and use cases

Malicious software on a work computer

An employee opens a deceptive attachment that installs unwanted software, with the program then recording credentials and other information typed into business applications.

A physical device on a shared computer

Someone connects a small recording device between a keyboard and a shared workstation. Users continue working normally while the device collects input. Checking installed software may not reveal the problem, making equipment inspection important in environments with shared or exposed hardware.

Authorized monitoring

An organization may use approved monitoring software on managed devices for a defined purpose. Clear policies, appropriate notice, limited collection, and access controls help distinguish that activity from covert surveillance.

How keyloggers fit into security operations

For security teams, keylogging isn’t a separate discipline, but a possible source of credential exposure and an activity to investigate within endpoint security, identity protection, and incident response solutions.

Detecting possible keylogging activity

Unexpected software, suspicious process behavior, unusual permissions, or unrecognized connected hardware may justify investigation, but there isn’t a universal warning sign that proves a keylogger is present.

Endpoint detection and response (EDR) solutions help teams investigate suspicious behavior on managed devices. Hardware threats are more difficult to detect, as they may require separate physical inspections.

Reducing the risk

Practical defenses work best in combination:

  • Keep operating systems, browsers, and applications updated.
  • Limit unapproved software and review application permissions.
  • Teach users to recognize suspicious downloads and messages.
  • Use multi-factor authentication (MFA) to reduce the usefulness of a stolen password on its own.
  • Control physical access to devices and inspect shared equipment when appropriate.

MFA doesn’t protect information already typed into a compromised device. Likewise, endpoint protection cannot guarantee detection of every software or hardware keylogger.

Responding to suspected keylogging

If you suspect keylogging, avoid entering additional sensitive information on the affected device. Security teams can preserve relevant evidence, investigate the source, contain the affected system, and assess whether captured credentials or data were exposed.

Follow established incident response (IR) procedures, including changing affected credentials from a trusted device and reviewing account activity.

Author

Aaron Wells
Aaron Wells

Frequently asked questions