Suspicious AppLocker XML Policy Import via PowerShell
Detection of PowerShell commands used to import AppLocker XML policies, potentially indicating an attempt to bypass security controls, as observed with Azorult malware.
This brief focuses on detecting the suspicious use of PowerShell to import AppLocker XML policies. Attackers may leverage this technique to impair defenses by modifying AppLocker policies to allow malicious executables or scripts to run, bypassing existing security measures. The observed behavior involves the use of “Import-Module Applocker” and “Set-AppLockerPolicy” commands combined with the “-XMLPolicy” parameter. This activity has been linked to malware such as Azorult, where adversaries attempt to weaken endpoint security to facilitate further compromise. Defenders should prioritize monitoring for this behavior, as successful manipulation of AppLocker policies can lead to significant security breaches and persistent access for malicious actors.
Attack Chain
- The attacker gains initial access to the system (details of initial access are not provided in the source).
- The attacker executes PowerShell.exe.
- The attacker imports the AppLocker module using
Import-Module Applocker. - The attacker uses the
Set-AppLockerPolicycmdlet with the-XMLPolicyparameter to specify a path to a malicious AppLocker XML policy file. - The malicious AppLocker policy is applied, potentially whitelisting attacker-controlled files or paths.
- The attacker executes previously blocked malicious code, leveraging the modified AppLocker policy.
- The attacker achieves persistence and further compromises the system.
Impact
Successful execution of this attack allows adversaries to impair endpoint defenses by modifying AppLocker policies. This can lead to the execution of malware that would otherwise be blocked. The observed behavior has been linked to the Azorult malware family. The compromise of endpoint security can allow for persistence, data exfiltration, and further lateral movement within the network.
Recommendation
- Deploy the Sigma rule
Detect AppLocker Policy Import via PowerShellto your SIEM to detect suspicious AppLocker policy modifications. - Enable Sysmon Event ID 1 and Windows Event Log Security 4688 to provide the necessary process creation and command-line auditing for the Sigma rule.
- Investigate any instances where
Import-Module ApplockerandSet-AppLockerPolicyare used together, especially when the-XMLPolicyparameter is present. - Review existing AppLocker policies for unexpected or unauthorized modifications.
Detection coverage 2
Detect AppLocker Policy Import via PowerShell
highDetects the use of PowerShell to import AppLocker XML policies, a technique used to weaken endpoint defenses.
Detect AppLocker Policy Import via Cmd
highDetects the use of cmd.exe to execute powershell commands to import AppLocker XML policies
Detection queries are kept inside the platform. Get full rules →