This rule detects the execution of C#-based red and black team tools by identifying specific TypeLibGUID signatures often associated with security testing or reconnaissance activities. Proactively hunting for these indicators in Azure Sentinel allows the SOC to distinguish between legitimate security operations and potential adversary use of similar tooling, ensuring that stealthy threat actors leveraging standard development environments are not overlooked.
rule HKTL_NET_GUID_EvilFOCA {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/ElevenPaths/EvilFOCA"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "f26bdb4a-5846-4bec-8f52-3c39d32df495" 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 Execution
dotnet CLI tools to compile and test C# applications often invoke standard .NET assemblies that share the same TypelibGUIDs as security tools.Jenkins.exe, VSTS.Agent.exe) or restrict detection to non-build server IP ranges.Scenario: Microsoft Teams and Office 365 Background Updates
Teams.exe) and Office background services frequently load C# assemblies for add-in management that utilize TypelibGUIDs identical to those used by Red Team simulation tools (e.g., SharpUp, BloodHound).Image Path of Microsoft Office and Teams installation directories (e.g., C:\Users\*\AppData\Local\Microsoft\Teams\current\*) to ignore their assembly loading events.Scenario: Scheduled PowerShell Maintenance Jobs
SharpHound or PowerSploit.NT AUTHORITY\SYSTEM) rather than an interactive user.**Scenario: Endpoint DLP and Ant