This hunt identifies adversary activity by correlating specific typelibguid values associated with known C# Red and Black team tools to distinguish legitimate security operations from potential malicious reconnaissance or lateral movement. Proactively hunting for these indicators in Azure Sentinel allows the SOC team to validate tool usage patterns, reduce false positives from authorized activities, and rapidly detect unauthorized deployment of similar C# utilities by attackers.
rule HKTL_NET_GUID_XORedReflectiveDLL {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/r3nhat/XORedReflectiveDLL"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "c0e49392-04e3-4abb-b931-5202e0eb4c73" ascii nocase wide
$typelibguid1 = "30eef7d6-cee8-490b-829f-082041bc3141" 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 5 specific false positive scenarios for the Detects C# Red/Black-team tools via TypelibGUID rule, tailored for an enterprise environment:
Scheduled .NET Framework Health Checks by System Center Operations Manager (SCOM)
clr.dll or specific monitoring assemblies that register unique TypelibGUIDs, mimicking the signature of Red Team reconnaissance tools scanning for .NET vulnerabilities.HealthService.exe or OpManagerAgent.exe) and restrict the alert to the specific TypelibGUID range observed during the initial baseline scan of SCOM agents.Microsoft Defender for Endpoint (MDE) Real-Time Protection Scans
MsMpEng.exe or SenseClientService.exe, and filter by the specific hash of the executable generating the TypelibGUID to distinguish it from external red team binaries.Automated Office 365 ProPlus Update Deployment via SCCM
Microsoft.Office.Interop.Excel.dll) which register specific TypelibGUIDs often associated with document analysis and automation tools used by security teams