What attackers do. Attackers record keystrokes to capture passwords and other sensitive input as users type them. Keyloggers can be part of malware, browser extensions or hardware devices. This serves Collection and Credential Access.
How to defend. Use endpoint protection that detects keylogging behaviour, manage browser extensions, and use phishing-resistant MFA so captured passwords alone do not grant access. Control physical access to keyboards and USB ports in sensitive areas.
Signs to look for. Look for processes setting keyboard hooks or polling key states, unusual log files growing in temp folders, unknown USB devices and data being sent out regularly from infected hosts. A common gap is that keylogging uses legitimate operating system features, so detection depends on behaviour analysis.