This hunt hypothesis identifies the execution of known .NET-based Red and Blue team utilities by analyzing process names to distinguish legitimate security operations from potential adversary reconnaissance or tool deployment activities. Proactively hunting for these specific tools in Azure Sentinel is essential to validate authorized testing efforts while simultaneously uncovering unauthorized usage that may indicate an attacker leveraging familiar security frameworks to mask malicious behavior.
rule HKTL_NET_NAME_GrayKeylogger {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/DarkSecDevelopers/GrayKeylogger"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "GrayKeylogger" ascii wide
$compile = "AssemblyTitle" ascii wide
condition:
(uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550) and all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the rule “Detects .NET red/blue-team tools via name,” along with suggested filters or exclusions:
Scenario: Automated Backup and Reporting Scripts
.exe wrappers written in .NET to generate daily health reports or manage snapshot schedules. These tools frequently contain names like VeeamReporter.exe or CommvaultAgent.exe, which may match the “red/blue team tool” naming convention if the rule relies on generic keywords (e.g., “Report”, “Monitor”, “Audit”).CommandLine contains specific backup job IDs or paths located within known backup installation directories (e.g., C:\Program Files\Veeam\...). Additionally, filter by ParentProcessName to ensure the tool is launched by a known service host like vssvc.exe rather than an interactive user session.Scenario: Endpoint Security Agent Telemetry
FalconSensor.exe or DefenderTelemetryService.exe might trigger the rule because it mimics the behavior of a red-team reconnaissance tool scanning network ports.ProcessImageName for known EDR vendor binaries (e.g., FalconSensor.exe, MsMpEng.exe) and restrict the detection to exclude processes running under the context of specific service accounts like NT SERVICE\CrowdStrikeService.Scenario: Scheduled Compliance Audit Jobs