This rule detects the execution of specialized C# Red and Black team tools by identifying unique TypeLibGUID signatures often associated with security testing or reconnaissance activities. Proactively hunting for these indicators in Azure Sentinel allows the SOC to distinguish between legitimate internal assessments and potential adversary use of similar tooling, ensuring that authorized testing does not obscure genuine threat signals.
rule HKTL_NET_GUID_FileSearcher {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/NVISO-BE/FileSearcher"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "2c879479-5027-4ce9-aaac-084db0e6d630" 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 5 specific false positive scenarios for the “Detects c# red/black-team tools via typelibguid” rule, including suggested filters and exclusions:
Scenario: Automated CI/CD Pipeline Execution
MSBuild or NuGet.exe. These tools load specific COM type libraries during the compilation and dependency resolution phases, generating the exact typelibguid signatures associated with security tooling.NT SERVICE\TeamFoundationBuildAgent) or exclude processes running within the specific directory path of the CI/CD agent installation (e.g., C:\Program Files\Microsoft Visual Studio\...).Scenario: Scheduled .NET Framework Updates
wuauserv.exe) often triggers background tasks to install or repair .NET Framework components. During these operations, the system loads C# runtime libraries that match the typelibguid patterns used by Red/Black team tools, causing a spike in alerts during maintenance windows.svchost.exe with the service name wuauserv.Scenario: Enterprise Antivirus Real-Time Scanning