This rule identifies the execution of known .NET-based red and blue team utility names to distinguish legitimate security testing activities from potential adversary use of similar frameworks for lateral movement or command-and-control operations. Proactive hunting is essential in Azure Sentinel to establish a baseline of authorized tool usage, enabling analysts to quickly differentiate between expected security exercises and suspicious deviations that may indicate an active threat leveraging .NET processes to evade detection.
rule HKTL_NET_NAME_directInjectorPOC {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/badBounty/directInjectorPOC"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "directInjectorPOC" ascii wide
$compile = "AssemblyTitle" ascii wide
condition:
(uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550) and all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the rule “Detects .NET red/red-black-team tools via name,” along with suggested filters and exclusions:
Scenario: Automated Backup Jobs Executing .NET Utilities
Veeam.Backup.Service.exe or generic names containing “RedTeam” in the path if custom scripts are involved.C:\Program Files\Veeam\Backup and Replication\...) and exclude processes where the parent process is a recognized backup engine (e.g., vbr.exe, commvault.exe).Scenario: CI/CD Pipeline Agents Running .NET Build Tools
dotnet.exe, msbuild.exe, or specific red-team simulation frameworks during the compilation and testing phases. These often mimic the naming conventions of security assessment tools.^BUILD-SRV-.*$) where the command line contains keywords like “build,” “test,” or “publish” rather than active reconnaissance commands.Scenario: IT Admin Performing Software Deployment via PowerShell
PowerShell.exe spawning a custom .exe). If the admin is using a tool named “RedTeam-Deploy” for internal patching,