This hunt hypothesis targets adversaries leveraging custom or known .NET-based red and black team tools by identifying unique TypeLibGUID signatures within process execution logs. Proactively hunting for these indicators in Azure Sentinel allows the SOC to distinguish between legitimate security tooling and potential malicious activity that mimics trusted .NET frameworks, thereby reducing blind spots in tool detection.
rule HKTL_NET_GUID_SharpReg {
meta:
description = "Detects .NET red/black-team tools via typelibguid"
reference = "https://github.com/jnqpblc/SharpReg"
author = "Arnim Rupp"
date = "2021-01-21"
strings:
$typelibguid0 = "8ef25b00-ed6a-4464-bdec-17281a4aa52f" 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 .NET red/blue-team tools via typelibguid” rule, including suggested filters and exclusions:
Scenario: Automated Office 365/SharePoint Provisioning Scripts
Microsoft.SharePoint.Client or Office 365 Management libraries to provision users or manage sites. These .NET assemblies often register specific TypeLibGUIDs that overlap with known red-team tool signatures (e.g., mimicking the GUID structure of tools like BloodHound or SharpUp).powershell.exe running under a service account (e.g., DOMAIN\svc-o365-provision) and the command line arguments contain keywords like -ImportModule, New-User, or Set-SPOProperty.Scenario: Scheduled Endpoint Protection Health Checks
Image path of the parent process, specifically targeting known security agent paths such as C:\Program Files\Microsoft Defender Antivirus\msseces.exe or C:\Program Files\CrowdStrike\csagent.exe, regardless of the child .NET process GUID.Scenario: CI/CD Pipeline Artifact Generation