← Technology, Science & Infrastructure ▣ Distilled locally

From help desk impersonation to AD CS abuse: Investigating ESC1 and ESC8 intrusion paths

By Microsoft Security Research, Sagar Patil, Jesse Birch and Tal Tzhori
October 30, 2026  ·  Microsoft Security ↗
In this article
  1. Activity overview
  2. Attack chain overview
  3. Portable runtime staging and execution variants
  4. Host discovery and AD CS assessment
  5. Case 1: ESC1 abuse and the cost of an identity exclusion
  6. Case 2: PetitPotam and ESC8 turn a workstation into a domain-controller identity
  7. Why the response outcomes differed
  8. Actionable investigation methods
  9. References
  10. Learn More

Microsoft Threat Intelligence investigated two human-operated intrusions in which threat actors used Microsoft Teams messages and calls to impersonate IT or help desk personnel and socially engineer users into granting interactive remote access, primarily through Quick Assist. Once connected, the threat actors staged portable Python, Bun, or Java runtimes, performed host and network discovery, and assessed Active Directory Certificate Services (AD CS) for certificate-based authentication paths.

Although the incidents began with the same social-engineering and remote-access pattern, they diverged at the certificate layer. In Case 1, the threat actor abused an Enterprise CA Security Configuration 1 (ESC1) -vulnerable certificate template to obtain authentication certificates for privileged accounts and performed DCSync. In Case 2, the threat actor used PetitPotam, a technique that causes a Windows server to authenticate to an attacker-controlled system. The attacker relayed the domain controller’s New Technology (NT) LAN Manager (NTLM) authentication to AD CS Web Enrollment (ESC8), obtained a certificate for the domain-controller account, and used it for certificate-based Kerberos authentication (PKINIT – Public Key Cryptography for Initial Authentication).

This intrusion pattern is high impact because a user-approved remote session can become certificate-backed access to privileged identities and domain infrastructure. In Case 1, Microsoft Defender attack disruption restricted covered identities and blocked substantial follow-on activity, but a privileged identity excluded from automated containment remained usable and later supported data exfiltration. In Case 2, Defender generated ESC8-related alerts, after which the customer isolated the associated workstation and no further progression was observed. The activity did not exploit a vulnerability in Microsoft Teams; instead, it relied on social engineering and insecure or overly permissive AD CS configurations.

In this blog, we analyze the shared attack chain, the ESC1 and ESC8 certificate-abuse paths, and the different response outcomes. We also provide investigation methods, mitigation recommendations, Microsoft Defender detection guidance, and advanced hunting queries to help defenders identify and interrupt this access path. The activity described here is not attributed to a specific threat actor.

Activity overview

Risk to enterprise environments

Attack chain overview

Both incidents followed the same initial sequence: help desk impersonation through Teams, a user-approved Quick Assist or other remote-support session, archive transfer and extraction, portable runtime execution, and host and AD CS discovery. The certificate technique and response outcome then split into two distinct branches.

Diagram showing the shared attack chain with Teams help desk impersonation, remote access, runtime execution, and AD CS discovery, branching into ESC1 certificate-template abuse and ESC8 NTLM relay, w
Figure 1. Both incidents followed a shared entry and execution pattern before diverging into two AD CS abuse paths. Case 1 used an ESC1-vulnerable certificate template to obtain certificates for privileged identities. Case 2 used PetitPotam to coerce domain-controller authentication and relay it to AD CS Web Enrollment through ESC8. The response outcomes differed based on containment coverage and removal of the active execution point.

Shared initial access and execution pattern

Teams helpdesk impersonation and remote access

Both incidents began with Teams phishing messages and calls that impersonated support personnel. The social engineering persuaded a user to establish an attacker-controlled remote session, primarily by guiding the user to open Quick Assist and provide the connection code. This gave the attacker hands-on-keyboard access to the workstation. Across the broader activity, organization-themed onmicrosoft.com tenant names and support-oriented display names were used to make the external contact appear familiar.

