This rule identifies potential adversary activity by detecting C#-based red and blue team tools through their unique TypeLibGUID signatures within Azure Sentinel logs. Proactively hunting for these specific identifiers allows the SOC team to distinguish legitimate security tooling from malicious C# processes that may mimic known utilities to evade detection.
rule HKTL_NET_GUID_Sharp_SMBExec {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/checkymander/Sharp-SMBExec"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "344ee55a-4e32-46f2-a003-69ad52b55945" 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 CI/CD Pipeline Builds
msbuild.exe or dotnet.exe. During the compilation process, these tools instantiate .NET assemblies that register specific TypeLibGUIDs associated with build automation libraries.NT SERVICE\Jenkins, AZDO-BUILD-SVC) or restrict detection to exclude parent processes named msbuild.exe and dotnet.exe.Scenario: Microsoft Endpoint Configuration Manager (SCCM) Deployments
ccmexec.exe, WUAHandler) that interact with the Windows Registry to manage application manifests. These interactions often trigger TypeLibGUID events identical to those used by security testing tools like Nmap or custom Red Team injectors.C:\Program Files (x86)\Microsoft Configuration Manager\ and exclude specific TypeLibGUIDs known to be part of the SCCM client suite.Scenario: Enterprise Backup Solutions (e.g., Veeam, Commvault)