This YARA rule targets specific PE file structures associated with the FishPEShield tool, which adversaries use to obfuscate executables and evade static analysis. Proactively hunting for these signatures in Azure Sentinel allows the SOC to identify potentially hidden or tampered binaries before they execute, reducing the risk of stealthy malware deployment in the environment.
rule FishPEShield112116HellFish
{
meta:
author="malware-lu"
strings:
$a0 = { 55 8B EC 83 C4 D0 53 56 57 8B 45 10 83 C0 0C 8B 00 89 45 DC 83 7D DC 00 75 08 E8 BD FE FF FF 89 45 DC E8 E1 FD FF FF 8B 00 03 45 DC 89 45 E4 E8 DC FE FF FF 8B D8 BA 8E 4E 0E EC 8B C3 E8 2E FF FF FF 89 45 F4 BA 04 49 32 D3 8B C3 E8 1F FF FF FF 89 45 F8 BA 54 CA AF 91 8B C3 E8 10 FF FF FF 89 45 F0 BA AC 33 06 03 8B C3 E8 01 FF FF FF 89 45 EC BA 1B C6 46 79 8B C3 E8 F2 FE FF FF 89 45 E8 BA AA FC 0D 7C 8B C3 E8 E3 FE FF FF 89 45 FC 8B 45 E4 8B 58 04 03 5D E4 8B FB 8B 45 E4 8B 30 4E 85 F6 72 2B }
$a1 = { 60 E8 EA FD FF FF FF D0 C3 8D 40 00 ?? 00 00 00 2C 00 00 00 [3] 00 [2] 00 00 [3] 00 00 [2] 00 [3] 00 [3] 00 ?? 00 00 00 00 [2] 00 [2] 00 00 ?? 00 00 00 00 [2] 00 00 10 00 00 [3] 00 40 [3] 00 00 [2] 00 00 [2] 00 [3] 00 40 [3] 00 00 ?? 00 00 00 [2] 00 [2] 00 00 40 }
condition:
$a0 or $a1 at pe.entry_point
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Scenario: A developer or sysadmin uses a legitimate PE packing tool (e.g., UPX, MPRESS, or a custom internal packer) to compress a utility binary to reduce its size for distribution or to protect intellectual property. The specific byte patterns or section characteristics targeted by the FishPEShield112116HellFish YARA rule may match the header or section layout of these packed executables.
C:\Dev\, C:\Builds\, C:\Temp\) or exclude files with known packer signatures if the YARA rule is overly broad. Alternatively, create an allowlist for specific trusted packer executables (e.g., upx.exe, mpress.exe) and their output artifacts if they are consistently flagged.Scenario: An enterprise application installer (e.g., Adobe Creative Cloud, Microsoft Office, or a custom internal line-of-business app) deploys a self-extracting archive or a packed installer component to disk during a scheduled GPO or SCCM deployment. The temporary executable or intermediate binary generated during the installation process may exhibit the structural traits that trigger the rule.
MsiInstaller.exe, setup.exe from specific vendors) or files located in temporary installation directories (e.g., C:\Windows\Temp\, C:\Users\Public\Documents\). Correlate with the parent process being a known installer service.Scenario: A security team performs a manual test or uses a tool like PE-Bear, CFF Explorer, or a custom script to analyze or modify a PE file’s headers (e.g., adding a new section, changing the entry point, or adjusting checksum