This rule detects the execution of C#-based Red and Black team tools by identifying unique TypeLibGUID signatures that often indicate reconnaissance or post-exploitation activities within the environment. Proactive hunting for these specific tool identifiers in Azure Sentinel is essential to distinguish legitimate security operations from adversarial use of similar frameworks, ensuring early visibility into potential threat actor movements even when standard behavioral anomalies are absent.
rule HKTL_NET_GUID_SharpSearch {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/djhohnstein/SharpSearch"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "98fee742-8410-4f20-8b2d-d7d789ab003d" 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 rule “Detects c# red/black-team tools via typelibguid,” including suggested filters and exclusions:
Scenario: Automated Build Pipeline Execution on CI/CD Agents
msbuild.exe or dotnet.exe. These processes instantiate .NET assemblies that generate specific TypeLibGUIDs often flagged as “Red Team” reconnaissance tools (e.g., mimicking SharpUp or BloodHound).ProcessImage | contains "C:\Program Files\Microsoft Visual Studio\2022\MSBuild" and ProcessCommandLine | has "--restore"Scenario: Scheduled Anti-Virus or EDR Scanning Jobs
typelibguid associated with these scanner modules can overlap with tools used by Red Teams for file enumeration.ParentProcessName is “C:\Program Files\CrowdStrike\csagent.exe” OR ScheduledTaskName contains “Defender Scheduled Scan”.Scenario: Microsoft Office 365 Background Updates and Add-in Initialization