This rule identifies the execution of C#-based Red and Black team tools by analyzing unique TypeLibGUID signatures often used during penetration testing or security assessments. Proactively hunting for these artifacts in Azure Sentinel allows the SOC to distinguish legitimate security activities from potential adversary use of custom C# utilities, ensuring that known tooling is not overlooked while unknown variations are investigated.
rule HKTL_NET_GUID_SharpClipboard {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/slyd0g/SharpClipboard"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "97484211-4726-4129-86aa-ae01d17690be" 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 Build Pipeline Execution
C:\Program Files\Microsoft Visual Studio or C:\Windows\Microsoft.NET\Framework64. Additionally, filter out events where the parent process is msbuild.exe, dotnet.exe, or specific CI service accounts (e.g., NT SERVICE\BuildAgent).Scenario: Scheduled Endpoint Protection Scans
MsMpEng.exe, FalconSensorService.exe). Filter based on the user context, excluding events triggered by local system accounts (SYSTEM) or dedicated service accounts running during known maintenance windows.Scenario: Office 365 Click-to-Run Updates
OfficeClickToRun.exe process loads