Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / ACTIVE DIRECTORY / ACL

GenericWrite

This note documents detection patterns related to GenericWrite Abuse within Active Directory environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security5136Directory object modifiedCriticalGenericWrite allows modification of specific attributes on AD objects. Look for attribute changes such as servicePrincipalName, userAccountControl, or member.
Security4728Member added to security-enabled global groupCriticalAttackers may add themselves to privileged groups by modifying group membership attributes.
Security4738User account changedHighChanges to user attributes such as SPN or delegation settings.
Security4742Computer account changedHighModification of computer attributes may enable delegation or SPN abuse.
Security4662An operation was performed on an objectHighLDAP write operations against directory objects.
Sysmon1Process creationMediumExecution of PowerView, SharpHound, or Impacket tools performing LDAP modifications.
Sysmon3Network connectionMediumLDAP connections to domain controllers.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
SPN attribute modificationChanges to servicePrincipalName attributeCriticalMay enable Kerberoasting or service account takeover.
Unexpected group membership changesUser added to privileged groups unexpectedlyCriticalPossible privilege escalation via attribute modification.
Delegation attribute modificationChanges to delegation-related attributesHighMay enable Kerberos delegation attacks.
UserAccountControl modificationsAccount flags changed unexpectedlyHighMay enable privileged operations.
Rapid LDAP attribute changesMultiple modifications across objectsMediumPossible attacker automation.

Common Tools

ToolUsage
PowerViewModifies AD object attributes via GenericWrite.
BloodHoundIdentifies privilege escalation paths including GenericWrite.
ImpacketLDAP modification scripts used for AD abuse.
SharpHoundCollects AD privilege relationships.
ADSIEdit / LDAP toolsDirect manipulation of AD attributes.

Relevant Artifacts

  • Domain controller Security logs (5136, 4662, 4728)
  • Active Directory object metadata
  • LDAP modification logs
  • Sysmon logs (1, 3)
  • EDR telemetry identifying AD manipulation tools
  • Directory replication metadata
  • Prefetch artifacts showing execution of PowerView or Impacket

MITRE ATT&CK References

  • T1098 Account Manipulation
  • T1484 Domain Policy Modification
  • T1078 Valid Accounts

Decision Tree

  1. Is the suspicious event present?
    • Identify directory object modification (5136).
  2. What host generated the event?
    • Determine workstation performing LDAP modification.
  3. Is the account expected to perform this action?
    • Investigate whether account normally manages directory objects.
  4. Pivot:
    • Source host → inspect execution of PowerView or Impacket tools.
    • Account → review privileges and group memberships.
    • Network → analyze LDAP traffic patterns.
  5. Confirm exploitation
    • Determine whether attacker used GenericWrite permissions for escalation.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 5136
| project TimeGenerated, SubjectUserName, ObjectDN
SecurityEvent
| where EventID == 4662
| project TimeGenerated, SubjectUserName, ObjectName

EQL

any where event.code == "5136"

Sigma

title: Suspicious Active Directory Attribute Modification
id: genericwrite-abuse-detection
status: experimental
description: Detects directory attribute modifications potentially indicating GenericWrite abuse
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
  condition: selection
fields:
  - SubjectUserName
  - ObjectDN
falsepositives:
  - Legitimate administrative directory modifications
level: medium
tags:
  - attack.privilege_escalation
  - attack.t1098

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Privilege reviewAudit AD ACLs for GenericWrite permissionsCriticalRemoves unnecessary write permissions.
Least privilegeRestrict attribute modification rightsHighReduces escalation opportunities.
MonitoringAlert on SPN and delegation attribute changesHighDetects common abuse scenarios.
AD security reviewRegularly review delegation permissionsHighIdentifies risky configurations.
Change managementRequire approval for sensitive directory changesMediumReduces unauthorized modifications.