Join our Newsletter — 33% off our NHI Course
Home› FAQ› Threats, Abuse & Incident Response› How do attackers use TWOSTROKE?
Threats, Abuse & Incident Response

How do attackers use TWOSTROKE?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 19, 2026 Domain: Threats, Abuse & Incident Response

TWOSTROKE is used as an input capture tool that records keystrokes entered on a compromised device. Attackers use it to steal passwords, secret phrases, session details and internal commands typed by administrators. Defenders should look for keylogging behaviour, suspicious injected processes, endpoint alerts and unexpected access to sensitive accounts after typing events.

How TWOSTROKE turns a compromised device into a typing trap

TWOSTROKE is useful to attackers because it sits at the point where human intent becomes machine input. If the device is already compromised, keystrokes can reveal far more than passwords: they can expose secret phrases, admin commands, session handling steps, and internal workflow details that are otherwise hard to recover from logs alone.

The key issue is not just reading text, but capturing it at the moment it is trusted by the operating system and applications. That makes the tool valuable for harvesting credentials, understanding how privileged users operate, and collecting context that supports follow-on access or lateral movement.

What attackers gain from captured keystrokes

Captured input can expose high-value data in plain form before it is protected by downstream controls. Passwords are the obvious target, but administrators often type much richer material, including recovery codes, one-time setup values, shell commands, internal URLs, filenames, and operational instructions that help an intruder navigate the environment.

Attackers also use this material to infer where the real trust boundaries are. Repeated typing of admin commands, privileged account names, or remote access strings can reveal which systems matter most, which accounts have standing access, and where a later compromise would be most efficient.

Malware Guide is useful here because keylogging is one of the classic behaviours defenders associate with malicious software, and it sits alongside broader malware detection and analysis patterns.

How defenders should interpret the signal

Keystroke capture is often a symptom of broader endpoint compromise rather than an isolated finding. If it is present, defenders should assume the attacker may already have a foothold on the device, may be trying to collect reusable access material, and may be pairing the stolen input with process injection, persistence, or remote access tooling.

The practical question is whether the captured input could still be useful after the fact. If the victim typed a password, secret phrase, or session-related command while the compromise was active, the attacker may be able to reuse that information quickly, especially if the environment lacks strong session binding, short-lived credentials, or prompt revocation.

The State of NHI & AI Agent Breach Report 2026 is relevant because it shows how attackers commonly turn stolen secrets and sessions into broader compromise, which is the same operational pattern keylogging supports.

Risk and Threat Considerations

Input-capture malware is dangerous because it bypasses many post-authentication safeguards by stealing what a legitimate user has already typed. That creates exposure even when password policy, MFA, and network filtering are in place, since the attacker may harvest the very material those controls depend on.

Failure mechanism: The compromised endpoint records sensitive input at the keyboard or input subsystem, then the attacker reuses the captured data to impersonate the user, access protected systems, or replay session-related workflows before the victim notices.

Impact: This can lead to account takeover, exposure of privileged commands and secrets, unauthorized access to sensitive systems, and faster escalation if the captured data belongs to an administrator or includes reusable session detail.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1056.001 — KeyloggingKey capture is the core attacker behaviour described by TWOSTROKE.
T1003 — OS Credential DumpingKeylogging often feeds broader credential theft and post-compromise access.
Recommendation — Map detected typing capture to keylogging activity and hunt for adjacent credential-access behavior. Correlate keylogging alerts with credential theft and privilege-escalation indicators.
CIS Controls v8CIS-8 — Audit Log ManagementEndpoint and authentication logs help confirm suspicious access after typing events.
Recommendation — Centralize endpoint and auth telemetry to validate suspicious post-typing account activity.

Practitioner Guidance

What to prioritise: Treat any confirmed keylogging signal as a potential identity compromise event, not just a malware cleanup task. Focus first on the accounts and systems the user touched during the suspected capture window, especially privileged accounts and anything tied to remote administration or secret handling.

What to verify: Check whether sensitive input was entered while the device was compromised, whether any credentials or session material could still be live, and whether there is evidence of subsequent use from unusual hosts, geographies, or processes. If the captured input could authenticate to production, assume reuse is possible until proven otherwise.

Practitioner takeaway: The real danger is not the recording itself, but the trust an attacker can immediately convert from it, so the response should be driven by likely credential and session exposure, not by malware removal alone.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 19, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org