This detection rule identifies the execution of known .NET-based Red and Black team tools by analyzing process names to distinguish legitimate security testing from potential adversary activity. Proactively hunting for these indicators in Azure Sentinel is essential to differentiate between authorized penetration tests and malicious reconnaissance or lateral movement attempts that mimic similar tooling patterns.
rule HKTL_NET_NAME_petaqc2 {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/fozavci/petaqc2"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "petaqc2" 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 4 specific false positive scenarios for the rule “Detects .NET red/blue-team tools via name,” along with recommended filters or exclusions:
Scenario: Scheduled Backup and Maintenance Jobs
.NET executables (e.g., Veeam.Backup.Service.exe, Rubrik.Agent.exe) that run on a strict schedule. These tools may contain naming patterns similar to security utilities, triggering the rule during routine data protection windows.ImageName matches known backup service executables and the ParentProcessName is svchost.exe or TaskScheduler.exe, specifically during defined maintenance windows (e.g., 02:00–04:00 local time).Scenario: Endpoint Management and Patching Agents
ConfigMgrSMS.exe, Ivanti.Agent.DotNet.dll).C:\Program Files\Microsoft Configuration Manager\ or C:\ProgramData\Ivanti\) where the CommandLine contains keywords like “inventory,” “patching,” or “compliance.”Scenario: Internal .NET Development and Build Pipelines