This hunt hypothesis identifies the execution of specialized C# Red and Black team tools by analyzing unique TypelibGUID signatures within Azure Sentinel logs. Proactively hunting for these indicators allows the SOC to distinguish between legitimate security testing activities and potential adversary reconnaissance or tool deployment that mimics trusted internal utilities.
rule HKTL_NET_GUID_MiscTools {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/rasta-mouse/MiscTools"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "384e9647-28a9-4835-8fa7-2472b1acedc0" ascii nocase wide
$typelibguid1 = "d7ec0ef5-157c-4533-bbcd-0fe070fbf8d9" ascii nocase wide
$typelibguid2 = "10085d98-48b9-42a8-b15b-cb27a243761b" ascii nocase wide
$typelibguid3 = "6aacd159-f4e7-4632-bad1-2ae8526a9633" ascii nocase wide
$typelibguid4 = "49a6719e-11a8-46e6-ad7a-1db1be9fea37" 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 5 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the rule “Detects c# red/black-team tools via typelibguid”, along with targeted filters or exclusions:
Scenario: Automated CI/CD Build Pipelines
msbuild.exe or dotnet.exe. These processes often load standard .NET assemblies that generate the specific TypeLibGUIDs associated with Red Team tools during the build artifact generation phase.C:\Program Files\Microsoft Visual Studio\*\MSBuild\Bin\msbuild.exe) running under service accounts like SYSTEM or specific CI/CD identities (e.g., AZURE-AD-BUILD-SVC).Scenario: Scheduled Office 365 Configuration Scripts
SharpView or Bloodhound.powershell.exe and the command line contains keywords related to Office 365 management (e.g., -ImportModule Microsoft.Online.*, Connect-MicrosoftTeams) during business hours (08:00–18:00).Scenario: Endpoint Management Agent Updates
ccmexec.exe often loads .NET assemblies that trigger the same TypeLibGUID signatures as Black Team monitoring tools