Microsoft Teams call interface showing an external caller with “External” and “Scam suspected” warnings, illustrating visible signals of a support-impersonation attempt.
Figure 2. Example Teams call displaying External and Scam suspected indicators. These labels are important user-facing signals during support impersonation attempts.

The remote session was the decisive transition in the attack. Immediately after the user granted control through Quick Assist, the attacker used the session to place an archive in the victim’s Downloads folder. Commands launched during the session created a KB-prefixed staging directory under the user’s profile, extracted the archive into that directory, and started the included payload with a portable Python, JavaScript, or Java runtime. The payload then performed host and network discovery and began assessing AD CS.

Portable runtime staging and execution variants

The runtime and packaging varied between deployments, but the execution pattern remained consistent: an archive was placed on the device during the remote session, extracted into a newly created user-profile directory, and used to launch attacker-controlled code. In one JavaScript variant, a renamed executable retained version metadata identifying it as the Bun runtime and launched the staged loader. A separate variant used a staged Java runtime to launch a Java source file.

Sanitized command showing a renamed Bun runtime launched from an update-themed, user-writable staging directory to execute an attacker-controlled script after remote access.
Figure 3. Sanitized Bun staging command. The update-themed path, renamed runtime, script operand, and remote-session context form the useful investigation pattern.

File names alone are weak indicators. The actionable pattern is a portable runtime launched from a newly created, user-writable staging directory after an unauthorized remote session, followed by script execution, discovery commands, or connections to identity infrastructure.

Sanitized command showing a portable Java runtime launched from a user-writable staging directory to execute an attacker-controlled Java source file.
Figure 4. Sanitized Java staging variant. The campaign could substitute runtime and packaging choices while keeping the broader access pattern.

The Java variant confirms that runtime choice can change between deployments. The AD CS behavior in each incident should be validated through the initiating process, account, device, and certificate records rather than assumed from the presence of Bun or Java alone.

Host discovery and AD CS assessment

The staged components queried Windows version information, network configuration, and running processes. These commands are common in administration, but they become high-value signals when it is launched by a renamed runtime from an uncommon location and follow an unexpected remote-support session.

Sanitized command output showing Windows version, network-configuration, and running-process discovery initiated by a staged runtime after an unauthorized remote session.
Figure 5. Host-discovery commands from the first draft. Their value comes from the initiating staged runtime, user-writable path, and preceding unauthorized remote session.

The compromised workstation also connected to domain infrastructure using LDAPS and SMB.

From this shared workstation foothold, the incidents followed different certificate-abuse paths. In Case 1, the attacker exploited an ESC1-vulnerable certificate template. In Case 2, the attacker used PetitPotam to coerce domain-controller authentication and relay it to AD CS Web Enrollment through ESC8.

Case 1: ESC1 abuse and the cost of an identity exclusion

ESC1 certificate requests expand privilege

The first Teams-phishing wave targeted three user accounts and compromised one workstation. From the shared foothold described above, the attacker examined AD CS for a privilege-escalation path.

Diagram showing Teams help desk impersonation leading to remote access and ESC1 certificate abuse. Defender restricted most compromised identities, but an excluded privileged account remained availabl
Figure 6. Case 1: Help desk impersonation led to ESC1 certificate abuse. Attack disruption restricted most compromised identities, but an excluded privileged account remained usable and later supported data exfiltration.

The attacker found a certificate template vulnerable to ESC1. ESC1 describes a template configuration in which a requester can supply identity information in the certificate request and obtain a certificate that supports authentication. When broad enrollment rights and weak issuance controls are combined with that setting, a low-privileged account can request a certificate representing a privileged identity.

In the first wave, the attacker obtained certificates for three highly privileged accounts. Microsoft Defender attack disruption targeted the initially compromised user and those three certificate-compromised identities. Remote logons and Server Message Block (SMB) access were restricted and active sessions were disconnected. One privileged account was excluded from automated response, so containment did not apply to that identity.

