This detection identifies adversary execution of C#-based offensive and defensive tools by monitoring unique TypeLibGUID artifacts often left behind during tool deployment or reconnaissance activities. Proactively hunting for these signatures in Azure Sentinel is critical to distinguish legitimate administrative automation from potential red-team exercises or stealthy initial access attempts that may otherwise blend into standard background noise.
rule HKTL_NET_GUID_BackNet {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/valsov/BackNet"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "9fdae122-cd1e-467d-a6fa-a98c26e76348" ascii nocase wide
$typelibguid1 = "243c279e-33a6-46a1-beab-2864cc7a499f" ascii nocase wide
$typelibguid2 = "a7301384-7354-47fd-a4c5-65b74e0bbb46" ascii nocase wide
$typelibguid3 = "982dc5b6-1123-428a-83dd-d212490c859f" 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 4 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the “Detects C# Red/Black-Team Tools via TypelibGUID” rule, along with suggested filters and exclusions:
Scenario: Automated Software Deployment via SCCM or Intune
TypelibGUID values identical to those used by security testing frameworks, triggering the rule during routine maintenance windows.ccmexec.exe, Microsoft.IntuneManagementAgent.exe) and restrict the alert time window to standard business hours or scheduled maintenance periods (e.g., 02:00–06:00 UTC).Scenario: Internal CI/CD Pipeline Build Agents
TypelibGUID signatures associated with penetration testing tools.build-agent-01, jenkins-slave-*) or filter by the User Account running the build service (e.g., NT AUTHORITY\SYSTEM or a dedicated svc-buildagent account).Scenario: Scheduled Enterprise Backup and Inventory Scripts