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

GMSA

This note documents detection patterns related to GMSA Password Extraction within Active Directory environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4662Operation performed on objectCriticalReading the msDS-ManagedPassword attribute indicates possible gMSA password retrieval.
Security4624Successful logonHighAttacker may authenticate using extracted gMSA credentials.
Security4672Special privileges assignedHighPrivileged session may occur if gMSA account has elevated rights.
Security4769Kerberos service ticket requestHighService ticket activity for gMSA accounts.
Sysmon1Process creationMediumExecution of tools extracting gMSA passwords.
Sysmon3Network connectionMediumLDAP queries retrieving password attributes.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
LDAP reads of msDS-ManagedPasswordAccount querying gMSA password attributeCriticalPrimary artifact of gMSA password extraction.
Multiple gMSA password queriesRapid enumeration of gMSA accountsHighAttacker gathering credentials.
Authentication using service accountsService account used interactivelyHighSuspicious use of normally non-interactive account.
LDAP queries from unusual hostDirectory queries from non-admin workstationHighPotential attacker system.
Access to multiple serversAuthentication attempts across many hostsHighPossible lateral movement using service credentials.

Common Tools

ToolUsage
PowerViewEnumerates and retrieves gMSA password data.
gMSADumperExtracts gMSA passwords from Active Directory.
ImpacketUses extracted credentials for remote execution.
CrackMapExecAutomates lateral movement using service account credentials.
LDAP toolsDirect attribute queries retrieving password data.

Relevant Artifacts

  • Domain controller Security logs (4662)
  • LDAP query logs
  • Active Directory object metadata
  • Sysmon logs (1, 3)
  • EDR telemetry identifying credential enumeration tools
  • Kerberos authentication logs
  • Prefetch artifacts showing execution of gMSADumper or PowerView
  • Remote execution logs

MITRE ATT&CK References

  • T1003 Credential Dumping
  • T1552 Unsecured Credentials
  • T1078 Valid Accounts

Decision Tree

  1. Is the suspicious event present?
    • Identify object access events (4662) reading msDS-ManagedPassword.
  2. What host generated the event?
    • Determine workstation performing LDAP query.
  3. Is the account expected to perform this action?
    • Investigate whether account normally retrieves gMSA credentials.
  4. Pivot:
    • Source host → inspect execution of PowerView or gMSADumper.
    • Target systems → check authentication logs for gMSA usage.
    • Network → analyze Kerberos service ticket requests.
  5. Confirm exploitation
    • Determine whether attacker extracted gMSA password and used it for authentication.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4662
| where ObjectName contains "msDS-ManagedPassword"
SecurityEvent
| where EventID == 4769
| summarize count() by TargetUserName, ServiceName, bin(TimeGenerated, 5m)

EQL

any where event.code == "4662"

Sigma

title: Suspicious gMSA Password Access
id: gmsa-password-extraction-detection
status: experimental
description: Detects LDAP reads of gMSA password attribute
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4662
    ObjectName|contains: msDS-ManagedPassword
  condition: selection
fields:
  - SubjectUserName
  - ObjectName
falsepositives:
  - Legitimate servers retrieving gMSA passwords
level: high
tags:
  - attack.credential_access
  - attack.t1003

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Privilege reviewRestrict which hosts can retrieve gMSA passwordsCriticalPrevents unauthorized retrieval.
MonitoringAlert on reads of msDS-ManagedPassword attributeCriticalPrimary detection strategy.
Least privilegeLimit service account permissionsHighReduces privilege escalation opportunities.
Network monitoringMonitor service account authentication patternsHighDetects abnormal activity.
Credential rotationEnsure gMSA automatic password rotation functioningMediumLimits usefulness of stolen credentials.