This rule identifies the execution of known .NET-based Red and Black team utilities by matching process names against a curated list of security testing tools. Proactive hunting for these artifacts in Azure Sentinel is essential to distinguish legitimate security assessments from potential adversary activity that mimics tooling behavior to evade detection or conduct reconnaissance.
rule HKTL_NET_NAME_pentestscripts {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/c4bbage/pentestscripts"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "pentestscripts" 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/blue-team tools via name,” including suggested filters and exclusions:
Scenario: Scheduled Backup Jobs Using PowerShell
.exe wrappers or PowerShell scripts compiled as .NET applications to manage data replication. These processes frequently run under the SYSTEM account during off-hours and may have names resembling known security tools (e.g., Veeam.Backup.Service.exe).*Veeam*, *Rubrik*) when the parent process is a known service host (svchost.exe or wuauserv.exe) and the user context is NT AUTHORITY\SYSTEM.Scenario: Internal DevOps Deployment Agents
dotnet.exe, msbuild.exe, or custom wrappers named similarly to threat hunting tools (e.g., DeployAgent.Service).*DevAgent* or *Octopus.Worker*) running on specific host groups tagged as “Build Servers” or within the “CI-CD” OU.Scenario: Endpoint Management & Patching Tools