This rule identifies the execution of known .NET-based offensive and defensive utilities by matching process names against a curated list of Red Team and Blue Team tooling signatures. Proactive hunting for these artifacts in Azure Sentinel is essential to distinguish legitimate security operations from adversarial activity that leverages similar frameworks to establish persistence or conduct reconnaissance within the environment.
rule HKTL_NET_NAME_MaliciousClickOnceGenerator {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/Mr-Un1k0d3r/MaliciousClickOnceGenerator"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "MaliciousClickOnceGenerator" 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 Maintenance Scripts
Veeam.Backup.Service.exe or Commvault.Agent.exe, which contain “Service” or “Agent” in their names, mimicking the naming convention of security tools.--backup-mode, --snapshot) AND the parent process is a known service host like svchost.exe or vssvc.exe.Scenario: Internal DevOps Build Agents
MSBuild.exe, NuGet.CommandLine.exe, or custom wrappers like DevOps.BuildAgent.dll to compile code and manage dependencies during the workday.DOMAIN\CI-Build-User) and restrict detection to execution paths located within designated build directories (e.g., C:\Program Files\Jenkins\agents\).Scenario: Endpoint Detection and Response (EDR) Self-Protection