This hunt targets adversaries leveraging C#-based red and black team tools that register unique TypeLib GUIDs to establish persistence or execute reconnaissance within the environment. Proactively hunting for these specific artifacts in Azure Sentinel is critical because their presence often indicates active threat emulation or advanced tool deployment that may bypass standard signature-based detections due to their low-severity classification.
rule HKTL_NET_GUID_njCrypter {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/0xPh0enix/njCrypter"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "8a87b003-4b43-467b-a509-0c8be05bf5a5" ascii nocase wide
$typelibguid1 = "80b13bff-24a5-4193-8e51-c62a414060ec" 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 2 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the rule “Detects c# red/blue-team tools via typelibguid” in an enterprise environment, along with suggested filters or exclusions:
Enterprise Endpoint Protection Scans
typelibguid associated with these internal C# libraries matches the signature of Red Team tools like Cobalt Strike or SharpUp.FalconSensorService.exe, cb.exe) and restrict the alert to only trigger if the parent is not a known security vendor executable.Microsoft Office Macro Execution
MonthlyBudgetTemplate.xlsx), the Excel process (EXCEL.EXE) loads a specific TypeLib GUID used by internal reporting tools, which overlaps with the GUIDs of Blue Team automation frameworks like PowerShell Empire or BloodHound.WINWORD.EXE, EXCEL.EXE, or OUTLOOK.EXE and the file path contains known corporate template directories (e.g., \\FileServer\Templates\HR).Automated Deployment Scripts via SCCM/Microsoft Endpoint Configuration Manager