This rule targets a specific legacy PE executable signature associated with the “PESpin” family, indicating the presence of potentially aged or repurposed malware binaries that may be used for initial access or persistence. Proactively hunting for this artifact in Azure Sentinel helps identify dormant or overlooked threats that traditional signature-based detections might miss, ensuring that low-severity but potentially impactful legacy code is accounted for in the environment.
rule PESpin_V1304_cyberbobnbsp_nbsp_SignByfly_20080310: PEiD
{
strings:
$a = { EB 01 ?? 60 E8 00 00 00 00 8B 1C 24 83 C3 12 81 2B E8 B1 06 00 FE 4B FD 82 2C 24 88 DF 46 00 0B E4 74 9E 75 01 C7 81 73 04 D7 7A F7 2F 81 73 19 77 00 43 B7 F6 C3 6B B7 00 00 F9 FF E3 C9 C2 08 00 A3 68 72 01 FF 5D 33 C9 41 E2 17 EB 07 ?? EB 01 ?? EB 0D ?? E8 01 00 00 00 ?? 5A 83 EA 0B FF E2 EB 04 ?? EB 04 ?? EB FB ?? ?? ?? ?? ?? ?? ?? 8B 42 3C 03 C2 ?? ?? ?? ?? ?? ?? EB 02 ?? ?? F9 72 08 73 0E F9 83 04 24 17 C3 E8 04 00 00 00 ?? ?? ?? ?? EB 06 ?? ?? ?? ?? ?? ?? F5 72 0E F5 72 F8 68 EB EC 83 04 24 07 F5 FF 34 24 C3 }
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.
Legacy .NET Framework Compilation Artifacts: The string PESpin and SignByfly are often found in the metadata or embedded resources of executables compiled using older versions of the .NET Framework (specifically pre-4.0 or custom build pipelines) where specific compiler versions or third-party signing tools (like fly or similar legacy signers) leave distinct byte patterns. This can trigger on legitimate internal business applications, such as SQL Server Management Studio (SSMS) extensions or custom PowerShell scripts compiled to EXE via PS2EXE, especially if the build environment uses an outdated msbuild or csc.exe version.
C:\Program Files\Microsoft SQL Server\..., C:\Tools\PS2EXE\) or filter by file extension .exe if the hash of the known-good binary is whitelisted. Additionally, exclude paths containing \.net\ or msbuild in the directory tree.Legacy Java/JavaFX Application Packaging: Some older Java application packagers (e.g., jpackage predecessors or custom jar2exe tools) embed specific PE headers or resource strings that match the PESpin pattern, particularly if the application was signed using a legacy certificate chain or a specific version of signtool from the 2008-2010 era. This is common in enterprise desktop apps like Adobe Acrobat Reader (older versions), Java-based POS systems, or legacy ERP clients that have not been updated in years.
C:\Program Files (x86)\Java\, C:\Program Files\Adobe\, or specific vendor directories (e.g., `