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

DFSCoerce

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


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4776NTLM authenticationCriticalMachine account authentication triggered via MS-DFSNM coercion.
Security4624Successful logonHighAuthentication event from coerced host.
Security4769Kerberos service ticket requestMediumService ticket activity following coerced authentication.
Security5140Network share accessedMediumSMB authentication events triggered by coercion.
Sysmon3Network connectionCriticalOutbound SMB or HTTP connection from coerced host to attacker-controlled relay system.
Sysmon1Process creationMediumExecution of DFSCoerce tool triggering authentication.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Machine account authenticationComputer account authenticating unexpectedly to remote hostCriticalTypical behavior after coercion.
Domain controller outbound authenticationDC initiating authentication to attacker systemCriticalHighly suspicious behavior.
NTLM authentication followed by relay activityAuthentication used immediately for NTLM relayHighCommon attack chain.
Execution of coercion toolsProcesses related to DFSCoerce exploitationCriticalDirect evidence of attack activity.
SMB connection to attacker hostCoerced host connecting to unusual destinationHighIndicates forced authentication.

Common Tools

ToolUsage
DFSCoerceExploits MS-DFSNM protocol to force machine authentication.
ntlmrelayxRelays coerced NTLM authentication to target services.
CoercerFramework automating coercion attacks.
CrackMapExecUsed with relay attacks to escalate privileges.
ImpacketProvides relay and authentication abuse capabilities.

Relevant Artifacts

  • Domain controller Security logs (4624, 4776, 4769)
  • SMB authentication logs
  • Network traffic logs showing outbound authentication
  • Sysmon logs (1, 3)
  • EDR telemetry identifying coercion tools
  • Prefetch artifacts for DFSCoerce execution
  • NTLM relay logs
  • Authentication logs on relay targets

MITRE ATT&CK References

  • T1187 Forced Authentication
  • T1557 Adversary-in-the-Middle
  • T1557.001 LLMNR/NBT-NS Poisoning and SMB Relay

Decision Tree

  1. Is the suspicious event present?
    • Identify machine account authentication events.
  2. What host generated the event?
    • Determine which server initiated authentication.
  3. Is the authentication expected?
    • Investigate whether system normally authenticates externally.
  4. Pivot:
    • Source host → inspect execution of DFSCoerce or coercion tools.
    • Destination host → analyze relay attempts.
    • Network → inspect SMB authentication flows.
  5. Confirm exploitation
    • Determine whether coerced authentication was relayed for privilege escalation.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4776
| where TargetUserName endswith "$"
DeviceNetworkEvents
| where RemotePort in (445,80,443)
| summarize count() by RemoteIP, InitiatingProcessAccountName, bin(TimeGenerated,5m)

EQL

any where event.code == "4776"

Sigma

title: Suspicious Machine Account Authentication via DFSCoerce
id: dfscoerce-detection
status: experimental
description: Detects machine account authentication possibly caused by DFSCoerce coercion
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4776
  condition: selection
fields:
  - TargetUserName
  - Workstation
falsepositives:
  - Legitimate machine authentication
level: medium
tags:
  - attack.lateral_movement
  - attack.t1187

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
NTLM restrictionsDisable or restrict NTLM authenticationCriticalPrevents relay exploitation.
SMB signingRequire SMB signing across domainHighStops NTLM relay attacks.
Patch managementApply security updates addressing DFS protocol abuseHighReduces attack surface.
MonitoringAlert on machine account outbound authenticationHighDetects coercion attempts.
Network segmentationLimit SMB communication between systemsMediumReduces relay opportunities.