Skip to content

Credentials on a Running Machine

What LSASS holds for single sign-on, what is saved to disk, and what a logon leaves.

  • Core Ideas

Why It Matters

Whoever gains admin rights on a machine can take what it holds for everyone signed in to it. How an administrator connects decides whether their reusable credentials are part of that.

What Happens

For single sign-on, the Local Security Authority process (lsass.exe, often called LSASS) keeps credentials in memory for users whose sessions are still open. It can hold the NT hash, Kerberos tickets and, in some cases, a reversibly encrypted password or the old LM hash. They stay until the session ends or the machine restarts, and a Remote Desktop session that was only disconnected has not ended.

Some secrets are saved to disk in the SECURITY hive. LSA secrets hold the computer account's own password and the passwords of services, scheduled tasks and IIS application pools set to run as an account. Cached domain logons, ten by default, hold verifiers that let a user sign in when no domain controller answers.

A cached verifier cannot be presented to another machine, only guessed against offline, while an LSA secret is the password itself. The computer account's secret gives that machine's key, the key a silver ticket to its services is forged with.

How an administrator connects decides what stays behind. Console, RunAs, Remote Desktop, scheduled task and service logons leave reusable credentials on the target. Network logons, such as a share, a remote management console or PowerShell remoting, do not.

Credential Guard adds an isolated LSA process, LsaIso.exe, which keeps NT hashes and TGTs in virtualisation-based security out of reach of admin code. LSA protection instead runs lsass.exe as a protected process, and WinInit event 12 in the System log confirms it started that way.

What Each Logon Type Leaves Behind

The way a session starts decides whether reusable credentials stay on the machine afterwards. Read the Logon Type in the session's event 4624 in the Security log, then find it here to see what someone with admin rights could take from that machine.

Logon TypeTypical UseReusable Credentials Left
Interactive (2)Console sign-in, RunAsYes
Network (3)Shares, remote management consoles, PowerShell remotingNo, though Kerberos tickets are kept where delegation is allowed
Batch (4)Scheduled tasksYes, and the password is saved as an LSA secret
Service (5)ServicesYes, and the password is saved as an LSA secret
NetworkCleartext (8)PowerShell with CredSSP, IIS Basic authenticationYes
NewCredentials (9)RunAs for network use onlyYes
RemoteInteractive (10)Remote DesktopYes, unless Restricted Admin mode or Remote Credential Guard is used

Remote Desktop and the Administrator's Credentials

Remote Desktop normally sends the administrator's credentials to the server, where they stay in memory. Restricted Admin mode and Remote Credential Guard change that, and this table shows what each one sends and how the session reaches other machines.

ConnectionCredentials Sent to the ServerThe Session Reaches Other Machines As
Remote DesktopYes, and they stay usable after a disconnectThe administrator
Restricted Admin modeNoThe server's own computer account
Remote Credential GuardNo, because Kerberos requests go back to the administrator's machineThe administrator, only while the session is connected

What Is Logged

Each event below names the log it is written to, the machine that writes it and the audit setting that switches it on, then what to read in it for this page.

Event and LogWritten OnSwitch It OnWhat It Tells You
4624 An account was successfully logged on (opens in a new tab) Security logThe computer that was logged on toAudit LogonLogon Type says what the session may have left behind. For Remote Desktop, Restricted Admin Mode says whether the credentials stayed off the server.Reading Logon Events explains how to read it.
4779 A session was disconnected from a Window Station (opens in a new tab) Security logThe computer the session is onAudit Other Logon/Logoff EventsA Remote Desktop session was disconnected. Unless a logoff follows, its credentials are still in memory.Reading Logon Events explains how to read it.
3033, 3063, 3065 and 3066 A code integrity check determines that a process, usually LSASS.exe, attempts to load a driver that doesn't meet the Microsoft signing level requirements (opens in a new tab) Microsoft-Windows-CodeIntegrity/Operational logAny Windows computer that runs LSA protection, domain controllers includedLSA protection on (3033 and 3063 record a refused load) or in audit mode (3065 and 3066)LSA protection refused (3033, 3063), or in audit mode would refuse (3065, 3066), a module loading into LSASS.

Check It on a Machine

These Windows Registry keys hold the settings this page names. Open one to see where it lives and how to read it on a machine.

Attacks That Hook in Here

These attacks work through what this page describes. Each card says what the attack is and, where it uses one of these steps, what it does there.

Sources