This rule identifies potential adversary activity by detecting C#-based red and blue team tools through unique TypeLibGUID signatures within Azure Sentinel logs. Proactive hunting for these indicators is essential to distinguish legitimate security operations from malicious tooling that adversaries may deploy to establish persistence or evade detection in the environment.
rule HKTL_NET_GUID_azure_password_harvesting {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/guardicore/azure_password_harvesting"
author = "Arnim Rupp"
date = "2020-12-21"
strings:
$typelibguid0 = "7ad1ff2d-32ac-4c54-b615-9bb164160dac" 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 tailored filters and exclusions:
Scenario: Automated CI/CD Pipeline Execution
msbuild.exe or dotnet.exe. These processes often load standard C# runtime assemblies that share the same TypelibGUIDs as Red/Black team tools during compilation and testing phases.C:\Program Files\Microsoft Visual Studio\*\MSBuild\* or D:\GitHubActions\_runner\*) and limit detection to specific user accounts like SYSTEM, BUILD-SERVICE-ACCOUNT, or GITHUB-ACTORS.Scenario: Scheduled .NET Framework Health Checks
DOMAIN\Monitoring-Svc) executing from known monitoring installation paths, such as C:\Program Files\SolarWinds\* or C:\ProgramData\Datadog\Agent\bin\.Scenario: Office 365 / Microsoft Teams Background Updaters