This rule identifies potential adversary activity by detecting C#-based red and black team tools through their unique TypeLibGUID signatures within Azure Sentinel logs. Proactive hunting for these specific identifiers is essential to distinguish legitimate security tooling from malicious C# processes that may mimic known good applications to evade detection.
rule HKTL_NET_GUID_DotNetToJScript {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/tyranid/DotNetToJScript"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "7e3f231c-0d0b-4025-812c-0ef099404861" 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 “Detects C# Red/Black-Team Tools via TypelibGUID” rule, including suggested filters or exclusions:
Scenario: Microsoft Office Deployment Toolkit (ODT) Execution
OfficeDeploymentTool.exe to push updates or install new Office versions across the fleet. This C# tool registers specific TypeLibGUIDs that match the rule’s signature for red-team automation tools.C:\Program Files (x86)\Microsoft Office Deployment Tool\OfficeDeploymentTool.exe and restrict the alert to non-business hours or specific maintenance groups.Scenario: Azure DevOps Build Agent Activity
msbuild or custom PowerShell wrappers that load .NET assemblies with TypeLibGUIDs similar to those used by black-team reconnaissance tools (e.g., for dependency analysis).NT SERVICE\TeamFoundationBuildAgent) and filter out events originating from the Azure DevOps agent directory path.Scenario: Automated Backup Verification Scripts
vssvc.exe (Volume Shadow Copy Service) or specific backup service executables like Veeam.Backup.Service.exe.Scenario: Endpoint D