This rule identifies potential adversary activity by detecting the presence of known C# Red and Black team security tools through their unique TypeLibGUID signatures within Azure Sentinel logs. Proactive hunting for these indicators is essential to distinguish legitimate security operations from malicious tool usage that may mimic trusted software, thereby reducing false positives and uncovering stealthy reconnaissance or post-compromise activities.
rule HKTL_NET_GUID_UnmanagedPowerShell {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/leechristensen/UnmanagedPowerShell"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "dfc4eebb-7384-4db5-9bad-257203029bd9" 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 Backup Script Execution
typelibguid associated with the rule’s detection logic while processing file metadata or managing service states.Veeam.Backup.Service.exe, commvault.cmd) and restrict the alert to run only outside of standard business hours (e.g., 02:00–06:00) or exclude specific service accounts used for backups.Scenario: Microsoft Office Deployment & Licensing Checks
OfficeClickToRun.exe) and licensing validation tools frequently load C# components to manage feature updates, license verification, and activation. These processes often generate typelibguid events that mimic the signature of security testing tools.\Microsoft Office\ or specific known GUIDs associated with the Office Click-to-Run service (e.g., {9149340A-55EF-48B6-B7E1-2C5F...}). Additionally, filter out events where the parent process is msiexec.exe.Scenario: Endpoint Protection Agent Health Checks