If a compromised or public device is capturing keystrokes, every secret entered on that system can be recorded and sent to an attacker. That can expose email, banking, work applications, and cloud access. The safest response is to avoid sensitive logins on untrusted devices, log out fully, and prefer managed endpoints with phishing-resistant authentication.
What a compromised or public device can capture
When someone enters credentials on a compromised or public device, they are trusting the endpoint to protect what they type. If the device has a keylogger, browser implant, remote access tool, or malicious extension, the attacker may capture passwords, MFA codes, session tokens, and recovery answers as they are entered. That risk is especially severe for cloud consoles, email, banking, and any account that can be used to reset others.
The danger is not limited to the login form. A hostile device can also copy browser autofill data, harvest saved passwords, steal active sessions, or read clipboard contents after a paste. That means a single careless login can expose both the account being used and any downstream systems reachable from it.
Common failure condition: users assume that a website being legitimate makes the device safe. In practice, the endpoint is the trust boundary. If the endpoint is compromised, the site can be genuine and the credentials can still be stolen before authentication ever completes.
Why the compromise often persists after the first login
Once credentials are captured, attackers usually try to turn that access into durable control. Stolen passwords may be reused to access work email, SSO portals, admin consoles, or password reset flows. If the victim later authenticates from a trusted device, the attacker may already have enough material to stay inside the account or to harvest more secrets from mailboxes, password managers, or connected applications.
This is why phishing-resistant authentication helps but does not make a hostile device harmless. Stronger authentication reduces some replay and interception risk, yet it does not fully protect against endpoint compromise, session theft, or post-login abuse on the device itself. The safer design assumption is that sensitive credentials should never be typed into an endpoint you do not control.
Managed endpoints matter because they let defenders enforce disk encryption, patching, EDR, browser hardening, and session controls consistently. A public or compromised device removes those controls, so the user inherits whatever surveillance, persistence, or browser manipulation already exists on that system.
How practitioners should reduce exposure in real workflows
Use the login context to decide whether the device is trusted enough for the account at hand. If the account can reach email, financial systems, cloud infrastructure, or privileged admin tools, require a managed device with modern authentication and full logout at the end of the session. Where available, prefer short-lived sessions, conditional access, and device health checks over standing trust in the endpoint.
- Do not enter reusable secrets on kiosks, shared workstations, or borrowed laptops.
- Prefer browser sessions that can be fully terminated, not just window-closed.
- Rotate or revoke credentials quickly if you suspect the device recorded them.
- Use separate accounts for low-trust access paths and privileged work.
One practical benchmark is whether the device can be assumed to preserve the secrecy of what is typed. If the answer is uncertain, the right control is not more caution while typing, it is a different access path.
Risk and Threat Considerations
A compromised or public device creates both exposure and attack-path risk because it can observe authentication material at the moment of entry and then reuse it immediately. The consequence is often broader than a single account takeover: once email or SSO is exposed, the attacker can pivot into password resets, internal applications, and connected services.
Failure mechanism: endpoint compromise, malicious software, or browser/session theft captures secrets in transit, then uses them to authenticate from a separate attacker-controlled system before the victim notices.
Impact: the attacker can obtain durable account access, move laterally into linked services, and expose additional credentials, data, or administrative paths.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 addresses the attack and risk surface, while NIST SP 800-63, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-63 | Digital Identity Guidelines | Phishing-resistant auth and session assurance reduce credential capture risk on untrusted endpoints. |
| Recommendation — Prefer phishing-resistant authenticators and step-up checks for high-value logins. | ||
| NIST SP 800-53 Rev 5 | IA-2 — Identification and Authentication (Organizational Users) | Compromised-device logins threaten user authentication and account access for staff identities. |
| IA-5 — Authenticator Management | Captured credentials and tokens require prompt revocation and rotation to limit abuse. | |
| Recommendation — Require strong organizational-user authentication for sensitive systems. Rotate or revoke exposed authenticators immediately after suspected capture. | ||
| CIS Controls v8 | CIS-6 — Access Control Management | Limiting and removing exposed access paths reduces what stolen credentials can reach. |
| Recommendation — Restrict sensitive access to managed endpoints and revoke risky sessions quickly. | ||
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Typing secrets on hostile devices can leak credentials, tokens, and session material. |
| NHI-07 — Long-Lived Secrets | Reusable credentials captured on hostile devices remain exploitable until rotated. | |
| NHI-10 — Human Use of NHI | Human handling of machine or access secrets on untrusted devices increases disclosure risk. | |
| Recommendation — Assume exposed secrets are compromised and eliminate the leak path. Replace long-lived secrets with short-lived credentials where possible. Keep sensitive secrets out of ad hoc human workflows and unmanaged devices. | ||
Practitioner Guidance
What to prioritize: Treat any credential entry on an untrusted endpoint as a potential incident if the account has material reach. Email, cloud, finance, and admin identities deserve immediate review because they can be leveraged to reset other access.
What to verify: Confirm whether the login occurred on a managed device, whether session tokens may have been issued, and whether the account has password reset or recovery privileges that could be abused next.
Decision rule: If a secret was entered on a device you do not control, assume disclosure is possible and move to rotation, session revocation, and account review before relying on the old credential again.
Practitioner takeaway: The main risk is not just password theft, but the attacker’s ability to turn that one capture into wider access through email, SSO, and recovery flows.
Related resources from NHI Mgmt Group
- What happens when employees enter corporate credentials into a fake login page?
- What happens when employees can enter company credentials on untrusted websites or devices?
- What happens when organisations leave sensitive guidance or credentials in public documents?
- How can organizations secure their MCP server credentials?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 23, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org