This detection rule identifies the execution of C#-based Red and Black team security tools by analyzing unique TypeLibGUID signatures within Azure Sentinel logs. Proactive hunting for these artifacts is essential to distinguish legitimate security operations from potential adversary activity that mimics tooling behavior to evade standard threat detection mechanisms.
rule HKTL_NET_GUID_SharpWifiGrabber {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/r3nhat/SharpWifiGrabber"
author = "Arnim Rupp"
date = "2020-12-29"
strings:
$typelibguid0 = "c0997698-2b73-4982-b25b-d0578d1323c2" 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 rule “Detects c# red/black-team tools via typelibguid”, including targeted filters and exclusions:
Scenario: Automated CI/CD Pipeline Execution
msbuild.exe process, which instantiates COM objects with specific TypeLibGUIDs often associated with security testing frameworks. This mimics the behavior of Red Team tools like Cobalt Strike or BloodHound.Jenkins or VSTS service accounts where the parent process is java.exe (for Jenkins) or AgentWorker.exe, and restrict detection to non-build-server IP ranges.Scenario: Scheduled Backup and Inventory Scans
NT SERVICE\VeeamTransport) and filter out events occurring during defined maintenance windows (e.g., 02:00–04:00 local time) on the asset inventory list.Scenario: Endpoint Protection Health Checks