This hunt hypothesis targets adversaries leveraging C#-based red or black team tools that expose unique TypeLibGUID artifacts to evade standard signature-based detection. Proactively hunting for these specific GUIDs in Azure Sentinel is critical because it enables the SOC team to identify stealthy reconnaissance and post-exploitation activities that often bypass initial low-severity alerts.
rule HKTL_NET_GUID_DLL_Injection {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/ihack4falafel/DLL-Injection"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "3d7e1433-f81a-428a-934f-7cc7fcf1149d" 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: Microsoft Endpoint Configuration Manager (SCCM) Application Deployment
ccmexec.exe) frequently executes C#-based deployment scripts or custom applications during scheduled maintenance windows. These tools often instantiate COM libraries with specific typelibguid values that overlap with known red-team frameworks (e.g., SharpUp, Cobalt Strike Beacon).ccmexec.exe running under the NT SERVICE\CCMEXEC or SYSTEM account. Additionally, whitelist specific typelibguid values associated with known SCCM custom deployments found in your environment’s baseline.Scenario: Automated Backup and Recovery Jobs (Veeam/Commvault)
typelibguid entries that mimic the behavior of red-team lateral movement tools, particularly when running as scheduled tasks during off-hours.C:\Program Files\Veeam\Backup and Replication\Agent) and the user context is a dedicated service account (e.g., DOMAIN\svc_backup).Scenario: Microsoft Office 365 ProPlus Background Updates
OfficeC2RClient.exe or Microsoft Office Click-to-Run Service) utilizes C# libraries to manage installation states and feature activation. These operations trigger typelibguid events that can be indistinguishable from black-team reconnaissance