This hunt hypothesis targets adversaries leveraging C#-based red and black team tools that register unique TypeLibGUIDs to establish a persistent foothold or conduct reconnaissance within the environment. The SOC team should proactively hunt for these specific GUID signatures in Azure Sentinel to identify early-stage tool deployment that may otherwise be missed by standard signature-based detections, enabling faster response to potential lateral movement or command-and-control activities.
rule HKTL_NET_GUID_PowerOPS {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/fdiskyou/PowerOPS"
author = "Arnim Rupp"
date = "2020-12-21"
strings:
$typelibguid0 = "2a3c5921-7442-42c3-8cb9-24f21d0b2414" 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 rule “Detects C# Red/Black-Team Tools via TypelibGUID,” along with suggested filters or exclusions:
Scenario: Automated CI/CD Build Agents
msbuild.exe or dotnet.exe. These processes often load standard .NET runtime assemblies that contain the same TypelibGUID signatures associated with Red/Black team tools.C:\Program Files\Jenkins\jenkins-agent\msbuild.exe, D:\AzureDevOps\_tasks\dotnet.exe) or filter by the parent process name being a specific service account (e.g., NT SERVICE\BuildAgent).Scenario: Microsoft Office Add-in Initialization
WINWORD.EXE, EXCEL.EXE) registers COM interfaces that share the target TypelibGUID. This is a common administrative baseline activity.WINWORD.EXE, OUTLOOK.EXE) and the command line arguments do not contain specific tool identifiers like RedTeam or BlackTeam.Scenario: Scheduled Antivirus Definition Updates