This hunt hypothesis targets adversaries leveraging C#-based red and black team tools that generate unique typelibguid artifacts to establish persistence or execute reconnaissance within the environment. Proactively hunting for these specific identifiers in Azure Sentinel is critical because low-severity detections often mask sophisticated tool usage, allowing analysts to distinguish legitimate administrative activity from stealthy adversary operations before they escalate into higher-impact incidents.
rule HKTL_NET_GUID_The_Collection {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/Tlgyt/The-Collection"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "579159ff-3a3d-46a7-b069-91204feb21cd" ascii nocase wide
$typelibguid1 = "5b7dd9be-c8c3-4c4f-a353-fefb89baa7b3" ascii nocase wide
$typelibguid2 = "43edcb1f-3098-4a23-a7f2-895d927bc661" ascii nocase wide
$typelibguid3 = "5f19919d-cd51-4e77-973f-875678360a6f" ascii nocase wide
$typelibguid4 = "17fbc926-e17e-4034-ba1b-fb2eb57f5dd3" 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 5 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the rule “Detects c# red/blue-team tools via typelibguid”, tailored for an enterprise environment:
Scenario: Automated Patch Deployment via SCCM/MECM
ccmexec.exe) frequently utilizes C# assemblies with specific typelibguid signatures when executing software updates or inventory scans. These actions often mimic the behavior of Red Team reconnaissance tools scanning system libraries.ccmexec.exe and the file path contains \Microsoft\CCM\. Additionally, filter for known SCCM assembly hashes if available in the log stream.Scenario: Endpoint Protection Real-Time Scanning
typelibguid detection, often indistinguishable from a Black Team tool performing a similar sweep.CsFalconService.exe, MsMpEng.exe) and their child processes. Specifically, exclude events where the ImageName matches the organization’s standard endpoint protection executable list.Scenario: Office 365 Click-to-Run Updates
OfficeClickToRun.exe) regularly updates installation packages and validates license keys using C# libraries with unique typelibguid entries. This background maintenance activity occurs during business hours and can be flagged as a suspicious tool execution.