This detection identifies adversary activity by monitoring for specific TypeLibGUID signatures associated with known C# Red and Black team tools used during penetration testing or post-incident analysis. Proactive hunting for these indicators in Azure Sentinel is essential to distinguish legitimate security operations from potential malicious reconnaissance, ensuring that tool usage by threat actors mimicking authorized teams is not overlooked.
rule HKTL_NET_GUID_Sharpire {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/0xbadjuju/Sharpire"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "39b75120-07fe-4833-a02e-579ff8b68331" 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 rule “Detects c# red/black-team tools via typelibguid,” along with suggested filters or exclusions:
Scenario: Automated Deployment Pipeline Execution
NT SERVICE\Jenkins, AZUREDEVOPSAGENT) and restrict detection to non-build server hostnames or exclude specific process paths like C:\Program Files\Azure DevOps Agent\.Scenario: Microsoft Office 365 Click-to-Run Updates
OfficeClickToRun.exe) utilizes C# components to manage add-ins and registry keys. These components often instantiate type libraries that mimic the GUIDs used by security testing tools, triggering alerts during routine patching windows.C:\Program Files\Microsoft Office\root\Office16\ and exclude events occurring during defined maintenance windows (e.g., 02:00–04:00 UTC).Scenario: Endpoint Protection Scanning Engine
typelibguid signatures detected by this rule.