This rule detects the execution of known .NET-based offensive and defensive security tools by matching process names against a curated list of Red Team and Black Team utilities. Proactively hunting for these artifacts in Azure Sentinel is essential to distinguish legitimate security operations from adversarial activity that may mimic trusted tooling to evade detection or establish persistence.
rule HKTL_NET_NAME_xbapAppWhitelistBypassPOC {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/jpginc/xbapAppWhitelistBypassPOC"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "xbapAppWhitelistBypassPOC" 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,” along with suggested filters and exclusions:
Scenario: Automated Backup Jobs Executing dotnet or Specific Tool Names
Veeam.Backup.Service.exe containing “Backup” and ”.NET”) or explicitly invoke dotnet.exe with arguments matching known red-team tool signatures during nightly maintenance windows.vssvc.exe, commvault_agent.exe) combined with a Time-of-Day filter to allow activity only between 02:00 and 06:00. Additionally, exclude processes running under specific service accounts like NT SERVICE\VeeamBackup.Scenario: CI/CD Pipeline Build Agents Running .NET Workflows
msbuild.exe, nuget.exe, or generic dotnet processes which may match the name patterns of red-team reconnaissance tools (like SharpUp or PowerSploit) due to shared naming conventions in the .NET ecosystem.AZDO-BUILD-SVC, Jenkins-Agent-01). Furthermore, filter out events originating from specific IP ranges dedicated to the CI/CD infrastructure subnet.**Scenario: IT Admin Performing Legitimate PowerShell Scripting with .NET