This rule identifies potential adversary activity by detecting the execution of known Red and Black team .NET tools through their unique TypeLibGUID signatures within Azure Sentinel. Proactive hunting for these indicators is essential to distinguish legitimate security operations from malicious tool usage that may mimic trusted administrative processes, thereby reducing false positives and uncovering stealthy reconnaissance efforts.
rule HKTL_NET_GUID_donut {
meta:
description = "Detects .NET red/black-team tools via typelibguid"
reference = "https://github.com/TheWover/donut"
author = "Arnim Rupp"
date = "2021-01-21"
strings:
$typelibguid0 = "98ca74c7-a074-434d-9772-75896e73ceaa" ascii nocase wide
$typelibguid1 = "3c9a6b88-bed2-4ba8-964c-77ec29bf1846" ascii nocase wide
$typelibguid2 = "4fcdf3a3-aeef-43ea-9297-0d3bde3bdad2" ascii nocase wide
$typelibguid3 = "361c69f5-7885-4931-949a-b91eeab170e3" ascii nocase wide
condition:
(uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550) and any of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 4 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the rule “Detects .NET red/black-team tools via typelibguid,” including suggested filters and exclusions:
Scenario: Automated CI/CD Pipeline Execution
SYSTEM account on known CI/CD server hostnames (e.g., Jenkins-Server-01, ADO-Build-Pool). Additionally, filter out executions where the parent process is a recognized build agent (e.g., dotnet.exe, msbuild.exe) rather than an interactive user shell.Scenario: Enterprise Endpoint Management & Patching
ImageName matches known UEM agents (e.g., ccmexec.exe, IntuneManagementExtension.exe) and the execution occurs during defined maintenance windows (e.g., 02:00–04:00 local time).Scenario: Scheduled Antivirus & EDR Heuristic Scans