This YARA rule targets the “FakeNinjav28AntiDebugSpirit” signature, which likely identifies a specific variant of malware or a custom implant designed to evade debugging techniques during execution. Proactively hunting for this signature in Azure Sentinel allows the SOC to detect low-severity, potentially stealthy adversary footholds or testing artifacts that may precede more significant post-exploitation activities.
rule FakeNinjav28AntiDebugSpirit
{
meta:
author="malware-lu"
strings:
$a0 = { 64 A1 18 00 00 00 EB 02 C3 11 8B 40 30 EB 01 0F 0F B6 40 02 83 F8 01 74 FE EB 01 E8 90 C0 FF FF EB 03 BD F4 B5 64 A1 30 00 00 00 0F B6 40 02 74 01 BA 74 E0 50 00 64 A1 30 00 00 00 83 C0 68 8B 00 EB 00 83 F8 70 74 CF EB 02 EB FE 90 90 90 0F 31 33 C9 03 C8 0F 31 2B C1 3D FF 0F 00 00 73 EA E8 08 00 00 00 C1 3D FF 0F 00 00 74 AA EB 07 E8 8B 40 30 EB 08 EA 64 A1 18 00 00 00 EB F2 90 90 90 BA [4] FF E2 64 11 40 00 FF 35 84 11 40 00 E8 40 11 00 00 6A 00 6A 00 FF 35 70 11 40 00 FF 35 84 11 40 00 E8 25 11 00 00 FF }
condition:
$a0
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Scenario: A developer or QA engineer runs a custom-built internal application (e.g., InternalBillingService.exe) that includes the “FakeNinjav28” anti-debugging library to protect intellectual property during local testing. The YARA rule matches the specific byte sequence or string signature embedded in the binary, triggering an alert even though the process is running under a standard user account with no network connectivity.
devenv.exe, code.exe, msbuild.exe) OR exclude files located in specific development directories (e.g., C:\Dev\Projects\, C:\Users\<User>\AppData\Local\Temp\) if the file hash is whitelisted in the asset inventory.Scenario: An IT administrator performs a scheduled maintenance task using a proprietary vendor tool (e.g., VendorBackupAgent.exe) that uses the “FakeNinjav28” anti-debugging mechanism to prevent tampering during backup operations. The tool runs via a scheduled task (Task Scheduler) and executes the binary from a standard system path, causing the YARA scan to flag the binary as suspicious due to its anti-debugging traits.
C:\Program Files\VendorBackup\VendorBackupAgent.exe) and verify the digital signature matches the known vendor certificate. Additionally, exclude processes spawned by schtasks.exe or Task Scheduler if the executable is signed by a trusted vendor.Scenario: A software vendor updates their client application (e.g., CRMClient.exe) and inadvertently includes the “FakeNinjav28” anti-debugging stub in the new release. The application is deployed via Group Policy or a software distribution tool (e.g., SCC