Monday, May 12, 2025
Advertisements

New Technique Allows Attackers to Steal Microsoft Entra Tokens Using Beacon

by Charline

A newly discovered method enables attackers to obtain Microsoft Entra refresh tokens from compromised endpoints using Cobalt Strike Beacon, potentially bypassing multi-factor authentication (MFA) and maintaining persistent access to cloud resources.

The technique, revealed on May 9, 2025, targets scenarios where traditional Primary Refresh Token (PRT) extraction isn’t feasible, especially on non-domain-joined or Bring Your Own Device (BYOD) setups.

Advertisements

Expanding the Attack Surface for Azure Token Theft

The attack leverages a new Beacon Object File (BOF) added to TrustedSec’s Remote Operations repository, named “get_azure_token.” Developed by Christopher Paschen, this tool exploits existing browser authentication to Entra by initiating an authorization code flow. It captures the authorization code to request access and refresh tokens.

Advertisements

However, the original approach had limitations. It required the specified client ID to permit “http://localhost” as the redirect URI, restricting attackers to using only a few Microsoft applications that support this configuration.

Advertisements

Paschen identified three Microsoft applications with the necessary Family of Client IDs (FOCI) capabilities that allow this: Microsoft Azure CLI, Microsoft Azure PowerShell, and Visual Studio – Legacy.

Advertisements

Overcoming the Limitation

To bypass this restriction, Paschen created an improved technique using Microsoft’s native client redirect URI . This method allows the attacker to extract the authorization code from the browser window title using the GetWindowTextA API.

This enhancement significantly broadens the attack’s reach, making it possible to target popular Microsoft applications like Teams, Copilot, and Edge. These applications are less likely to trigger security alerts, improving operational security for attackers.

Proof of Concept: The BOF in Action

The technique is straightforward to execute with a simple command. It is particularly concerning because all authentication and token requests appear to originate from the compromised endpoint’s IP address, making detection difficult.

When combined with post-exploitation tools like GraphSpy, attackers can maintain access to cloud resources, even if initial access is lost.

Potential Impact and Security Recommendations

While Paschen notes that PRT extraction remains a more reliable method for persistent identity access when feasible, this new technique provides attackers with an alternative when traditional methods fail.

Organizations are urged to implement thorough monitoring for suspicious authentication activities, particularly those involving sensitive Microsoft applications and Graph API access. This approach will help identify potential threats and mitigate the risk of unauthorized access to cloud resources.

Advertisements

You may also like

blank

At ProxyServerPro, we are dedicated to providing cutting-edge proxy solutions tailored to meet the diverse needs of businesses and individuals. Our platform offers a comprehensive range of high-performance proxies, including residential, datacenter, and mobile options, ensuring seamless browsing, data scraping, and online anonymity. With a focus on reliability, speed, and security, we empower users to navigate the digital landscape with confidence. Whether you’re managing ad verification, market research, or web automation, ProxyServerPro is your trusted partner for scalable, efficient, and secure proxy services. Explore our portal to discover how we can elevate your online experience.

© 2024 Copyright  proxyserverpro.com