Renewed phishing and ESC1 privilege expansion

About 90 minutes after the first disrupted session, the attacker launched a larger Teams-phishing wave targeting 16 users and compromised another workstation. The attacker again abused the ESC1-vulnerable template, this time obtaining certificates for eight additional privileged accounts.

Attack disruption targeted the newly compromised user and the eight certificate-compromised identities. More than 1,000 subsequent SMB file-access attempts and additional logon attempts were blocked, limiting the attacker’s ability to reuse those accounts for lateral movement.

DCSync, the excluded account, and data theft

Within seconds of obtaining one privileged certificate, the attacker authenticated to a domain controller and performed DCSync while containment was taking effect. Attack disruption limited additional replication and follow-on use, but the operation had already begun.

The privileged account excluded during the first disruption remained available. The attacker continued to use it for network and remote-interactive logons, reached a file server, and launched a renamed copy of Rclone using the filename SearchApp.exe. The command recursively copied data from a file-server share to an external Secure File Transfer Protocol (SFTP) destination, used 20 concurrent transfers, selected files up to three years old, and excluded several executable, database, virtual-disk, media, temporary, and log file types.

Sanitized Rclone command recursively copying files from a file-server share to an external SFTP destination using 20 concurrent transfers, an age filter, and file-type exclusions.
Figure 7. Sanitized Rclone command used to copy data from a file-server share to an external SFTP destination.

The incident demonstrates that partial identity containment can reduce attack activity while still leaving a viable privileged route.

Case 2: PetitPotam and ESC8 turn a workstation into a domain-controller identity

PetitPotam coerces domain-controller authentication

The ESC1 path used in the first case was not available in this environment. Instead, the attacker used PetitPotam to send requests over the Encrypting File System Remote Protocol (EFSRPC), causing the domain controller to authenticate to an attacker-controlled system using its machine account. The attacker then relayed that NTLM authentication to AD CS Web Enrollment without knowing the domain controller’s password.

Diagram showing Teams help desk impersonation leading to remote access, PetitPotam authentication coercion, NTLM relay to AD CS Web Enrollment, certificate-based Kerberos authentication, and customer-
Figure 8. Case 2: Help desk impersonation led to PetitPotam authentication coercion, ESC8 relay to AD CS, certificate-based Kerberos authentication, and customer-led device isolation.

NTLM relay reaches AD CS Web Enrollment

The attacker relayed the domain controller’s NTLM authentication to AD CS Web Enrollment. This technique is known as ESC8. It targets an enrollment web endpoint that accepts NTLM without sufficient relay protection, allowing the attacker to submit a certificate request as the relayed account.

The AD CS server authenticated the domain-controller machine account even though the connection originated from another device. That identity-to-source mismatch is a strong investigation pivot: correlate the machine account, source device, Web Enrollment request, Certification Authority (CA) issuance record, and subsequent Kerberos activity.

After authenticating to Web Enrollment as the domain controller, the attacker requested and retrieved a certificate using the Domain Controller template. The important service paths are the certificate submission and retrieval endpoints under /certsrv; isolated URL access is not malicious by itself and must be correlated with the authenticated identity, source device, process, and CA request.

Figure 9. Sanitized view of AD CS Web Enrollment activity involving certificate submission and retrieval through /certsrv, used during ESC8 certificate issuance for a relayed domain-controller identity.

Certificate-based Kerberos authentication

The attacker used the newly issued domain-controller certificate for Kerberos PKINIT and obtained a ticket-granting ticket (TGT) for the domain controller. This step converted a relayed NTLM authentication into a certificate-backed Kerberos identity.

PKINIT success is the response threshold: responders should investigate the requesting device, authenticated account, issued certificate, active Kerberos sessions, and any service-ticket use. Certificate revocation and Kerberos ticket review are separate containment actions.

Customer-led device isolation and observed outcome

Microsoft Defender generated ESC8-related alerts, after which the customer isolated the workstation associated with the certificate-enrollment and Kerberos activity. The documented containment action in this case was customer-led device isolation. No further attack progression was observed following isolation.

