This rule identifies potential adversary activity by detecting C#-based red and black team tools through their unique TypeLibGUID signatures within Azure Sentinel logs. Proactive hunting for these specific tool identifiers is essential to distinguish legitimate security testing from malicious reconnaissance or lateral movement attempts that leverage similar C# frameworks.
rule HKTL_NET_GUID_sharpwmi {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/QAX-A-Team/sharpwmi"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "bb357d38-6dc1-4f20-a54c-d664bd20677e" 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, including suggested filters and exclusions:
Scenario: Scheduled PowerShell Health Checks
HealthMonitor.exe) that query system state. These scripts frequently instantiate .NET assemblies with specific TypeLibGUIDs similar to those used by red-team tools like Cobalt Strike’s Beacon or custom implant frameworks.C:\ProgramData\ITOps\Scripts\HealthMonitor.exe (Hash: [SHA256_HASH]) from triggering this rule if the parent process is Task Scheduler (SchTasks.exe).Scenario: Microsoft Endpoint Configuration Manager (SCCM) Client Updates
ccmsetup.exe or SMS_TSMClient.exe) utilizes C# components to manage software deployments and inventory. During the installation of new application packages, these components load TypeLibGUIDs that overlap with common red-team tool signatures (e.g., Mimikatz or SharpUp).Image contains \Microsoft Endpoint Configuration Manager\ and the command line includes arguments related to “Inventory” or “Deployment”.Scenario: Automated Backup Agents (e.g., Veeam or Commvault)