This rule detects the presence of PureBasic 4x DLLs, which are often leveraged by adversaries to execute custom or obfuscated payloads within Windows environments. Proactively hunting for these artifacts helps identify potential living-off-the-land techniques or custom tooling that may bypass standard application whitelisting controls.
rule PureBasic4xDLL : Neil Hodgson
{
meta:
author="malware-lu"
strings:
$a0 = { 83 7C 24 08 01 75 0E 8B 44 24 04 A3 ?? ?? ?? 10 E8 22 00 00 00 83 7C 24 08 02 75 00 83 7C 24 08 00 75 05 E8 ?? 00 00 00 83 7C 24 08 03 75 00 B8 01 00 00 00 C2 0C 00 68 00 00 00 00 68 00 10 00 00 68 00 00 00 00 E8 ?? 0F 00 00 A3 }
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.
C:\Program Files\ directory, triggering the YARA rule.
C:\Program Files\LegacyApp\) or exclude DLLs with specific version strings that match the known legacy application build.C:\Tools\ or C:\Scripts\ directories on jump servers or build agents. This is a one-time deployment or a scheduled update via a PowerShell script.
C:\Tools\ or C:\Scripts\ on designated jump servers, or exclude files owned by the devops-admin service account during the deployment window.%TEMP% or C:\Temp\) during execution, which is a common location for transient executables.
%TEMP% or C:\Temp\ if the parent process is a known scheduled task executable (e.g., schtasks.exe or powershell.exe running a specific script path) and the file is deleted shortly after execution.