From help desk impersonation to AD CS abuse: Investigating ESC1 and ESC8 intrusion paths | Microsoft Security Blog
Attackers impersonated help desk via Teams, gained Quick Assist remote access, then abused AD CS ESC1 and ESC8 misconfigurations to compromise privileged domain identities. Two investigated incidents used Teams-based social engineering to gain Quick Assist sessions, stage portable runtimes in KB-prefixed directories, and abuse AD CS. Case 1 exploited an ESC1-vulnerable template for privileged account certificates and performed DCSync; Case 2 used PetitPotam to relay domain-controller NTLM to ESC8 Web Enrollment for a DC certificate. An identity exclusion in Case 1 left a privileged account available for Rclone-based data exfiltration.
Detection / HunterZ.ai
Immediate Actions
- Review AD CS certificate templates for ESC1-vulnerable configurations and restrict enrollment rights
- Enable EPA and HTTPS on all AD CS Web Enrollment endpoints
- Isolate workstations associated with suspicious remote support sessions
- Revoke unauthorized certificates and review active Kerberos tickets
Key Takeaways
- Attackers staged portable Python, Bun, or Java runtimes in KB-prefixed AppData directories after Quick Assist sessions.
- Case 1 abused ESC1 template to obtain certificates for 11 privileged accounts across two phishing waves.
- Case 2 used PetitPotam over EFSRPC to relay domain-controller NTLM to AD CS Web Enrollment.
- An excluded privileged identity in Case 1 enabled Rclone data exfiltration via SFTP as SearchApp.exe.
- Certificate revocation does not invalidate already-issued Kerberos tickets; separate ticket review is required.
Attack Chain
- Initial Access: Teams phishing impersonates help desk; user grants Quick Assist remote session
- Execution: Archive extracted to KB-prefixed staging directory; portable runtime launches scripts
- Discovery: Staged runtime queries host config, network, processes; connects to domain infrastructure
- Credential Access: ESC1 template abuse or PetitPotam NTLM relay to ESC8 Web Enrollment for certificates
- Impact: Case 1 achieves DCSync and Rclone data exfiltration; Case 2 halted by device isolation
Affected Systems
- Microsoft Teams users receiving external calls
- Windows workstations with Quick Assist enabled
- Active Directory Certificate Services (AD CS)
- Windows domain controllers
- AD CS Web Enrollment endpoints
Detection Availability
- Published: KQL
- Platforms: Microsoft Defender XDR advanced hunting, Microsoft Defender for Endpoint, Microsoft Defender for Identity, Microsoft Defender for Cloud Applications
KQL advanced hunting queries provided for Teams impersonation, runtime execution, network activity, and alert correlation in Defender XDR.
Detection Engineering Assessment
Hunting Hypotheses
| Hypothesis | Telemetry | Stage | FP Risk |
|---|---|---|---|
| Portable runtime launched from KB-prefixed AppData directory following a remote support session (T1059.007, T1036) | DeviceProcessEvents with AppData KB path patterns | Execution | Low — KB-prefixed AppData paths are uncommon |
| Domain controller machine account authenticating to AD CS Web Enrollment from a non-DC device (T1557, T1649) | Defender for Identity ESC8 and PKINIT alerts | Credential Access | Medium — legitimate DC management may trigger |
| Renamed file transfer tool exfiltrating data to external SFTP destination (T1048) | DeviceNetworkEvents with outbound SFTP from renamed executables | Exfiltration | Medium — legitimate sync tools may match |
| Certificate request for privileged account submitted by low-privileged user via ESC1-vulnerable template (T1649) | AD CS audit logs with Subject SAN mismatch to requester | Credential Access | Low — privileged SAN from low-priv requester is abnormal |
Required Log Sources
- Microsoft Teams audit logs
- Defender for Endpoint process events
- Defender for Identity alerts
- AD CS certification authority audit logs
- IIS Web Enrollment logs
- Windows Security event logs
Control Gaps
- AD CS templates with ESC1-vulnerable configurations
- AD CS Web Enrollment lacking NTLM relay protections
- Application control not covering portable runtimes from user-writable paths
- Identity containment exclusions preserving attacker access paths
Recommendations
Infrastructure Hardening
- Disable NTLM on AD CS enrollment services where feasible
- Restrict Teams external access and federation to required domains
- Remove unnecessary AD CS Web Enrollment endpoints
- Enforce application control for portable runtimes from user-writable paths
User Protection
- Require verification of unsolicited support requests through known internal channels
- Alert when RMM tools extract archives or launch interpreters from user-writable paths
- Restrict remote-support software to approved products and operators
MITRE ATT&CK Mapping
- filenameSearchApp.exeRenamed Rclone binary used for SFTP data exfiltration
- sha25606c5c14f043aee3bcc5843b5f50909623d5c9a6239a7c1fba9cddad4111469e7Initial access Python script
- sha25685b6c424117494d3056e88689dbc94c75e9afdb187a339714043aec0da109f17Initial access JavaScript payload
- sha256f326201269f1ee2f803ae435317507263bb6e0dbfdeb70bd1bb5446e2e46f001Initial access Python script
Related
- Ransomware Leverage is Growing by the Terabyte: Takeaways from ThreatLabz 2026 Ransomware Report | Zscaler·1
- Impersonating IT support: how threat actors turn a remote session into enterprise-wide access | Microsoft Security Blog·1
- Inside AD CS Escalation: Unpacking Advanced Misuse Techniques and Tools·1