This rule identifies potential adversary activity by detecting C#-based red and black team tools through their unique TypeLibGUID signatures within Azure Sentinel. Proactive hunting for these specific tool identifiers is essential to distinguish legitimate security operations from malicious reconnaissance or post-compromise tool deployment that may otherwise blend into routine system noise.
rule HKTL_NET_GUID_k8fly {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/zzwlpx/k8fly"
author = "Arnim Rupp"
date = "2020-12-29"
strings:
$typelibguid0 = "13b6c843-f3d4-4585-b4f3-e2672a47931e" 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 Build Pipeline Execution
C:\Program Files\Microsoft Visual Studio*\MSBuild\Bin\MSBuild.exe and C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorsvw.exe, or filter by user context where the account is a dedicated service account (e.g., DOMAIN\CI-Build-Svc).Scenario: Endpoint Protection Scanning
C:\Program Files\CrowdStrike\FalconSensor\csfalcon.exe or C:\Windows\System32\smss.exe) and exclude events where the command line contains keywords like “scan”, “update”, or “signature”.Scenario: Scheduled Office 365/SharePoint Provisioning Tasks