This hypothesis posits that adversaries leverage C#-based Red and Black team tools with unique TypeLibGUID signatures to establish persistence or conduct reconnaissance within the environment. A proactive hunt is essential in Azure Sentinel to identify these specific tool artifacts early, enabling the SOC team to distinguish legitimate security operations from potential adversary activity before they escalate into higher-severity incidents.
rule HKTL_NET_GUID_SharpRDP {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/0xthirteen/SharpRDP"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "f1df1d0f-ff86-4106-97a8-f95aaf525c54" 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, including suggested filters:
Automated Build and CI/CD Pipeline Execution
msbuild.exe or dotnet.exe. These processes often instantiate C# assemblies that register specific TypeLibGUIDs associated with testing frameworks like NUnit or xUnit, which may overlap with the GUIDs used by Red/Blue team attack simulation tools.NT SERVICE\Jenkins, DEVOPS-BUILD-SVC) and restrict detection to non-build server hostnames or specific IP ranges.Scheduled PowerShell Reporting Jobs
powershell.exe or pwsh.exe) that import C# modules for asset inventory, license compliance checks, or security posture reporting. These scripts load custom C# assemblies with TypeLibGUIDs that mimic those found in penetration testing suites (e.g., tools like BloodHound or SharpUp).powershell.exe) and filter out events where the command line contains specific keywords such as “Inventory,” “Compliance,” or “Report”.Endpoint Management Agent Routine Scans