This rule detects the presence of a specific malicious DLL masquerading as a Microsoft Visual C++ component, indicating an adversary is likely employing living-off-the-land or dynamic linking techniques to execute code or establish persistence. Proactively hunting for this artifact in Azure Sentinel allows the SOC to identify compromised endpoints before the malicious module is fully loaded or leveraged for further lateral movement or privilege escalation.
rule MSLRHv032afakeMSVCDLLMethod4emadicius
{
meta:
author="malware-lu"
strings:
$a0 = { 55 8B EC 56 57 BF 01 00 00 00 8B 75 0C 85 F6 5F 5E 5D EB 05 E8 EB 04 40 00 EB FA E8 0A 00 00 00 E8 EB 0C 00 00 E8 F6 FF FF FF E8 F2 FF FF FF 83 C4 08 74 04 75 02 EB 02 EB 01 81 50 E8 02 00 00 00 29 5A 58 6B C0 03 E8 02 00 00 00 29 5A 83 C4 04 58 74 04 75 02 EB 02 EB 01 81 0F 31 50 0F 31 E8 0A 00 00 00 E8 EB 0C 00 00 E8 F6 FF FF FF E8 F2 FF FF FF }
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 system administrator uses a legitimate third-party build tool or compiler (e.g., MinGW, MSYS2, or a custom C++ wrapper) that links against or mimics standard Microsoft Visual C++ runtime DLLs (such as msvcr100.dll or vcruntime140.dll) to create static or dynamic libraries for cross-platform compatibility. The YARA rule may flag the binary if it contains specific string patterns or section structures that resemble the “fake” MSVC DLL method described in the rule name, even though the intent is standard compilation.
C:\Program Files (x86)\Microsoft Visual Studio\, C:\msys64\, C:\MinGW\) or exclude processes spawned by known compiler executables (cl.exe, gcc.exe, mingw32-gcc.exe).Scenario: An enterprise application or service (e.g., Adobe Creative Cloud, Oracle Java, or VMware Tools) bundles its own private copy of Visual C++ runtime DLLs in its installation directory to ensure version consistency and avoid dependency conflicts. These bundled DLLs may have slightly modified headers or internal strings that trigger the “fake MSVC” heuristic, especially if the application is signed by a non-Microsoft publisher.
de.exe, javaw.exe, vmtoolsd.exe) or exclude files located in application-specific subdirectories (e.g., C:\Program Files\Adobe\, C:\Program Files\Java\) that are not in the global System32 or WinSxS folders.Scenario: A scheduled maintenance job or backup utility (