Untrusted DLL Loaded by Azure AD Connect Authentication Agent
The loading of an untrusted DLL by the Azure AD Connect Authentication Agent, potentially indicating credential access attempts via the Pass-through Authentication service, is detected by this rule.
The Azure AD Connect Authentication Agent facilitates pass-through authentication (PTA) in hybrid environments. Attackers may attempt to load malicious DLLs into the AzureADConnectAuthenticationAgentService.exe process to intercept or persist credentials. This involves placing an untrusted DLL in a location where the service will load it, such as a directory with weak permissions or through DLL side-loading. Successful exploitation allows attackers to capture user credentials as they are processed by the PTA service, potentially leading to domain compromise. This activity specifically targets systems utilizing Azure AD Connect with PTA enabled. Defenders should monitor for unexpected DLL loads by the Azure AD Connect Authentication Agent to identify and prevent credential access attempts.
Attack Chain
- An attacker gains initial access to a system hosting the Azure AD Connect Authentication Agent.
- The attacker identifies a location where they can place a malicious DLL that the
AzureADConnectAuthenticationAgentService.exeprocess will load, such as a directory with weak permissions or a location susceptible to DLL side-loading. - The attacker places a malicious DLL (e.g.,
evil.dll) into the identified location. - The
AzureADConnectAuthenticationAgentService.exeprocess is started or restarted. - The
AzureADConnectAuthenticationAgentService.exeprocess loads the malicious DLL (evil.dll). - The malicious DLL intercepts or captures credentials as they are processed by the PTA service.
- The attacker exfiltrates the captured credentials.
- The attacker uses the stolen credentials to gain unauthorized access to other systems or resources.
Impact
Successful exploitation allows attackers to intercept credentials handled by the Azure AD Connect Authentication Agent. This can lead to the compromise of user accounts and the ability to move laterally within the environment. Organizations using Azure AD Connect with Pass-through Authentication are at risk. The impact includes potential data breaches, unauthorized access to sensitive information, and domain compromise.
Recommendation
- Implement the Sigma rule
Untrusted DLL Loaded by Azure AD Connect Authentication Agentto detect the loading of untrusted DLLs by the Azure AD Connect Authentication Agent service in your environment. - Monitor process creation events for
AzureADConnectAuthenticationAgentService.exeloading DLLs outside of the standard Microsoft directories, as defined in the Sigma rule. - Enable Sysmon Event ID 7 (Image Loaded) logging to provide the necessary data for the Sigma rule to function effectively.
- Restrict write access to the Azure AD Connect Authentication Agent directories to prevent unauthorized DLL placement.
- Review administrative access to the PTA host to prevent unauthorized modifications.
Detection coverage 2
Untrusted DLL Loaded by Azure AD Connect Authentication Agent
highDetects the loading of an untrusted DLL by the Azure AD Connect Authentication Agent, which may indicate an attempt to persist or intercept credentials.
Azure AD Connect Authentication Agent Loading DLL from Suspicious Path
mediumDetects Azure AD Connect Authentication Agent loading a DLL from a suspicious path, potentially indicating DLL side-loading or compromise.
Detection queries are kept inside the platform. Get full rules →