This rule detects the execution of specialized C# Red and Black team security tools by identifying unique TypeLibGUID signatures within Azure Sentinel logs. Proactive hunting for these specific tool behaviors is essential to distinguish legitimate security operations from potential adversary activity that mimics known security utilities to evade detection.
rule HKTL_NET_GUID_p0wnedShell {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/Cn33liz/p0wnedShell"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "2e9b1462-f47c-48ca-9d85-004493892381" 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 CI/CD Pipeline Execution
TypelibGUID signatures with known offensive tools like BloodHound or SharpUp. These agents frequently execute in a dedicated service account context.SYSTEM, AZDO-BuildAgent) and restrict the rule to only trigger on interactive user sessions (LogonType 2 or 3) rather than batch job contexts.Scenario: Endpoint Management Suite Updates
TypelibGUID values identical to reconnaissance tools such as PowerView or Lazagne.CcmExec.exe, IntuneManagementExtension.exe) and their parent processes, ensuring the rule ignores any detection where the ParentImage matches these enterprise management binaries.Scenario: Scheduled PowerShell Health Checks