This hunt hypothesis targets adversaries leveraging custom or known .NET-based offensive and defensive tools that register unique TypeLib GUIDs within the Windows environment. Proactively hunting for these indicators in Azure Sentinel allows the SOC team to identify stealthy tool deployment often missed by standard signature-based detections, thereby uncovering potential red-team exercises or early-stage attacker reconnaissance activities.
rule HKTL_NET_GUID_SharpHandler {
meta:
description = "Detects .NET red/black-team tools via typelibguid"
reference = "https://github.com/jfmaes/SharpHandler"
author = "Arnim Rupp"
date = "2021-01-21"
strings:
$typelibguid0 = "46e39aed-0cff-47c6-8a63-6826f147d7bd" ascii nocase wide
$typelibguid1 = "11dc83c6-8186-4887-b228-9dc4fd281a23" 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 2 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the rule “Detects .NET red/black-team tools via typelibguid,” including suggested filters and exclusions:
Scenario: Automated Backup or Patching Agents
typelibguid values matching those used by security assessment frameworks like Sysinternals or custom red-team agents.C:\Program Files\Microsoft System Center Configuration Manager\Components\SMS_EXEC.exe) or specific backup services (Veeam.Backup.Service.exe).Scenario: Office 365/OneDrive Synchronization
typelibguid signatures indistinguishable from red-team tools like BloodHound or SharpUp.OneDrive.exe, Groove.exe, OfficeClickToRun.exe). Additionally, exclude if the User Account is a standard domain user account running these specific processes during business hours.Scenario: Scheduled PowerShell Health Checks
PowerShellGet or