Technical Analysis & Remediation
MITRE ATT&CK Mapping
T1562.001
Impair Defenses: Disable or Modify Tools.
T1562.002
Impair Defenses: Disable Windows Event Logging (Secondary effect).
T1112
Modify Registry (To enable AppIDSvc).
CVE Profile
Status
Feature Abuse (No specific CVE). Relying on legitimate administrative functions (Set-AppLockerPolicy).
Active Exploitation
Confirmed. Historically linked to Azorult loader; currently productized in "GhostLocker" PoC.
Live Evidence & Indicators of Compromise (IOCs) Based on the ipurple.team analysis, look for the following specific artifacts:
Service Modification
The AppIDSvc (Application Identity) service is normally set to Manual. GhostLocker forces it to Auto: Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\AppIDSvc" -Name Start -Value 2.
Registry Artifacts
AppLocker rules are stored and enforced from: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\SrpV2. Look for new subkeys under SrpV2\Exe containing rules with Action="Deny".
Targeted Processes (String Literals)
The PoC specifically scans for and blocks:
MpDefenderCoreService.exe
MsMpEng.exe
WinDefend.exe.
Event Logs
Event ID 8001
AppLocker policy applied successfully.
Event ID 8004
AppLocker blocked a file (This will flood logs if the EDR attempts to restart).
Remediation - THE ENTERPRISE TRACK (SANS PICERL)
Phase 1: Identification & Containment
Query AppLocker Status
Run PowerShell to check for active Deny rules targeting your security tools:
PowerShell
Code:
Get-AppLockerPolicy -Effective | Test-AppLockerPolicy -Path "C:\Program Files\Windows Defender\MsMpEng.exe" -User Everyone
If the result is Denied, the host is compromised.
Isolate
Move the host to a VLAN with strict egress filtering. Do NOT reboot the host yet if the EDR is still running; rebooting will trigger the block.
Phase 2: Eradication
Strip Malicious Policies
You must clear the AppLocker local policy. Note: This clears all local AppLocker rules.
PowerShell
Code:
Set-AppLockerPolicy -XMLPolicy '<AppLockerPolicy Version="1"><RuleCollection Type="Exe" EnforcementMode="NotConfigured" /></AppLockerPolicy>'
Alternatively, manually delete the SrpV2 registry keys if GPO allows.
Reset AppIDSvc
Set the Application Identity service back to Manual (Start=3) if your environment does not use AppLocker. Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\AppIDSvc" -Name Start -Value 3
Phase 3: Recovery
Force Update
Run gpupdate /force to re-apply legitimate domain-level AppLocker policies.
Validation
Reboot the host and confirm MsMpEng.exe starts successfully.
Phase 4: Lessons Learned
Detection Logic
Implement SIEM alerts for Event ID 8001 where the XML policy contains "Action=Deny" AND "MsMpEng.exe".
Hardening
Restrict Local Administrator rights strictly. This technique requires Admin privileges to modify the AppLocker policy.
Remediation - THE HOME USER TRACK
Priority 1: Safety (Scan & Verify)
Do not restart your computer if you suspect an infection until you have checked your security software status.
Open Windows Security. If it says "Managed by your administrator" or refuses to open, you may be affected.
Download a standalone scanner (like Microsoft Safety Scanner) to a USB drive from a clean computer and run it on the affected machine.
Priority 2: Restore Functionality
Open PowerShell as Administrator.
Run this command to clear local blocking rules
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\SrpV2" -Recurse -ErrorAction SilentlyContinue
Restart your computer.
Hardening & References
CIS Benchmark
Ensure 2.2.4 User Rights Assignment restricts "Debug programs" and "Load and unload device drivers" to Administrators only.
Defensive Strategy
AppLocker rules are additive. A local Deny rule merges with Domain Allow rules. Use Signed Binary enforcement in AppLocker to prevent untrusted code (like the GhostLocker executable) from running in the first place.
Sources
AppLocker Rules Abuse – Purple Team
Splunk Security Blog