This detection rule identifies potential adversary activity by monitoring for C#-based Red and Blue team tools through their unique TypelibGUID signatures within Azure Sentinel. Proactively hunting for these specific tool identifiers allows the SOC team to distinguish legitimate security operations from malicious reconnaissance or lateral movement attempts that mimic standard administrative utilities.
rule HKTL_NET_GUID_memscan {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/nccgroup/memscan"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "79462f87-8418-4834-9356-8c11e44ce189" 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 1 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the “Detects C# Red/Black-Team Tools via TypelibGUID” rule, including suggested filters and exclusions:
Scenario: Automated CI/CD Pipeline Build Agents
msbuild.exe or dotnet.exe. These processes often instantiate C# assemblies that generate specific Type Library GUIDs associated with testing frameworks like NUnit or xUnit, which the rule interprets as Red/Black team reconnaissance tools.\BuildAgents\, \Jenkins\, or \AzureDevOpsAgent\. Additionally, filter out events where the parent process is msbuild.exe running under a service account (e.g., NT SERVICE\TeamFoundationBuild).Scenario: Scheduled Endpoint Protection Scans
FalconSensor.exe, MsMpEng.exe, or DefenderService.exe. Filter by excluding events where the command line arguments contain keywords like /scan, /update, or /heuristic.Scenario: Enterprise Office 365 Add-in Initialization
OUTLOOK.EXE or EXCEL.EXE) loads Type Libraries that mimic those used by Red