This hunt hypothesis identifies the execution of specialized C# red and black team tools by analyzing unique TypeLibGUID signatures to distinguish legitimate security operations from potential adversary activity. Proactively hunting for these indicators in Azure Sentinel allows the SOC team to validate authorized tool usage while rapidly detecting unauthorized or anomalous deployment of similar utilities that could signal early-stage reconnaissance or lateral movement attempts.
rule HKTL_NET_GUID_Net_GPPPassword {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/outflanknl/Net-GPPPassword"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "00fcf72c-d148-4dd0-9ca4-0181c4bd55c3" 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 and exclusions:
Scenario: Microsoft Office Click-to-Run Updates
OfficeClickToRun.exe) frequently registers COM components with specific TypelibGUIDs that match the signatures of C# security tools. This often triggers during scheduled update cycles or when a user opens an Office application for the first time after a patch.ImageName is OfficeClickToRun.exe and the parent process is OfficeC2RClient.exe. Alternatively, filter out events where the TypelibGUID belongs to known Microsoft Office namespaces (e.g., starting with {000...}).Scenario: Visual Studio Build & Deployment Tasks
MSBuild.exe) and Visual Studio instances (devenv.exe), the system loads C# assemblies that instantiate COM type libraries. These tools often utilize standard .NET Framework GUIDs identical to those used by red-team simulation frameworks (like Covenant or Invoke-WebRequest wrappers).C:\Program Files\Microsoft Visual Studio directory path. Additionally, exclude events where the parent process is VSTT.exe (Visual Studio Team Services) or MSBuild.exe.Scenario: Scheduled PowerShell Reporting Jobs
powershell.exe) that generate compliance reports using C# libraries. These scripts frequently instantiate .NET objects with specific TypeLibGUIDs that mimic the footprint of black-team analysis tools (e.g., tools like SharpChroot or