← Back to SOC feed Coverage →

lazagne

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-07T23:00:00Z · Confidence: medium

Hunt Hypothesis

The lazagne rule detects potential credential theft by adversaries leveraging the Lazagne tool to extract stored credentials from Windows systems, which is commonly associated with ransomware campaigns like Ryuk. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify early signs of lateral movement and privilege escalation attempts by advanced threats.

KQL Query

// Find credential theft via SAM database export by LaZagne
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName =~ 'reg.exe'
    and ProcessCommandLine has 'save'
    and ProcessCommandLine has 'hklm'
    and ProcessCommandLine has 'sam'
| project DeviceId, Timestamp, InitiatingProcessId,
InitiatingProcessFileName, ProcessId, FileName, ProcessCommandLine

Analytic Rule Definition

id: 97839232-ff2c-4924-983d-f21d25276e88
name: lazagne
description: |
  This query was originally published in the threat analytics report, Ryuk ransomware. There is also a related blog.
  Ryuk is human-operated ransomware. Much like DoppelPaymer ransomware, Ryuk is spread manually, often on networks that are already infected with Trickbot.
  During a typical Ryuk campaign, an operator will use LaZagne, a credential theft tool, to access stored passwords for service accounts. The accounts are then used to jump from desktop clients to servers or domain controllers, allowing for better reconnaissance, faster movement, and a more severe impact on the target.
  The following query detects credential theft by LaZagne.
  The See also section below lists links to other queries associated with Ryuk ransomware.
  References:
  https://www.microsoft.com/security/blog/2020/03/05/human-operated-ransomware-attacks-a-preventable-disaster/
  https://www.microsoft.com/wdsi/threats/malware-encyclopedia-description?Name=Ransom:Win32/Ryuk&threatId=-2147232689
  https://www.microsoft.com/security/blog/2020/03/05/human-operated-ransomware-attacks-a-preventable-disaster/
  https://github.com/AlessandroZ/LaZagne
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Credential Access
query: |
  // Find credential theft via SAM database export by LaZagne
  DeviceProcessEvents
  | where Timestamp > ago(7d)
  | where FileName =~ 'reg.exe'
      and ProcessCommandLine has 'save'
      and ProcessCommandLine has 'hklm'
      and ProcessCommandLine has 'sam'
  | project DeviceId, Timestamp, InitiatingProcessId,
  InitiatingProcessFileName, ProcessId, FileName, ProcessCommandLine

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/Credential Access/lazagne.yaml