This rule detects the presence of the PCShrinker v0.20 malware, a known tool used for compressing and obfuscating payloads to evade static analysis. Proactively hunting for this signature in Azure Sentinel allows the SOC to identify compromised endpoints where adversaries may be staging or executing compressed malicious code before it is deployed.
rule PCShrinkerv020
{
meta:
author="malware-lu"
strings:
$a0 = { E8 E8 01 [2] 60 01 AD B3 27 40 ?? 68 }
condition:
$a0 at pe.entry_point
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Scenario: A developer or build engineer uses PCShrinker (a legitimate .NET assembly optimizer) to reduce the size of a custom internal library or application before deploying it to the staging environment. The tool is executed from a standard development workstation or CI/CD agent, triggering the YARA rule on the executable or the resulting optimized assembly.
C:\Dev\, C:\Builds\, or C:\CI\) or exclude processes spawned by known build agents (e.g., vstest.console.exe, dotnet.exe, or msbuild.exe) when the parent process is a recognized development tool.Scenario: An IT administrator performs a routine maintenance task on a legacy application server, using PCShrinker to optimize a large, outdated .NET application to improve startup times and reduce memory footprint. The tool is run manually via PowerShell or Command Prompt on a server in the AppServers OU.
AppServers or LegacyApps Organizational Unit (OU) if the process is initiated by an administrative account (e.g., DOMAIN\svc-admin or DOMAIN\it-mgmt) and the file path is under a known application directory (e.g., C:\Apps\LegacyApp\).Scenario: A scheduled task or PowerShell script in a production environment uses PCShrinker as part of a nightly build pipeline to optimize dependencies before packaging a release artifact. The task runs under a service account (e.g., DOMAIN\svc-build) and writes the optimized assembly to a shared network drive or artifact repository.
schtasks.exe or powershell.exe and