This rule identifies potential Windows-specific C compiler artifacts or strings that may indicate the presence of custom or obfuscated native code execution, often used by adversaries to blend in with legitimate development tools. Proactively hunting for these signatures helps the SOC team uncover low-fidelity implantations or staging activities that might otherwise evade detection by standard behavioral analytics in Azure Sentinel.
rule Microsoft_C_for_Windows: PEiD
{
strings:
$a = { 33 ED 55 9A ?? ?? ?? ?? 0B C0 74 }
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.
cl.exe compiler during nightly build pipelines or CI/CD jobs.
msbuild.exe, dotnet.exe, or vstest.console.exe, or where the command line contains arguments like /c, /link, or /Zi (debug info) and the working directory is within a known source control path (e.g., C:\src\, D:\projects\).cl.exe to compile small utility tools or C-based agents on the fly.
powershell.exe, pwsh.exe, cmd.exe, or ansible-service-runner.exe, and the image path of cl.exe resides in the standard SDK installation directory (e.g., C:\Program Files (x86)\Microsoft Visual Studio\... or C:\Program Files\Microsoft Visual C++...).setup.exe, install.exe, msiexec.exe, or unins000.exe, and the execution occurs within a temporary directory (e.g., C:\Users\<user>\AppData\Local\Temp\ or C:\Windows\Temp\).