This rule identifies potential adversary activity by detecting C#-based red and black team tools through their unique TypeLibGUID signatures within Azure Sentinel logs. Proactive hunting for these specific tool identifiers allows the SOC to distinguish between authorized security operations and unauthorized reconnaissance or post-exploitation activities that may otherwise blend into routine system noise.
rule HKTL_NET_GUID_SharpStat {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/Raikia/SharpStat"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "ffc5c721-49c8-448d-8ff4-2e3a7b7cc383" 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:
Scenario: Microsoft Office Add-ins and COM Interop
SharpUp or PowerSploit.EXCEL.EXE, OUTLOOK.EXE, or WINWORD.EXE located in standard Office installation paths (e.g., C:\Program Files\Microsoft Office\).Scenario: Automated Backup and Monitoring Agents
vcagent.exe, scmon.exe) running under the SYSTEM or specific service accounts, specifically when triggered during defined maintenance windows (e.g., 02:00–04:00).Scenario: Endpoint Detection and Response (EDR) Scanning