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

LDAP Relay

This note documents detection patterns related to LDAP Relay within Active Directory environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4624Successful logonHighAuthentication relayed to LDAP service.
Security4672Special privileges assignedHighPrivileged account authenticated via relay.
Security4662Directory object accessedCriticalLDAP modification or enumeration performed via relayed authentication.
Sysmon3Network connectionHighLDAP connections to domain controllers (389 / 636).
Sysmon1Process creationMediumExecution of relay tooling.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Unexpected LDAP modificationsDirectory changes performed by machine accountsCriticalTypical relay exploitation.
Authentication without KerberosNTLM authentication to LDAPHighCommon relay scenario.
LDAP traffic spikeMultiple LDAP operations from unusual hostHighAutomated relay behavior.

Common Tools

ToolUsage
Impacket ntlmrelayxRelays NTLM authentication to LDAP services.
ResponderCaptures NTLM credentials.
CoercerTriggers forced authentication for relay.
CrackMapExecSupports relay-based attacks.

Relevant Artifacts

  • Security logs (4624, 4672, 4662)
  • LDAP query logs
  • Network logs for ports 389 / 636
  • Sysmon process and network telemetry
  • EDR telemetry

MITRE ATT&CK References

  • T1557 Adversary-in-the-Middle
  • T1557.001 NTLM Relay

Decision Tree

  1. Detect NTLM authentication to LDAP.
  2. Identify source host initiating relay.
  3. Inspect LDAP operations performed.
  4. Verify privileges of authenticated account.
  5. Determine persistence or privilege escalation outcome.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4662

EQL

network where destination.port in (389,636)

Sigma

title: LDAP Relay Activity
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4662
  condition: selection
level: high

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
LDAP signingRequire LDAP signingCriticalPrevents NTLM relay.
Channel bindingEnable LDAP channel bindingHighStops relay exploitation.
MonitoringAlert on unusual LDAP operationsHighDetects exploitation attempts.