This rule detects the presence of the BamBam ransomware strain, a known threat actor that typically leverages PowerShell or batch scripts to encrypt files and establish persistence. Proactively hunting for this signature allows the SOC team to identify early-stage infections or dormant payloads in Azure environments before the ransomware executes its encryption routine and disrupts operations.
rule BamBamv001Bedrock
{
meta:
author="malware-lu"
strings:
$a0 = { 6A 14 E8 9A 05 00 00 8B D8 53 68 FB [2] 00 E8 6C FD FF FF B9 05 00 00 00 8B F3 BF FB [2] 00 53 F3 A5 E8 8D 05 00 00 8B 3D 03 [2] 00 A1 2B [2] 00 66 8B 15 2F [2] 00 B9 80 [2] 00 2B CF 89 45 E8 89 0D 6B [2] 00 66 89 55 EC 8B 41 3C 33 D2 03 C1 }
condition:
$a0
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
bootstrap.ps1 or init.sh) contain inline base64-encoded configuration blocks or embedded YARA signatures for self-testing.
ansible-playbook.exe, terraform.exe, or powershell.exe launched by python.exe/node.exe (CI/CD agents), and limit the path to standard CI/CD working directories (e.g., C:\Jenkins\workspace\, C:\AzureDevOps\).yara64.exe) to verify that specific detection rules (like BamBamv001Bedrock) are present in the local rule set.
powershell.exe or pwsh.exe and the command line contains arguments like -Rule, scan, or verify, or where the working directory is a known admin utility folder (e.g., C:\AdminTools\, C:\Scripts\).FalconService.exe or cb.exe) periodically loads YARA rules from its local cache directory to perform continuous memory scanning.
FalconService.exe, cb.exe, defender.exe) and the file path resides within the vendor’s