CyberKit

Event IDs

Security event 4766

An attempt to add SID History to an account failed

Channel: Security. Category: User Account Management.

What it records

Generated on a domain controller when an attempt to add a value to an account's sIDHistory attribute fails. Records the Subject, the Target Account the addition was attempted against, and the Source Account name the SID would have come from. Unlike its success counterpart (4765), Microsoft's own event schema hard-codes the Subject's Security ID to a placeholder rather than substituting a real SID, and the Source Account section carries only an Account Name with no SID or SID List field, so the specific SID and failure reason aren't captured in the event itself.

Why it matters

This is the failure companion to 4765, and Microsoft explicitly recommends enabling Failure auditing on this subcategory specifically to catch failed SID-History injection attempts, for example when an attacker's privileges are insufficient, or SID Filtering on a trust blocks the write. A cluster of 4766 failures against the same target account is as strong a signal of an attempted privilege-escalation attempt as a successful 4765, even though the injection itself didn't take hold.

What triggers it

Legitimately: a transient permissions or connectivity failure during a legitimate ADMT migration job. Maliciously: an attacker attempting SID-History injection without sufficient rights on the target domain, or being blocked by SID Filtering/quarantine on the trust between the source and target domains.

Fields that carry the answer

Key fields
FieldWhat it tells you
Target Account > Account NameThe account the SID History addition was attempted against: the intended beneficiary of the failed injection.
Source Account > Account NameThe account name the SID would have been copied from: the only identifying detail this sparsely-documented event captures about the attempted source.
Subject > Account NameWho attempted the operation. Check for legitimacy the same way as on a successful 4765.

In practice

An attempt to inject a privileged SID into CORP\svc-app's SID History fails because SID Filtering is enabled on the inbound trust from the source domain; Target Account > Account Name shows CORP\svc-app and Source Account > Account Name shows the attempted source identity, since this sparsely-documented event carries no SID List or failure-code field, the analyst pivots to the surrounding authentication and trust-relationship events on the same Logon ID to reconstruct what was attempted.

Sample record

An attempt to add SID History to an account failed.

Subject:
	Security ID:		-
	Account Name:		administrator
	Account Domain:		CORP
	Logon ID:		0x3E7F2A1

Target Account:
	Security ID:		S-1-5-21-3623811015-3361044348-30300820-1204
	Account Name:		svc-app
	Account Domain:		CORP

Source Account:
	Account Name:		svc-app

Additional Information:
	Privileges:		-

ATT&CK techniques

Sources

Paste a record into Event XML or open a log in EVTX Reader.