This rule detects the presence of a modified version of the PENinja tool, a popular open-source penetration testing utility that adversaries may repurpose for reconnaissance or lateral movement within the environment. Proactively hunting for this artifact in Azure Sentinel allows the SOC to identify potential unauthorized testing activities or compromised endpoints where attackers have deployed familiar tools to blend in with legitimate administrative tasks.
rule PENinjamodified
{
meta:
author="malware-lu"
strings:
$a0 = { 5D 8B C5 81 ED B2 2C 40 00 2B 85 94 3E 40 00 2D 71 02 00 00 89 85 98 3E 40 00 0F B6 B5 9C 3E 40 00 8B FD }
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.
System.Reflection to dynamically load custom classes or perform runtime code analysis for plugin architectures.
java.exe, dotnet.exe, w3wp.exe) and the loaded module name contains common framework identifiers like System.Core.dll, mscorlib.dll, or libjvm.dll.NtLoadDriver or reflection-based injection techniques to maintain stealth.
FalconSensor.exe, cb.exe, SentinelOneAgent.exe) or where the injection target is a system process (e.g., svchost.exe, csrss.exe) initiated by a trusted service account.svc_backup, backup_admin) and where the command line or process path contains keywords like backup, snapshot, or agent (e.g., VeeamBackup.exe, CommvaultAgent.exe).