This detection identifies potential adversary activity by monitoring for C# Red and Black team tools that register unique TypeLibGUIDs within the environment. Proactive hunting is essential to distinguish legitimate security tooling from malicious reconnaissance or lateral movement attempts that mimic known utility signatures in Azure Sentinel.
rule HKTL_NET_GUID_Tokenvator {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/0xbadjuju/Tokenvator"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "4b2b3bd4-d28f-44cc-96b3-4a2f64213109" 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 rule Detects c# red/black-team tools via typelibguid, including recommended filters and exclusions:
Scenario: Automated Backup Script Execution
SharpUp or PowerSploit.VeeamBackupService, CommvaultAgent) and filter by specific TypeLib GUIDs associated with these vendors. Alternatively, add a time-based exclusion for the standard maintenance window (e.g., 02:00–04:00).Scenario: Microsoft Endpoint Configuration Manager (SCCM) Client Updates
ccmexec.exe) frequently invokes C# components to deploy software updates or run compliance scripts. These operations often involve COM registration that triggers the TypeLib GUID detection, resembling tools like SharpHunt or custom audit scripts used by security teams.ccmexec.exe when it is initiated by the System account or specific SCCM service accounts. Additionally, filter out events where the parent process is wuauserv.exe (Windows Update) to distinguish between update activities and security tool execution.Scenario: Internal DevOps CI/CD Pipeline Artifacts