← Back to SOC feed Coverage →

wadhrama-ransomware

kql MEDIUM Azure-Sentinel
DeviceProcessEvents
backdoorcredential-thefthuntingmicrosoftofficialransomware
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-24T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries using Wadhrama ransomware may establish persistence through scheduled tasks to maintain access and execute payloads without user interaction. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential ransomware attacks before data encryption occurs.

KQL Query

// Find attempts to establish RDP persistence via the registry
let Allow = DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName == "reg.exe"
| where ProcessCommandLine has "AllowTSConnections"
| extend AllowReport = Timestamp ;
//
let Deny = DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName == "reg.exe"
| where ProcessCommandLine has "fDenyTSConnections"
| extend DenyReport = Timestamp;
//
let Special = DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName == "reg.exe"
| where ProcessCommandLine has "SpecialAccounts"
| extend SpecialReport = Timestamp;
//
Special | join kind=inner (Deny | join kind=inner Allow on DeviceId) on DeviceId
| where AllowReport < Timestamp +10s and AllowReport > Timestamp -10s
| where DenyReport < Timestamp +10s and DenyReport > Timestamp -10s
| where SpecialReport < Timestamp +10s and SpecialReport > Timestamp -10s

Analytic Rule Definition

id: 733c3a83-5950-496c-90f0-d66f0efa3c35
name: wadhrama-ransomware
description: |
  This query was originally published in the threat analytics report, RDP ransomware persists as Wadhrama.
  The ransomware known as Wadhrama has been used in human-operated attacks that follow a particular pattern. The attackers often use Remote Desktop Protocol (RDP) to gain initial access to a device or network, exfiltrate credentials, and maintain persistance.
  The following query checks for possible Wadhrama-related activity, by searching for attempts to establish RDP persistance via the registry.
  Other techniques used by the group associated with Wadhrama are listed under See also.
  Reference - https://www.microsoft.com/wdsi/threats/malware-encyclopedia-description?Name=Ransom:Win32/Wadhrama
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Persistence
query: |
  // Find attempts to establish RDP persistence via the registry
  let Allow = DeviceProcessEvents
  | where Timestamp > ago(7d)
  | where FileName == "reg.exe"
  | where ProcessCommandLine has "AllowTSConnections"
  | extend AllowReport = Timestamp ;
  //
  let Deny = DeviceProcessEvents
  | where Timestamp > ago(7d)
  | where FileName == "reg.exe"
  | where ProcessCommandLine has "fDenyTSConnections"
  | extend DenyReport = Timestamp;
  //
  let Special = DeviceProcessEvents
  | where Timestamp > ago(7d)
  | where FileName == "reg.exe"
  | where ProcessCommandLine has "SpecialAccounts"
  | extend SpecialReport = Timestamp;
  //
  Special | join kind=inner (Deny | join kind=inner Allow on DeviceId) on DeviceId
  | where AllowReport < Timestamp +10s and AllowReport > Timestamp -10s
  | where DenyReport < Timestamp +10s and DenyReport > Timestamp -10s
  | where SpecialReport < Timestamp +10s and SpecialReport > Timestamp -10s

Required Data Sources

Sentinel TableNotes
DeviceProcessEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Persistence/wadhrama-ransomware.yaml