Skip to content

Response, New York. Noah Park: Check Point Patches Actively Exploited Management Server Path Traversal. Detection, Dallas. Ava Okello: Report Finds Nearly Half of Deployed Detections Need Attention Before SOCs Can Trust Them.

SOCtember

Always First. Fast SOC News.

Microsoft Learn page titled 4624(S): An account was successfully logged on.
Screenshot: Microsoft Learn, 4624(S): An account was successfully logged on, Windows security auditing reference, last updated September 7, 2021 (fair use).

Detection

Did You Know: The Logon Type in Windows Event 4624 Signals Whether Credentials Were Left Behind

Microsoft's Windows auditing reference lists a dozen logon type values for a successful logon, and its privileged access guidance ties them to credential theft: a Network logon such as a file share or WinRM session leaves no reusable credentials on the destination, while console, RunAs, Remote Desktop, scheduled task and service logons do. For triage, the number in the Logon Type field is a lead, not a footnote.

Ava Okello, DetectionLondon3 min read

LONDON - Every successful Windows logon writes Event ID 4624 to the Security log of the computer that was accessed, where the logon session was created, according to Microsoft's auditing reference for the event. Most analysts read the account name and the source address first. The Logon Type field deserves the same attention. Microsoft's guidance on administrative tools and logon types says that whether credentials are exposed to potential theft on a remote computer depends primarily on the Windows logon type used by the connection.

Microsoft Learn table of logon types and descriptions from the Event ID 4624 reference.
Screenshot: Microsoft Learn, Logon types and descriptions table from the 4624(S) event reference (fair use).

The 4624 reference, which Microsoft now keeps in its previous-versions Windows documentation, lists the values. Type 2 is Interactive, a user logged on to this computer. Type 3 is Network, a user or computer logged on to this computer from the network. Type 4 is Batch, type 5 is Service, a service started by the Service Control Manager, and type 7 is a workstation unlock. Type 8, NetworkCleartext, means the user's password was passed to the authentication package in its unhashed form. Type 9, NewCredentials, means a caller cloned its current token and specified new credentials for outbound connections. Type 10, RemoteInteractive, is a logon through Terminal Services or Remote Desktop, and type 11, CachedInteractive, is a logon with locally stored network credentials where the domain controller was not contacted.

Microsoft Learn table of logon types and their attributes relative to credential theft, including reusable credentials in the LSA session.
Screenshot: Microsoft Learn, logon types and their attributes relative to credential theft, from Administrative tools and logon types, last updated May 30, 2024 (fair use).

Microsoft's administrative tools reference, part of its privileged access guidance for Windows Server, maps those numbers to credential risk. It lists Interactive, Batch, Service, NetworkCleartext, NewCredentials and RemoteInteractive as logon types that leave reusable credentials in the LSA session, meaning plaintext passwords, NT hashes or Kerberos tickets that could be used to authenticate to other network resources. Network logons do not, except when delegation is enabled, in which case Kerberos tickets are present. For scheduled tasks and services, the password is also saved as an LSA secret on disk.

Microsoft Learn table of administrative tools and connection methods showing logon type and reusable credentials on destination.
Screenshot: Microsoft Learn, common administrative tools and connection methods, from Administrative tools and logon types (fair use).

The same reference translates everyday tools. A console logon, RunAs and a successful Remote Desktop session all leave reusable credentials on the destination. Net use, MMC snap-ins, PowerShell WinRM with Enter-PSSession and PsExec without explicit credentials use Network logons and do not, and Microsoft says most vulnerability scanners default to Network logons. PowerShell WinRM with CredSSP produces a NetworkCleartext logon that does expose credentials, and PsExec with explicit credentials creates both Network and Interactive logon sessions. The Audit Logon policy that produces 4624 also records 4625 for failed logons and 4648 when a process logs on by explicitly specifying an account's credentials, which Microsoft says most commonly happens with scheduled tasks or the RunAs command.

SOCtember diagram sorting Windows logon types by whether they leave reusable credentials in the LSA session.
Illustration: SOCtember, which logon types leave reusable credentials in the LSA session; paraphrased from Microsoft Learn.

Microsoft's monitoring recommendations for 4624 turn the field into detections: watch for Logon Type 4 or 5 used by a member of a domain administrative group, alert when a type 10 logon by an account that must use Restricted Admin mode shows Restricted Admin Mode set to No, monitor Elevated Token set to Yes for administrator sessions, and flag NTLM where it should not be used. For responders, the logon type also answers a scoping question early. A type 3 logon by a compromised administrator account, recorded on the computer that was accessed, marks where the attacker went. A type 2 or type 10 logon shows where that account's credentials may now sit in LSASS memory, waiting for the next hop.

Sources:


Ava Okello covers detection engineering and SOC telemetry for SOCtember from London.

Related stories

Detection desk