Why the response outcomes differed

In Case 1, an exclusion left a compromised privileged account available to the attacker despite disruption of other identities. In Case 2, customer-led device isolation followed Defender alerts, and no further attack progression was observed.

Response elementCase 1: ESC1Case 2: ESC8Response mechanismMicrosoft Defender automated attack disruption targeting compromised identities.Microsoft Defender alerts followed by customer-led device isolation.Measured effectCovered identities were restricted; more than 1,000 SMB attempts and additional logons were blocked; further DCSync activity was limited.The workstation associated with certificate enrollment and Kerberos activity was isolated.Containment follow-upOne privileged account was excluded from automated response and remained available to the attacker.No further progression was observed after isolation;Observed outcomeThe excluded identity was later used for file-server access and data exfiltration.No subsequent attack progression was documented after customer isolation.

Actionable investigation methods

The most useful artifacts are not individual commands or ports in isolation. Investigators should reconstruct the chain across collaboration, endpoint, identity, and certificate systems.

Reduce support impersonation and unauthorized remote access

Constrain runtime-based execution

Harden AD CS against ESC1 and ESC8

Enable certificate auditing and prepare certificate-aware response

Microsoft Defender XDR detections and disruption

Microsoft Defender XDR can connect collaboration, endpoint, identity, certificate, and Kerberos signals. Alert names and availability depend on product configuration and enabled sensors.

TacticObserved activityMicrosoft Defender coverageInitial accessExternal Teams contact impersonates IT support and initiates a remote session.Microsoft Defender for Cloud Applications / Office 365
– Microsoft Teams chat initiated by a suspicious external user
– IT Support Teams Voice phishing following mail bombing activity – A user clicked through to a potentially malicious URL.
– A potentially malicious URL click was detected.
– Suspicious Teams Chat likely involved in remote management and dangerous commands
– Possible Teams phishing affecting more than two users

Microsoft Defender for Endpoint
– Possible initial access from an emerging threatExecutionBun, or Java runs staged scripts from user-writable paths.Microsoft Defender for Endpoint
– Possible initial access from an emerging threat
– Suspicious JavaScript processDiscoveryStaged runtimes query host configuration and interact with domain infrastructure.Microsoft Defender for Identity
– Possible Active Directory Certificate Services enumeration
– Suspicious Active Directory Certificate Services (AD CS) certificate requestCredential accessESC1 certificate requests target privileged identities.Microsoft Defender for Endpoint
– Suspicious Domain Controller authentication to Active Directory Certificate Services server

Microsoft Defender for Identity
– Suspicious Active Directory Certificate Services (AD CS) misconfigured certificate template abuse (ESC1)Credential accessDomain-controller NTLM authentication reaches AD CS from another device.Microsoft Defender for Endpoint
– Possible NTLM relay attackCredential accessESC8 Web Enrollment issues a machine certificate after NTLM relay.Microsoft Defender for Endpoint
– Suspicious Active Directory Certificate Services (AD CS) machine certificate issuance abuse (ESC8)Credential accessPKINIT succeeds and a TGT is issued.Microsoft Defender for Identity
– Suspicious certificate usage over Kerberos protocol (PKINIT)
– Suspected suspicious Kerberos ticket requestImpact preventionCompromised identities or devices are restricted during an active incident.Microsoft Defender for Endpoint
– Possible source of DCSync attack

Microsoft Defender for Identity
– Suspected DCSync attack (replication of directory services)

Microsoft Security Copilot

Security Copilot can help analysts summarize the Teams-to-remote-access sequence, review staged runtime behavior, correlate certificate alerts with affected identities, and prepare containment tasks. Useful prompts should ask for the initiating device, remote-session context, certificate request, issued identity, PKINIT activity, and any response exclusions. Results depend on connected plugins, permissions, and the evidence available to the incident.

Threat intelligence reports

