This detection identifies the execution of known C# Red and Blue team utilities by analyzing unique TypeLibGUID signatures within Azure Sentinel logs. Proactive hunting for these artifacts is essential to distinguish legitimate security operations from potential adversary activity that mimics standard tooling to evade traditional signature-based defenses.
rule HKTL_NET_GUID_SharpSecDump {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/G0ldenGunSec/SharpSecDump"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "e2fdd6cc-9886-456c-9021-ee2c47cf67b7" 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 3-5 specific false positive scenarios for the “Detects c# red/black-team tools via typelibguid” rule, including suggested filters and exclusions:
Scenario: Microsoft Office Deployment Tool (ODT) Execution
setup.exe) is a widely used C# utility in enterprise environments for installing or updating Office suites. It frequently instantiates COM objects with specific typelibguid values that match the signature of red-team tools like SharpUp or similar enumeration scripts.Process Name = "setup.exe" AND Path contains "\Microsoft Office\Office Deployment Tool". Alternatively, exclude specific known ODT GUIDs from the detection logic if they are static across versions.Scenario: Scheduled PowerShell Task for .NET Framework Health Checks
System.Management.Automation) which trigger the rule’s GUID detection logic, mimicking the behavior of tools like SharpHound or Bloodhound collectors.svchost.exe (specifically the “Task Scheduler” service) and the command line arguments contain keywords like HealthCheck, Compliance, or PatchStatus. A filter could be: Parent Process Name = "svchost.exe" AND Command Line contains "TaskScheduler".Scenario: Endpoint Protection Agent Self-Update Routine