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.
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.

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.

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.
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.

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.

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.
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.

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.
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.

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.
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.
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.

The incident demonstrates that partial identity containment can reduce attack activity while still leaving a viable privileged route.
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.

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.

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.
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.
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 element | Case 1: ESC1 | Case 2: ESC8 |
| Response mechanism | Microsoft Defender automated attack disruption targeting compromised identities. | Microsoft Defender alerts followed by customer-led device isolation. |
| Measured effect | Covered 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-up | One privileged account was excluded from automated response and remained available to the attacker. | No further progression was observed after isolation; |
| Observed outcome | The excluded identity was later used for file-server access and data exfiltration. | No subsequent attack progression was documented after customer isolation. |
The most useful artifacts are not individual commands or ports in isolation. Investigators should reconstruct the chain across collaboration, endpoint, identity, and certificate systems.
Microsoft Defender XDR can connect collaboration, endpoint, identity, certificate, and Kerberos signals. Alert names and availability depend on product configuration and enabled sensors.
| Tactic | Observed activity | Microsoft Defender coverage |
| Initial access | External 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 |
| Execution | Bun, or Java runs staged scripts from user-writable paths. | Microsoft Defender for Endpoint – Possible initial access from an emerging threat – Suspicious JavaScript process |
| Discovery | Staged 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 request |
| Credential access | ESC1 certificate requests target privileged identities. | Microsoft Defender for Endpoint – Suspicious Domain Controller authentication to Active Directory Certificate Services server Microsoft Defender for Identity |
| Credential access | Domain-controller NTLM authentication reaches AD CS from another device. | Microsoft Defender for Endpoint – Possible NTLM relay attack |
| Credential access | ESC8 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 access | PKINIT succeeds and a TGT is issued. | Microsoft Defender for Identity – Suspicious certificate usage over Kerberos protocol (PKINIT) – Suspected suspicious Kerberos ticket request |
| Impact prevention | Compromised identities or devices are restricted during an active incident. | Microsoft Defender for Endpoint – Possible source of DCSync attack Microsoft Defender for Identity |
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.
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.
Use these queries to investigate related activity. Tune time windows and filters for your environment. Matches require investigation.
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
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
| Indicator | Type | Role |
| 85b6c424117494d3056e88689dbc94c75e9afdb187a339714043aec0da109f17 | SHA-256 | Initial Access Java Script |
| f326201269f1ee2f803ae435317507263bb6e0dbfdeb70bd1bb5446e2e46f001 | SHA-256 | Initial Access python script |
| 06c5c14f043aee3bcc5843b5f50909623d5c9a6239a7c1fba9cddad4111469e7 | SHA-256 | Initial Access python script |
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.