It can happen silently in the background or by tricking the user into typing into a fake prompt or page. MITRE lists four forms: keylogging, GUI input capture, web portal capture and credential API hooking.
How it works
People enter credentials in many places, such as login pages, portals and system dialog boxes. Input capture targets those moments.
Some methods are invisible to the user, for example hooking into the system functions that handle credentials. Others rely on deception, such as a fake web portal that looks like a real service.
MITRE lists four sub-techniques: keylogging, GUI input capture, web portal capture and credential API hooking. Keylogging is the most common form, and it can be used when other ways of getting credentials do not work.
MITRE lists four sub-techniques: T1056.001 Keylogging; T1056.002 GUI Input Capture; T1056.003 Web Portal Capture; T1056.004 Credential API Hooking.
A real example
Procedure examples listed by MITRE ATT&CK:
- Chaes has a module that can perform any API hooking it wants.
- FlawedAmmyy can collect mouse events.
- Kobalos has used a compromised SSH client to capture the hostname, port, username and password of SSH connections from the compromised host.
- NPPSPY captures user input in the Winlogon process, which allows it to record logon information in cleartext.
- InvisibleFerret has collected mouse and keyboard events using the pyWinhook library.
Seen in incidents
How to detect
-
Abnormal process behavior
Watch for processes that use the system functions for recording keystrokes or polling input devices in ways that do not fit their role.
-
Access to input devices
On Linux and macOS, look for unexpected programs reading input devices or input services, especially those with no visible window.
-
Fake login pages
Monitor web traffic to suspicious addresses that mimic login pages and receive submitted credentials.
-
Detection strategy MITRE lists
DET0102, Behavioral Detection of Input Capture Across Platforms.
How to defend
-
Accept the limits of prevention
MITRE notes this cannot be easily stopped with preventive controls, because it abuses normal system features.
-
Rely on detection
Put effort into monitoring process behavior and input access, since that is where MITRE points defenders.
Frequently Asked Questions
What is input capture?
Input capture is when an attacker records what a user types or enters, to steal passwords or other information. Some methods are invisible to the user, while others rely on deception, such as a fake web portal.
What are the types of input capture?
MITRE lists four sub-techniques: keylogging, GUI input capture, web portal capture and credential API hooking. Keylogging is the most common form, and it can be used when other ways of getting credentials do not work.
How can I detect input capture?
Watch for processes that use system functions for recording keystrokes or polling input devices in ways that do not fit their role. Also monitor web traffic to suspicious addresses that mimic login pages and receive submitted credentials.
Can input capture be prevented?
MITRE notes it cannot be easily stopped with preventive controls, because it abuses normal system features. Defenders should therefore put their effort into monitoring process behavior and access to input devices.
