This hunt targets adversaries leveraging C#-based red and black team tools that expose unique typelibguid artifacts to establish persistence or conduct reconnaissance within Azure environments. Proactively hunting for these specific identifiers allows the SOC team to distinguish legitimate security operations from malicious tooling, ensuring early detection of potential lateral movement or command-and-control activities before they escalate in severity.
rule HKTL_NET_GUID_DesktopGrabber {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/NYAN-x-CAT/DesktopGrabber"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "e6aa0cd5-9537-47a0-8c85-1fbe284a4380" 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 4 specific false positive scenarios for the “Detects C# Red/Black-Team Tools via TypelibGUID” rule, tailored for an enterprise environment:
Scenario: Automated Software Deployment via SCCM/MECM
TypelibGUID as known red-team tools (e.g., Mimikatz or SharpUp). This occurs during scheduled maintenance windows when the SCCM client service (ccmexec.exe) triggers a deployment task.ccmexec.exe and the command line contains keywords like /install, /update, or specific package IDs associated with standard enterprise software updates.Scenario: Microsoft Defender for Endpoint (MDE) Antimalware Scans
MsMpEng.exe) performs deep file system scans using C# components to analyze executable metadata. During these scans, the sensor loads specific type libraries that match the GUIDs of red-team tools used for memory analysis or credential dumping. This is a routine background activity occurring every 4 hours on all endpoints.MsMpEng.exe (Microsoft Defender Antivirus) where the loaded DLL path resides within the protected %ProgramFiles%\Windows Defender\ directory structure.Scenario: Internal IT Helpdesk Remote Support Sessions
IvAntiAgent.exe or specific launcher executables) that load the same type