This hunt targets adversaries leveraging C#-based offensive and defensive tools that expose unique typelibguid identifiers 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 early-stage tool deployment by threat actors, allowing the SOC team to validate legitimate usage versus potential malicious activity before escalation occurs.
rule HKTL_NET_GUID_AggressorScripts {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/harleyQu1nn/AggressorScripts"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "afd1ff09-2632-4087-a30c-43591f32e4e8" 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 rule “Detects C# Red/Black-Team Tools via TypelibGUID”, tailored for an enterprise environment:
Scheduled Office 365 ProPlus Updates
msiexec.exe or OfficeClickToRun.exe to install or repair the Office suite. These processes load C# assemblies containing specific TypeLib GUIDs associated with internal productivity tooling that overlap with Red Team signatures.\Microsoft Office\root\Office*\ and parent processes ccmexec.exe (SCCM) or UpdateOrchestrator.exe.Automated PowerShell Script Execution by IT Admins
Microsoft.ActiveDirectory.Management.dll) which generates the same TypeLib GUIDs flagged as “Red Team” reconnaissance tools..exe launched by powershell.exe or pwsh.exe, specifically when the command line arguments contain -ExecutionPolicy Bypass and run from a known administrative directory (e.g., C:\Scripts\IT_Ops\).Enterprise Antivirus Real-Time Scanning