This rule identifies potential adversary activity by detecting the presence of known C# red and black team tools through their unique TypeLibGUID signatures within Azure Sentinel logs. Proactively hunting for these indicators allows the SOC team to distinguish between legitimate security testing operations and unauthorized tool usage that could signal a stealthy threat actor leveraging similar frameworks.
rule HKTL_NET_GUID_SharpShares {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/djhohnstein/SharpShares/"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "fe9fdde5-3f38-4f14-8c64-c3328c215cf2" 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: Legitimate Automated Patching via Microsoft Endpoint Configuration Manager (MECM/SCCM)
typelibguid values that overlap with known security tool signatures (e.g., Microsoft.Update.Core).C:\Program Files\Microsoft Configuration Manager\AdminConsole\* and the parent process is ccmsetup.exe or WmiPrvSE.exe.Scenario: Internal DevOps Build Pipelines (Azure DevOps / Jenkins Agents)
dotnet CLI, MSBuild, or custom internal CI/CD agents often load type libraries that trigger this rule during nightly builds.NT SERVICE\TeamFoundationBuildAgent (or specific Azure DevOps build agent accounts) where the command line contains arguments like /restore, /build, or /test.Scenario: Enterprise Antivirus and EDR Scanning Engines
BloodHound or SharpUp.