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 indicators is essential to distinguish legitimate security tooling from malicious C# processes that may mimic known good applications to evade detection.
rule HKTL_NET_GUID_DInvisibleRegistry {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/NVISO-BE/DInvisibleRegistry"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "31d576fb-9fb9-455e-ab02-c78981634c65" 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 rule “Detects C# Red/Black-Team Tools via TypelibGUID,” including suggested filters and exclusions:
Scheduled .NET Application Deployment & Updates
TypelibGUIDs that match the rule’s signature for red-team reconnaissance tools.C:\Windows\CCM\CcmExec.exe, C:\ProgramData\chocolatey\bin\choco.exe) and restrict detection to non-business hours if the deployment is strictly scheduled for off-hours.Automated PowerShell Reporting & Compliance Jobs
System.Management.Automation. These scripts utilize common .NET type libraries that trigger the rule, mimicking the behavior of black-team enumeration tools.powershell.exe running under a specific service account (e.g., DOMAIN\svc-compliance) and exclude known internal script paths located in C:\Scripts\Compliance\.Microsoft Office 365 & OneDrive Sync Operations
SharpUp or PowerSploit.