This detection identifies potential adversary activity by monitoring for C# Red and Black team tools that utilize specific TypeLibGUID identifiers within the Azure Sentinel environment. Proactively hunting for these signatures is essential to distinguish between legitimate security testing operations and malicious reconnaissance or tool deployment attempts that may otherwise blend into routine system noise.
rule HKTL_NET_GUID_MemoryMapper {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/jasondrawdy/MemoryMapper"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "b9fbf3ac-05d8-4cd5-9694-b224d4e6c0ea" 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 4 specific false positive scenarios for the “Detects C# Red/Black-Team Tools via TypelibGUID” rule, along with suggested filters:
Scenario: Automated CI/CD Pipeline Execution
NT SERVICE\Jenkins, AZDO-AGENT) and restrict detection to exclude paths within standard build directories like C:\Program Files\Microsoft Visual Studio or D:\Builds.Scenario: Microsoft Endpoint Manager (Intune) Policy Deployment
Microsoft.IntuneManagementAgent.exe) often deploys C# based configuration scripts and compliance checks. These scripts instantiate COM objects with specific TypeLib GUIDs that overlap with the rule’s detection logic for security tools.MicrosoftIntuneManagementAgent.exe and filter out events where the parent process is CcmExec.exe (System Center Configuration Manager) or MsMpEng.exe (Windows Defender).Scenario: Scheduled PowerShell Health Checks
HealthCheck, ReportGeneration, or specific internal script paths (e.g., `C:\Scripts\Ops\DailyCheck