This rule detects adversary behavior where threat actors utilize C# Red/Black team tools that generate unique TypeLibGUID artifacts to establish persistence or execute reconnaissance within the environment. A SOC team should proactively hunt for these specific GUIDs in Azure Sentinel because their presence often signals early-stage tool deployment by attackers before they trigger more severe, high-level alerts.
rule HKTL_NET_GUID_SneakyExec {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/HackingThings/SneakyExec"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "612590aa-af68-41e6-8ce2-e831f7fe4ccc" 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”, along with suggested filters or exclusions:
Scenario: Microsoft Office Background Services
Microsoft.Office.Excel.Application or WinWord.exe frequently load COM type libraries (e.g., TypeLibGUID: 00020813-0000-0000-C000-000000000046) during scheduled macro execution, document rendering, or add-in initialization. These legitimate C#/.NET components often mimic the signature of red-team tools that rely on COM automation.ImageName matches known Office executables (EXCEL.EXE, WINWORD.EXE, POWERPNT.EXE) AND the ParentProcessName is a scheduled task runner (e.g., TASKENG.EXE or SCHEDULER.SYS).Scenario: Enterprise Endpoint Management Agents
ImageName paths containing known vendor directories (e.g., \Program Files\Microsoft Intune\, \Program Files (x86)\Microsoft Configuration Manager\) and restrict the alert to only trigger if the CommandLine contains arguments not typical of standard maintenance jobs (e.g., exclude lines starting with `/