Microsoft customers can use Microsoft Defender XDR Threat Analytics to review relevant reports, related incidents, impacted assets, and recommended actions. Search for Teams support impersonation, portable Bun or Java runtimes, AD CS certificate abuse, NTLM relay, ESC1, ESC8, and certificate-based Kerberos authentication. Campaign-specific report.

Advanced hunting

Use these queries to investigate related activity. Tune time windows and filters for your environment. Matches require investigation.

Teams external contact and available impersonation signals

Use these queries as investigation starting points. Validate field availability and expected values in your tenant, tune for legitimate activity, and correlate matches with incidents rather than treating a single result as proof of compromise.

Teams external contact and available impersonation signals

Find external Teams chats and available impersonation signals.

CloudAppEvents
| where Timestamp > ago(7d)
| where Application == "Microsoft Teams"
| where (ActionType == "ChatCreated" and IsExternalUser == true) or ActionType in~ ( "TeamsImpersonationDetected", "SecurityRiskInCallDetected")
| order by Timestamp desc

Bun or Java execution from KB-prefixed staging paths

Find Bun or Java running scripts from KB-prefixed AppData folders.

DeviceProcessEvents
| where Timestamp > ago(7d)
| where ProcessVersionInfoOriginalFileName =~ "bun.exe" or FileName in~ ("bun.exe", "java.exe", "javaw.exe")
| where ProcessCommandLine contains ".js" or ProcessCommandLine contains ".java"
| where FolderPath matches regex @"(?i)\\AppData\\Roaming\\KB[0-9]+\\"
| order by Timestamp desc

Network activity initiated by the staged runtime

Find network connections initiated by the staged runtime.

DeviceNetworkEvents
| where Timestamp > ago(7d)
| where InitiatingProcessVersionInfoOriginalFileName =~ "bun.exe" or InitiatingProcessFileName in~ ( "bun.exe", "java.exe", "javaw.exe")
| where RemotePort in (80, 445, 636, 88)
| where InitiatingProcessFolderPath matches regex @"(?i)\\AppData\\Roaming\\KB[0-9]+\\"
| order by Timestamp desc

Enrollment, relay, and PKINIT alerts with their evidence

Find relay, AD CS, and PKINIT alerts with their related evidence.

AlertInfo
| where Timestamp > ago(7d)
| where Title contains "NTLM relay" or Title contains "Certificate Services" or Title contains "PKINIT" or Title contains "Kerberos ticket request"
| join kind=inner ( AlertEvidence | where Timestamp > ago(7d)
) on AlertId

MITRE ATT&CK techniques observed

This threat has exhibited use of the following attack techniques. For standard industry documentation, refer to the MITRE ATT&CK framework.

Initial Access

Command and Control

Execution

Defense Evasion

Discovery

Credential Access

Indicators of compromise (IOC)

IndicatorTypeRole85b6c424117494d3056e88689dbc94c75e9afdb187a339714043aec0da109f17SHA-256Initial Access Java Scriptf326201269f1ee2f803ae435317507263bb6e0dbfdeb70bd1bb5446e2e46f001SHA-256Initial Access python script06c5c14f043aee3bcc5843b5f50909623d5c9a6239a7c1fba9cddad4111469e7SHA-256Initial Access python script

References

Learn More

For the latest security research from the Microsoft Threat Intelligence community, check out the Microsoft Threat Intelligence Blog.

To get notified about new publications and to join discussions on social media, follow us on LinkedIn, X (formerly Twitter), and Bluesky.

To hear stories and insights from the Microsoft Threat Intelligence community about the ever-evolving threat landscape, listen to the Microsoft Threat Intelligence podcast.

Review our documentation to learn more about our real-time protection capabilities and see how to enable them within your organization.

The post From help desk impersonation to AD CS abuse: Investigating ESC1 and ESC8 intrusion paths appeared first on Microsoft Security Blog.

Originally published by Microsoft Security ↗ · rebuilt here from its own full-text RSS feed · all rights remain with the publisher, please read and support them there.