This rule identifies the execution of known .NET-based red and blue team utilities by analyzing unique typelibGUID signatures within Azure Sentinel logs. Proactively hunting for these artifacts allows the SOC to distinguish between legitimate security operations and potential adversary activity that mimics standard tooling behavior, thereby reducing false positives and enhancing visibility into internal reconnaissance efforts.
rule HKTL_NET_GUID_SharpDir {
meta:
description = "Detects .NET red/black-team tools via typelibguid"
reference = "https://github.com/jnqpblc/SharpDir"
author = "Arnim Rupp"
date = "2021-01-21"
strings:
$typelibguid0 = "c7a07532-12a3-4f6a-a342-161bb060b789" 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/black-team tools via typelibguid rule, including suggested filters and exclusions:
Scenario: Scheduled Office 365 ProPlus Update Tasks
OfficeClickToRun.exe) or the Background Intelligent Transfer Service (BITS) often executes .NET assemblies during scheduled update cycles. These processes utilize specific typelibguid signatures that overlap with red-team tools like Covenant or SharpUp.OfficeClickToRun.exe, msiexec.exe, and bitsadmin.exe running under the SYSTEM or NT SERVICE\* accounts, specifically when the command line contains arguments related to “update,” “patch,” or “clicktorun”.Scenario: Enterprise Endpoint Protection Scans
typelibguid signatures indistinguishable from black-team tools like BloodHound or SharpUp.C:\Program Files\Microsoft Defender\MsMpEng.exe, C:\Program Files\CrowdStrike\FalconSensor.exe) and exclude events where the parent process is one of these security agents.Scenario: Automated PowerShell Reporting Jobs
pwsh.exe or powershell.exe) to generate compliance reports, inventory hardware, or manage Active Directory objects. These scripts frequently instantiate .NET assemblies with standard library GUID