This hunt targets adversaries leveraging C#-based red and black team tools that expose unique TypeLibGUID artifacts to evade standard signature-based detection. Proactively hunting for these GUIDs in Azure Sentinel is essential because they often indicate early-stage reconnaissance or post-exploitation tool deployment that may otherwise remain invisible until a broader incident occurs.
rule HKTL_NET_GUID_Stealth_Kid_RAT {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/ctsecurity/Stealth-Kid-RAT"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "bf43cd33-c259-4711-8a0e-1a5c6c13811d" ascii nocase wide
$typelibguid1 = "e5b9df9b-a9e4-4754-8731-efc4e2667d88" 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 2 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the rule “Detects c# red/blue-team tools via typelibguid” in an enterprise environment, including suggested filters and exclusions:
Automated Build Pipeline Execution
Microsoft.Build or Visual Studio COM libraries to resolve dependencies and generate binaries, triggering the specific typelibguid associated with Red Team tooling frameworks.*build-agent-*, *jenkins-runner-*) or exclude processes running under the SYSTEM or Network Service accounts within the D:\Builds\ directory paths.Endpoint Protection Scanning
typelibguid signatures used by offensive security tools.csagent.exe, SentinelOneAgent.exe, MsMpEng.exe) from this rule. Additionally, filter out events where the parent process is the Windows Task Scheduler (TaskSchedulerService) during standard maintenance windows (e.g., 02:00–04:00 local time).Software Deployment and Patching