This hunt hypothesis identifies potential adversary activity by detecting C#-based red and black team tools through their unique TypeLibGUID signatures within Azure Sentinel logs. Proactively hunting for these specific tool identifiers allows the SOC team to distinguish between legitimate security testing operations and suspicious reconnaissance or lateral movement attempts that may mimic standard administrative behavior.
rule HKTL_NET_GUID_fakelogonscreen {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/bitsadmin/fakelogonscreen"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "d35a55bd-3189-498b-b72f-dc798172e505" 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 .NET Deployment Pipelines
msbuild or custom C# deployment scripts often instantiate standard .NET assemblies that share the same TypelibGUIDs as known red-team tools like Cobalt Strike’s Beacon or SharpUp.AZURE-DEVOPS-BUILD-SVC) and restrict detection to non-build server hostnames. Alternatively, filter out events where the parent process is msbuild.exe or dotnet.exe.Scenario: Enterprise Endpoint Protection Scanning
FalconSensor.exe, MsMpEng.exe) and their child processes. Additionally, exclude events where the command line contains keywords specific to scanning operations (e.g., “scan”, “update”, “policy”).Scenario: Scheduled PowerShell Health Checks
System.Management.Automation to query Active Directory or inventory hardware. These scripts invoke C# assemblies that mimic the TypelibGUID signatures of tools like SharpDump or PowerSploit components.