This hunt targets adversaries leveraging custom or open-source C# tools for reconnaissance and lateral movement that share specific typelibguid signatures within the NET_GUID malware family. Proactively hunting these artifacts in Azure Sentinel is critical because their legitimate appearance often allows attackers to evade standard signature-based defenses, requiring behavioral analysis to distinguish between authorized red-team exercises and malicious black-team operations.
rule HKTL_NET_GUID_Offensive__NET {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/mrjamiebowman/Offensive-.NET"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "11fe5fae-b7c1-484a-b162-d5578a802c9c" 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 4 specific false positive scenarios for the Detects c# red/black-team tools via typelibguid rule in an enterprise environment, along with suggested filters:
Scheduled .NET Framework Update Tasks
typelibguid signatures that overlap with the NET_GUID family, specifically during the installation of Microsoft.Windows.Update.Agent or similar system components on Windows 10/11 endpoints.C:\Windows\SoftwareDistribution\*, C:\Program Files\Microsoft Intune Agent\*) and specifically whitelist the parent process name TrustedInstaller.exe or AgentService.exe.Internal DevOps Build Pipelines
dotnet CLI and MSBuild, which dynamically load libraries containing standard .NET type library GUIDs. When these agents run on shared infrastructure or jump servers, they generate high volumes of legitimate C# activity that mimics the signature of red-team reconnaissance tools.SYSTEM, Network Service, or specific service accounts like svc-build-agent) and filter by command line arguments containing known build flags such as /t:Build or dotnet publish.Microsoft 365 Copilot and Office Add-ins