This detection identifies adversary activity by monitoring for specific TypeLibGUID signatures associated with known C# red and black team reconnaissance or exploitation tools within Azure Sentinel. Proactive hunting for these indicators is essential to uncover early-stage threat actor presence that may evade standard signature-based alerts, allowing the SOC team to validate tool usage before lateral movement occurs.
rule HKTL_NET_GUID_SharpBox {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/P1CKLES/SharpBox"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "616c1afb-2944-42ed-9951-bf435cadb600" 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 CI/CD Pipeline Execution
typelibguid values used by security tools.NT SERVICE\TeamFoundationBuildAgent) and restrict detection to non-build server workstations.Scenario: Microsoft Defender for Endpoint (MDE) Telemetry
SenseBrokerService.exe or MsSenseBroker.exe) periodically queries internal libraries that share the same typelibguid signatures as common red-team tools like SharpUp or Bloodhound.*SenseBroker*.exe, *MsSenseBroker*.exe, and *DefenderService.exe.Scenario: Scheduled Office 365 ProPlus Updates
OfficeClickToRun.exe) or the Microsoft Identity Manager (MIM) service runs C# components that load COM libraries with identical GUIDs to tools like SharpHound or PowerShell Empire.Microsoft Office Click-to-Run.exe and the execution path contains \Program Files\Microsoft Office Root\Office16\.Scenario: Internal IT Management Suite (e.g., SCCM/MECM)