This hunt hypothesis targets adversaries leveraging C#-based red and black team tools that register unique TypeLibGUIDs to establish persistence or execute reconnaissance within the environment. Proactively hunting for these specific GUID signatures in Azure Sentinel enables the SOC team to identify legitimate tooling versus malicious activity early, reducing noise from false positives while uncovering stealthy post-compromise behaviors.
rule HKTL_NET_GUID_WindowsRpcClients {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/tyranid/WindowsRpcClients"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "843d8862-42eb-49ee-94e6-bca798dd33ea" ascii nocase wide
$typelibguid1 = "632e4c3b-3013-46fc-bc6e-22828bf629e3" ascii nocase wide
$typelibguid2 = "a2091d2f-6f7e-4118-a203-4cea4bea6bfa" ascii nocase wide
$typelibguid3 = "950ef8ce-ec92-4e02-b122-0d41d83065b8" ascii nocase wide
$typelibguid4 = "d51301bc-31aa-4475-8944-882ecf80e10d" ascii nocase wide
$typelibguid5 = "823ff111-4de2-4637-af01-4bdc3ca4cf15" ascii nocase wide
$typelibguid6 = "5d28f15e-3bb8-4088-abe0-b517b31d4595" 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 7 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: Automated Backup & Recovery Operations
typelibguid values during scheduled nightly backups, mimicking the behavior of Red/Black team reconnaissance tools.C:\Program Files\Veeam\Backup and Replication\Agent\) AND the parent process is a recognized service host (e.g., svchost.exe with specific service names like VeeamTransport).Scenario: Endpoint Security & Antivirus Scans
ImageName containing known EDR vendor names (e.g., falcon.sys, SentinelOne.exe) and filter out events where the CommandLine includes keywords related to “scan,” “index,” or “policy update.”Scenario: Software Deployment & Patching Agents