This detection identifies potential code injection or DLL hijacking attempts by monitoring for Microsoft .NET assemblies that match specific YARA signatures within the Azure Sentinel environment. Proactive hunting is essential to uncover stealthy lateral movement or persistence mechanisms where adversaries leverage legitimate .NET components to execute malicious payloads that may evade standard signature-based defenses.
rule NETDLLMicrosoft
{
meta:
author="malware-lu"
strings:
$a0 = { 00 00 00 00 00 00 00 00 5F 43 6F 72 44 6C 6C 4D 61 69 6E 00 6D 73 63 6F 72 65 65 2E 64 6C 6C 00 00 ?? 00 00 FF 25 }
condition:
$a0
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the NETDLLMicrosoft detection rule in an enterprise environment, including suggested filters or exclusions:
Scenario: Microsoft Office Click-to-Run Service Updates
OfficeClickToRun.exe process (part of the Microsoft Office suite) frequently loads internal .NET DLLs during background update checks and feature installations. This often triggers the rule when the service runs via the Windows Task Scheduler or the Update Orchestrator.ImageName equals OfficeClickToRun.exe AND CommandLine contains /update. Alternatively, add a path exclusion for C:\Program Files\Microsoft Office\root\Office16\*.Scenario: Azure Arc or Microsoft Endpoint Manager (Intune) Agent Activity
IntuneManagementExtension.exe) and the Azure Connected Machine agent often execute .NET-based scripts to inventory hardware, apply policies, or push configurations. These agents load standard Microsoft .NET DLLs that match the YARA signature during their scheduled maintenance windows (typically early morning).ImageName containing IntuneManagementExtension.exe, Microsoft.Sense.Service.Host.exe, and AzureConnectedMachineAgent.exe. Ensure the filter applies specifically to processes running under the SYSTEM or NT SERVICE\IntuneManagementExtension user context.Scenario: Scheduled PowerShell Health Checks via Task Scheduler
.ps1 scripts using the powershell.exe host. These scripts utilize Microsoft-provided .NET assemblies for reporting, causing the YARA rule to fire on the parent process when it loads these