Windows Event ID 4624: An account was successfully logged on
Security event 4624 records every successful logon: who, how (LogonType), from where (IpAddress) and with which package. The core of logon forensics.
Overview
- Event ID
- 4624
- Log / channel
- Security
- Provider
- Microsoft-Windows-Security-Auditing
- Category
- logon
- Enabled by default
- Yes
- How to enable
- Advanced Audit Policy Configuration > Logon/Logoff > Audit Logon (Success). Enabled for Success in the default Windows audit policy.
What event 4624 logs
Event 4624 is written by the Local Security Authority on the computer that accepted the logon, each time a logon session is created. That makes it the machine-side record of access: the domain controller sees the authentication (4768, 4769, 4776), while the target host writes 4624.
The record answers four questions. Who: TargetUserName, TargetDomainName and TargetUserSid. How: LogonType, LogonProcessName and AuthenticationPackageName. From where: WorkstationName, IpAddress and IpPort. Which session: TargetLogonId, the key that ties the logon to everything done in it (4672, 4688, 4663, 4634/4647).
On a busy server 4624 is the noisiest event in the Security log — most records are services, machine accounts (names ending in $) and SYSTEM. Filter those out first, then group by LogonType and source.
Fields
Every field recorded in event 4624, with the values that matter for investigation.
SubjectUserNameAccount that requested the logon on the local machine — usually the computer account (HOST$) or - for network logons. Not the account that logged on.
SubjectLogonIdLogon session of the requester; 0x3e7 is the local SYSTEM session.
TargetUserNameThe account that was logged on. Check this, not the Subject fields.
TargetDomainNameDomain or computer name of the target account.
TargetUserSidSID of the logged-on account. Stable even if the account is renamed.
TargetLogonIdHexadecimal ID of the new logon session. Pivot on it to find the matching 4672, the processes created in the session (4688 SubjectLogonId) and the logoff (4634, 4647).
LogonTypeHow the logon happened. Read this field first.
- 2
- Interactive — keyboard and screen at the console (or KVM / hypervisor console).
- 3
- Network — access to a resource over the network: SMB share, remote registry, WMI, WinRM, PsExec. No credentials are cached on the target.
- 4
- Batch — scheduled task running as a user.
- 5
- Service — a service started under a service account.
- 7
- Unlock — workstation unlocked.
- 8
- NetworkCleartext — network logon where the password reached the authentication package in clear text instead of as a hash: IIS Basic authentication, LDAP simple binds on a domain controller, some PowerShell/WinRM setups. Whether it also crossed the network in clear text depends on TLS.
- 9
- NewCredentials —
runas /netonlyor a process given alternate credentials for outbound connections only. The local identity stays the same. - 10
- RemoteInteractive — Remote Desktop / Terminal Services logon.
- 11
- CachedInteractive — interactive logon with cached domain credentials (no DC reachable).
LogonProcessNameTrusted logon process that handled the request, e.g. User32 (interactive/RDP), NtLmSsp (NTLM network logon), Kerberos, Advapi (services, runas), seclogo (runas / NewCredentials).
AuthenticationPackageNameKerberos, NTLM or Negotiate. NTLM network logons from workstations where Kerberos was expected deserve a second look.
LmPackageNameFor NTLM logons, the protocol version: NTLM V1, NTLM V2 or LM. NTLMv1 and LM are weak and should not appear in a modern domain.
KeyLengthSession key length for NTLM; 0 for Kerberos and for NTLM without session security.
WorkstationNameNetBIOS name of the source computer as supplied by the client (can be spoofed or empty).
IpAddressSource IP of a remote logon. - or ::1 / 127.0.0.1 for local logons.
IpPortSource TCP port; 0 or - for local logons.
ProcessNameProcess that performed the logon, e.g. C:\Windows\System32\winlogon.exe for interactive logons, services.exe for service logons, - for network logons.
ElevatedToken%%1842 (Yes) when the session received a full administrative token, %%1843 (No) otherwise. A quick way to spot admin logons.
RestrictedAdminModeFor LogonType 10, whether the RDP client used Restricted Admin mode (no credentials sent to the server). %%1843 (No) or %%1842 (Yes).
VirtualAccountYes for virtual accounts such as NT SERVICE\... managed service identities.
TargetLinkedLogonIdWith UAC, an administrator logon creates two linked sessions (filtered and elevated); this is the ID of the other one.
How to enable this event
Advanced Audit Policy Configuration > Logon/Logoff > Audit Logon (Success). Enabled for Success in the default Windows audit policy.
Network information (IpAddress, IpPort) is only filled for remote logons; local logons show - or 127.0.0.1. The ImpersonationLevel, RestrictedAdminMode, VirtualAccount, ElevatedToken and TargetLinkedLogonId fields appear on Windows 10 / Server 2016 and later.
Detection and investigation
Typically benign
- Users signing in at the console (type 2), unlocking (type 7) or connecting over RDP (type 10).
- Machine accounts (
HOST$) andSYSTEM,LOCAL SERVICE,NETWORK SERVICElogons, especially type 5. - File server and domain controller traffic — thousands of type 3 logons per hour from workstations.
- Scheduled tasks (type 4) and IIS application pools using configured accounts.
- Administrators using
runas /netonly(type 9) for tools that need other credentials. - Credentialed vulnerability scanners and management or backup agents: dense type 3 logons to many hosts from a small, stable set of source IPs. The shape looks like lateral movement, so tag those sources once and exclude them.
- Remote Desktop Session Host and Citrix servers, which see type 10 logons from many internal IPs every day.
- A user retyping the old password after a change: two or three 4625 followed by a 4624 from the same workstation. Not brute force.
Worth investigating
- Lateral movement with stolen credentials: type 3 logons from a workstation to servers (PsExec, SMB, WMI), often with a burst of new source/target pairs.
- RDP access (type 10) from unusual IP addresses, at unusual times, or to hosts the account never uses.
- Pass-the-hash: NTLM type 3 logons where Kerberos is expected. On the source host, Mimikatz
sekurlsa::pthshows up as type 9 with LogonProcessNameseclogo. - A successful logon right after many 4625 failures for the same account (brute force or password spraying that worked).
- Logons by freshly created accounts (4720) or accounts that were just added to an admin group (4732, 4728).
- LogonType drift on a service account: an account that has only ever logged on as type 5 (or 3) suddenly producing type 2 or 10 means someone is using its password interactively.
- Forged service tickets (silver ticket): a Kerberos type 3 logon to a server with no 4769 for that service on any domain controller around the same time. The ticket never came from a DC.
Investigation notes
- Filter out noise first: TargetUserName ending in
$,SYSTEM,ANONYMOUS LOGON(unless you hunt null sessions) and LogonType 5. - Group by TargetUserName, LogonType and IpAddress to spot first-seen combinations.
- Pivot on TargetLogonId: 4672 in the same second means an admin session; 4688 with the same SubjectLogonId lists what the session executed; 4634/4647 gives the session end.
- For type 10, correlate with RDP events 1149, 21, 22, 24 and 25 to get the full session timeline.
- On domain controllers, match type 3 logons with 4768/4769 (Kerberos) or 4776 (NTLM) to confirm which protocol was really used.
- Brute force that worked: count 4625 per
TargetUserNameandIpAddressover a few minutes, then look for a 4624 with the same pair right after the burst. - External RDP in Microsoft Sentinel:
SecurityEvent | where EventID == 4624 and LogonType == 10 and not(ipv4_is_private(IpAddress)) | summarize count() by TargetUserName, IpAddress, Computer. Anything outside known VPN egress addresses or business hours is a lead. - Baseline LogonType per service account. Each one should use a single, stable type (5 for services, 4 for scheduled tasks, 3 for network access); a new type is worth an alert.
- Inventory type 8 logons: every source in that list hands a reusable password to the server, even when the activity itself is legitimate.
- Know the limits. 4624 does not say what ran in the session (pivot to 4688 or Sysmon 1 on the logon ID) nor which client program started the logon. A type 11 logon proves the cached credentials worked on that host, not that the account is still enabled in the domain.