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 tool identifiers is essential to distinguish legitimate security operations from malicious reconnaissance or lateral movement attempts that may otherwise blend into routine background noise.
rule HKTL_NET_GUID_DecryptAutoLogon {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/securesean/DecryptAutoLogon"
author = "Arnim Rupp"
date = "2020-12-28"
strings:
$typelibguid0 = "015a37fc-53d0-499b-bffe-ab88c5086040" 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,” including suggested filters and exclusions:
Scenario: Automated Build Pipeline Execution
TypelibGUIDs similar to security tools.AZURE-DEVOPS-BUILD-SVC) and filter for process paths containing \bin\Microsoft.Build.Tasks.Core.dll or specific build agent hostnames.Scenario: Microsoft Defender for Endpoint Management
MsMpEng.exe or SenseClientService.exe) often loads C# components during policy updates, threat scanning, or real-time protection checks that match the rule’s signature GUIDs.C:\Program Files\Microsoft Defender Antivirus\* and exclude events where the parent process is MsMpEng.exe.Scenario: Scheduled Office 365 ProPlus Updates
TypelibGUIDs often flagged by this rule as Red/Black team tool activity.OfficeClickToRun.exe or O365C2RClient.exe, specifically during standard maintenance windows (e.g., 01:00–04:00 local time).**Scenario: Enterprise