This hunt hypothesis targets adversaries leveraging custom or known .NET-based Red and Blue team utilities that may be used to establish persistence or conduct reconnaissance within the environment. Proactively hunting for these tools in Azure Sentinel is critical because their legitimate appearance can mask malicious activity, allowing attackers to operate under the radar while utilizing familiar .NET naming conventions to evade standard detection mechanisms.
rule HKTL_NET_NAME_shellcodeTester {
meta:
description = "Detects .NET red/black-team tools via name"
reference = "https://github.com/tophertimzen/shellcodeTester"
author = "Arnim Rupp"
date = "2021-01-22"
strings:
$name = "shellcodeTester" 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 HKTL_NET_NAME detection rule, which targets .NET red/black team tools by filename:
Scenario: Legitimate DevOps Build Agents Running MSBuild Tasks
MSBuild.exe or dotnet.exe to compile applications. These processes often spawn child .NET processes that match the naming patterns of common security tools like Cobalt Strike Beacon or BloodHound.vstest.exe, msbuild.exe, or dotnet.exe located within standard build agent directories (e.g., C:\Program Files\Microsoft Visual Studio\... or D:\BuildAgents\).Scenario: Scheduled Backup Jobs Utilizing .NET Framework
BackupAgent.exe or SyncService.exe, which shares naming conventions with black-team reconnaissance tools like SharpUp or PowerSploit.NT SERVICE\VeeamTransport) and restrict detection to specific time windows outside of peak backup hours, or exclude paths containing keywords like \Backup\, \Veeam\, or \Commvault\.Scenario: Internal IT Automation Scripts for User Provisioning