This rule identifies potential malicious payloads generated by the VirusConstructor tool, which adversaries use to create custom executables that may evade traditional signature-based detection. Proactively hunting for these artifacts in Azure Sentinel helps the SOC team uncover stealthy initial access or post-compromise activities that leverage obfuscated or packed binaries to establish a foothold within the environment.
rule Vx_VirusConstructorbased_additional: PEiD
{
strings:
$a = { E8 ?? ?? 5D 81 ?? ?? ?? 06 1E E8 ?? ?? E8 ?? ?? ?? ?? 2E ?? ?? ?? ?? ?? ?? B4 4A BB FF FF CD 21 83 ?? ?? B4 4A CD 21 }
condition:
$a 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 sysadmin uses PEB (Portable Executable Builder) or Resource Hacker to modify the version information, icon, or metadata of a custom internal utility or test binary. These tools often rewrite the PE header or append data in a way that resembles the structural anomalies detected by VirusConstructor-based YARA rules.
ResourceHacker.exe, PEB.exe, or dotnet.exe (if using a .NET-based PE editor) and the target file path resides in a designated C:\Dev\Builds\ or C:\Temp\PE_Editing\ directory.Scenario: An automated CI/CD pipeline or build agent uses ILSpy or dnSpy to decompile and recompile .NET assemblies for patching or analysis, resulting in a binary with a non-standard CLR header structure or embedded resources that trigger “additional” virus constructor patterns.
C:\builds\artifacts\, C:\jenkins\workspace\) where the parent process is msbuild.exe, dotnet.exe, or java.exe (for mixed-stack builds), and the file extension is .dll or .exe.Scenario: A security team or QA engineer uses UPX (Ultimate Packer for eXecutables) to compress a legitimate internal tool or test harness to reduce deployment size. UPX’s compression algorithm creates a specific header structure and code layout that can mimic the packing techniques used by VirusConstructor, especially if the original binary had already been slightly modified.
upx.exe or upx32.exe, or where