This rule identifies the execution of known .NET-based red and blue team utilities by matching process names against a curated list of security tooling signatures. Proactive hunting for these artifacts in Azure Sentinel is essential to distinguish legitimate security operations from adversarial activity that may mimic similar tools to evade detection or establish persistence within the environment.
rule HKTL_NET_NAME_NativePayload_DNS2 {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/DamonMohammadbagher/NativePayload_DNS2"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "NativePayload_DNS2" 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/black-team tools via name,” including suggested filters and exclusions:
Scenario: Automated Vulnerability Scanning by Qualys or Tenable
QualysAgent.exe, TenableOneScanner.dll). These agents run scheduled scans during business hours, triggering the rule when they probe network ports or enumerate services.ImageName matches known vendor binaries (e.g., QualysAgent.exe, TenableOneScanner.exe) running under the context of the “System” or dedicated service accounts (e.g., DOMAIN\svc-qualys).Scenario: Microsoft Defender for Endpoint (MDE) Live Response
DefenderTool.exe or Microsoft.Security.Client.dll) that mimic the behavior of red-team reconnaissance tools like BloodHound or SharpUp.MsMpEng.exe (Antimalware Service Executable) or Sense.exe. Additionally, exclude events occurring within a specific “Investigation Window” tag if your SIEM supports custom attributes for analyst-initiated actions.Scenario: Scheduled PowerShell Reporting Jobs
PowerShell.exe loading custom .dll modules)