This hunt targets adversaries leveraging C#-based red and black team tools that expose unique TypeLibGUID artifacts to evade standard signature-based detection. Proactively searching for these specific GUIDs in Azure Sentinel allows the SOC team to identify stealthy reconnaissance or post-exploitation activities before they escalate into critical incidents, despite the rule’s current low severity classification.
rule HKTL_NET_GUID_HideFromAMSI {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/0r13lc0ch4v1/HideFromAMSI"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "b91d2d44-794c-49b8-8a75-2fbec3fe3fe3" 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 or exclusions:
Scenario: Automated Patch Management Deployment (SCCM/Microsoft Endpoint Configuration Manager)
ccmexec.exe) or the Software Center application executes C#-based deployment agents to install updates. These tools often instantiate specific .NET assemblies that generate typelibguid entries matching known red/black team signatures (e.g., Microsoft.Management.Infrastructure).ccmexec.exe or SoftwareCenter.exe AND the file path starts with C:\Windows\CCM\ or C:\Program Files (x86)\Microsoft Configuration Manager.Scenario: Enterprise Antivirus Real-Time Scanning
C:\Program Files\CrowdStrike\csagent.exe, C:\Program Files\Symantec Endpoint Protection\SmcGui.exe) and exclude any typelibguid events originating from these specific process IDs.Scenario: Scheduled PowerShell Automation Jobs
System.Management.Automation