Event ID 4742: computer account changed
What Event ID 4742 (computer account changed) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.
Event ID 4742 records a change to a computer account. Most are routine: password changes every 30 days, DNS host name updates. The ones that matter change delegation, account control flags or the account name, because those are the levers for privilege escalation through Kerberos delegation and the noPac attack.
The fields that matter
| Field | What it tells you |
|---|---|
| Computer Account That Was Changed | Which computer. |
| Subject > Account Name | Who made the change. The computer itself (NAME$) for routine updates. |
| Changed Attributes | Only changed values are shown; - means unchanged. |
| AllowedToDelegateTo | Constrained delegation targets. New entries let the computer impersonate users to those services. |
| User Account Control | Flags such as "Trusted For Delegation" (unconstrained delegation). |
| SAM Account Name | A rename. In noPac the name is changed to a DC's name without the $. |
What is normal
Changes made by the computer itself (password and DNS updates), and admin changes that match tickets.
When Event ID 4742 is suspicious
- Delegation added or "Trusted For Delegation" set by anyone other than a known admin.
- SAM Account Name changed to match a domain controller name: noPac (CVE-2021-42278).
- Changes to a computer account that was created minutes earlier by a normal user.
Common false positive: Machine password rotations appear as 4742 with only Password Last Set changed. Filter those out.
Find Event ID 4742 with PowerShell
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4742; StartTime=(Get-Date).AddDays(-7)} -MaxEvents 50 |
ForEach-Object {
$d = [ordered]@{ Time = $_.TimeCreated; Computer = $_.MachineName }
([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
[pscustomobject]$d
} | Format-List
Microsoft Sentinel (KQL)
SecurityEvent
| where TimeGenerated > ago(7d) and EventID == 4742
| project TimeGenerated, Computer, Account, Activity, EventData
| order by TimeGenerated desc
Related events
- Event ID 4741: Computer account created
- Event ID 4743: Computer account deleted
- Event ID 5136: Directory object modified
- Event ID 4769: Kerberos service ticket requested
FAQ
Does 4742 show resource-based constrained delegation changes?
Not directly. RBCD is set in msDS-AllowedToActOnBehalfOfOtherIdentity, which shows up in event 5136 when directory service change auditing is on.
Windows Event Triage reads a CSV, EVTX-to-JSON or XML export in your browser and flags brute force, new admins, suspicious services and log clearing.
IOC Triage, our free browser extension: right-click it for a verdict from 15 threat-intel sources, then copy a ready ticket note.