This rule identifies the execution of specialized C# Red and Black team security tools by analyzing unique TypeLibGUID signatures within Azure Sentinel logs. Proactively hunting for these indicators allows the SOC to distinguish between legitimate security operations and potential adversary activity that mimics trusted tooling patterns, thereby reducing false positives and enhancing visibility into internal threat landscape exercises.
rule HKTL_NET_GUID_LethalHTA {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/codewhitesec/LethalHTA"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "784cde17-ff0f-4e43-911a-19119e89c43f" ascii nocase wide
$typelibguid1 = "7e2de2c0-61dc-43ab-a0ec-c27ee2172ea6" 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 “Detects c# red/black-team tools via typelibguid” rule, including suggested filters and exclusions:
Scenario: Automated Patch Management Deployment
typelibguid values identical to those used by Red Team reconnaissance tools like BloodHound or SharpUp.C:\Program Files\Microsoft Configuration Manager\ or C:\Program Files\Ivanti\) and restrict detection to non-maintenance windows (e.g., exclude events occurring between 02:00–04:00 UTC).Scenario: Internal DevOps Build Pipelines
typelibguid signatures of Black Team tools like SharpChat or PowerShell Empire.VSTest.exe, dotnet.exe running under the SYSTEM or specific BuildService user accounts) and filter by the build server’s IP address range.Scenario: Enterprise Antivirus Real-Time Scanning