← Back to SOC feed Coverage →

apt sofacy

kql MEDIUM Azure-Sentinel
DeviceProcessEvents
apthuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-06T11:00:00Z · Confidence: medium

Hunt Hypothesis

The hypothesis is that the detection rule identifies potential Sofacy APT activity through suspicious file execution or persistence behaviors commonly associated with this adversary. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect and mitigate early-stage Sofacy attacks before they escalate.

KQL Query

DeviceProcessEvents
| where Timestamp > ago(7d)
| where ProcessCommandLine matches regex @'rundll32\.exe %APPDATA%.*\.dat",'
     or ProcessCommandLine matches regex @'rundll32\.exe %APPDATA%.*\.dll",#1'
| top 100 by Timestamp desc

Analytic Rule Definition

id: 36a6028d-f977-455f-be11-669e993a25d6
name: apt sofacy
description: |
  Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_sofacy.yml.
  Questions via Twitter: @janvonkirchheim.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
query: |
  DeviceProcessEvents
  | where Timestamp > ago(7d)
  | where ProcessCommandLine matches regex @'rundll32\.exe %APPDATA%.*\.dat",'
       or ProcessCommandLine matches regex @'rundll32\.exe %APPDATA%.*\.dll",#1'
  | top 100 by Timestamp desc

Required Data Sources

Sentinel TableNotes
DeviceProcessEventsEnsure this data connector is enabled

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Campaigns/apt sofacy.yaml