This hunt hypothesis identifies the execution of known .NET-based Red and Blue team utility names to distinguish legitimate security operations from potential adversary tooling that mimics these signatures. Proactively hunting for this behavior in Azure Sentinel allows the SOC team to validate authorized activities while uncovering stealthy attacks where adversaries leverage familiar .NET tools to evade standard detection thresholds.
rule HKTL_NET_NAME_RAT_NjRat_0_7d_modded_source_code {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/AliBawazeEer/RAT-NjRat-0.7d-modded-source-code"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "RAT-NjRat-0.7d-modded-source-code" 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,” including suggested filters and exclusions:
Scenario: Automated Vulnerability Scanning via PowerShell
Invoke-WebRequest or custom scripts utilizing the System.Management.Automation assembly to perform internal vulnerability scans. These scripts often invoke .NET assemblies with names resembling security tools (e.g., VulnScan.Core.dll).Taskeng.exe or svchost.exe) and restrict detection to specific User Contexts (e.g., exclude NT SERVICE\TaskScheduler or dedicated service accounts like svc-vulnscan).Scenario: Microsoft Defender for Endpoint Real-Time Protection
MpCmdRun.exe or MsMpEng.dll which contain internal tooling libraries. These components often match the naming convention of external red-team tools (e.g., containing “Cobalt” or “Sharp” in their assembly names) during routine definition updates.Program Files\Windows Defender and filter out events where the File Hash matches known Microsoft-signed binaries (verify via a hash allow-list).Scenario: Enterprise Configuration Management (SCCM/MEM)
ccmsetup.exe process spawns child processes like AppDeploymentTool.dll, which mimics the naming structure of red-team execution tools used in penetration testing.