This rule identifies potential adversary activity by detecting C#-based red and black team tools through their unique TypeLibGUID signatures within Azure Sentinel. Proactively hunting for these indicators allows the SOC to distinguish between legitimate security testing operations and malicious tool usage that may mimic standard administrative behavior.
rule HKTL_NET_GUID_BadPotato {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/BeichenDream/BadPotato"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "0527a14f-1591-4d94-943e-d6d784a50549" 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 signature associated with red-team instrumentation libraries.NT SERVICE\Jenkins, BUILD-AGENT) or restrict detection to exclude known build server hostnames and IP ranges where these pipelines execute nightly.Scenario: Enterprise Endpoint Management & Patching
ccmexec.exe, jamf.exe) and filter out events occurring during defined maintenance windows (e.g., 02:00–04:00 UTC) where these scans are scheduled.Scenario: Internal Development & QA Environments