This rule 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. A proactive hunt is essential in Azure Sentinel to validate these detections against actual user activity, ensuring that benign internal tools are not overlooked while malicious actors leveraging similar naming conventions are promptly identified.
rule HKTL_NET_NAME_njRAT_0_7d_Stub_CSharp {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/NYAN-x-CAT/njRAT-0.7d-Stub-CSharp"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "njRAT-0.7d-Stub-CSharp" 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 4 specific false positive scenarios for the rule “Detects .NET red/blue-team tools via name,” including suggested filters and exclusions:
Scenario: Automated Compliance Scanning by Admin Tools
ComplianceEngine.exe or AuditCollector.dll which match the “red/black-team” naming pattern of security tools.Nessus.exe, QualysPCAgent.exe) OR where the parent process is a scheduled task service (TaskHost.exe or svchost.exe) running under a dedicated service account (e.g., DOMAIN\CompScanSvc).Scenario: Scheduled .NET Backup and Migration Jobs
AssetInventoryTool.exe or DataSyncAgent.exe. Because these tools are built on the .NET framework and perform deep system introspection similar to red-team tools, they trigger false positives during their scheduled execution windows (e.g., 02:00 – 04:00 AM).01:00 and 05:00 local time where the Logon User is a known service account (e.g., DOMAIN\BackupSvc) and the