Event ID 4648
Event ID 4648: Explicit Credential Logon
A logon was attempted using explicit credentials
- Log source
- Security
- How to enable it
- Logon/Logoff > Audit Logon (Success)
- Category
- Lateral Movement
- Priority
- High
- Typical volume
- Medium
- MITRE ATT&CK
What Event ID 4648 means
4648 is written on the source computer when a process supplies a user name and password for an account other than the one it is running as. It answers a question that 4624 on the destination cannot: which user and which program on this machine reached out with someone else's credentials?
Because it records both identities, it is one of the few events that shows a change of account in a single line. SubjectUserName is the session that did it, TargetUserName is the account that was used, and TargetServerName is where it went.
Scheduled tasks and services also create it when they start under a stored account, so local entries from svchost.exe are routine. The interesting ones have a remote TargetServerName and a process such as powershell.exe, wmic.exe, net.exe or an unknown binary.
Key fields to inspect
| Field | Meaning | Suspicious when |
|---|---|---|
SubjectUserName | Account that the calling process runs as. | An ordinary user on a workstation who calls out with an administrator's credentials. |
TargetUserName | Account whose credentials were supplied. | Domain administrators and service accounts. |
TargetServerName | Computer the credentials were meant for. localhost if local. | Many different servers from one host in a short time. |
TargetInfo | Further detail on the target, often a service principal name. | cifs/ or HTTP/ names that show the protocol used. |
ProcessName | Program that supplied the credentials. | powershell.exe, wmic.exe, rundll32.exe, or a file in a temporary folder. |
IpAddress | Network address related to the attempt, if known. | An address outside the server ranges you manage. |
Detection queries
Find users who supply different credentials to several remote hosts from one machine. Adjust names and thresholds to your environment. About these queries.
Splunk SPL
index=windows source="XmlWinEventLog:Security" EventCode=4648
| where TargetServerName!="localhost" AND lower(SubjectUserName)!=lower(TargetUserName) AND NOT match(TargetUserName, "\$$")
| stats dc(TargetServerName) AS targets values(TargetServerName) AS servers values(ProcessName) AS process BY Computer SubjectUserName TargetUserName
| where targets>=3 Microsoft Sentinel KQL
SecurityEvent
| where EventID == 4648
| where TargetServerName !~ "localhost" and SubjectUserName !~ TargetUserName and TargetUserName !endswith "$"
| summarize Targets = dcount(TargetServerName), Servers = make_set(TargetServerName, 20), Programs = make_set(ProcessName, 10) by Computer, SubjectUserName, TargetUserName
| where Targets >= 3 PowerShell
Get-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4648; StartTime = (Get-Date).AddDays(-1) } |
ForEach-Object { $d = @{ Time = $_.TimeCreated }; ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }; [pscustomobject]$d } |
Where-Object { $_.TargetServerName -ne 'localhost' -and $_.TargetUserName -notlike '*$' } |
Select-Object Time, SubjectUserName, TargetUserName, TargetServerName, ProcessName | Format-Table -AutoSize Attack scenarios
Lateral movement with stolen passwords
net use, wmic /node, Enter-PSSession and PsExec with a -u option all supply credentials explicitly. The source host shows one 4648 per target, which often survives even when logs on the destination are cleared.
runas to a privileged account
An attacker with a user's desktop and an administrator's password starts a shell as the administrator. 4648 is followed by 4624 and 4672 on the same host, with consent or runas in ProcessName.
Password spraying from a compromised host
Tools that call the logon API from an internal machine leave a 4648 for each account they try, including failures, which gives a list of targets in one log.
Investigation checklist
- Identify who was logged on as SubjectUserName and whether they own the target account.
- Trace ProcessName back through 4688 to the command line and parent process.
- Check each TargetServerName for a matching 4624 at the same time.
- Search other hosts for the same TargetUserName to see how far the credential has travelled.
Common benign causes
- Scheduled tasks and services that start under a named account.
- Administrators who use a separate privileged account, which is good practice.
- Remote Desktop clients and credential managers with saved passwords.
Event ID 4648 FAQ
Is 4648 logged on the source or the destination?
On the computer where the process that supplied the credentials is running, which is the source. The destination records the resulting 4624 or 4625.
Does pass-the-hash create 4648?
It can on the source host when a tool creates a new session with alternate credentials, but not every implementation does. Treat it as supporting evidence next to type 9 logons and NTLM logons on targets.
Why is svchost.exe the process in so many 4648 events?
The Task Scheduler and other services run inside svchost.exe and submit stored credentials on behalf of tasks. These local entries usually have localhost as the target server and can be filtered.