← Back to SOC feed Coverage →

Large Scale Malware Deployment via GPO Scheduled Task Modification

kql MEDIUM Azure-Sentinel
T1484
SecurityEvent
huntinglateral-movementmicrosoftofficialpersistenceransomware
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-06-03T23:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may modify GPO scheduled tasks in the Sysvol folder to deploy malware at scale, leveraging administrative privileges to propagate laterally within the network. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate large-scale ransomware deployment attempts early.

KQL Query

SecurityEvent
   | where EventID == 5145 
   | where ShareName == "\\\\*\\SYSVOL" and RelativeTargetName endswith "ScheduledTasks.xml" and AccessList contains "%%4417"
   | summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated) by EventID, Computer, SubjectDomainName, SubjectUserName, SubjectLogonId, ShareName, RelativeTargetName, AccessList, IpAddress

Analytic Rule Definition

id: a1a06ba2-87f8-11ec-a8a3-0242ac120002
name: Large Scale Malware Deployment via GPO Scheduled Task Modification
description: |
  'This query detects lateral movement using GPO scheduled task usually used to deploy ransomware at scale.
   It monitors whether a scheduled task is modified within the Sysvol folder in GPO.
   Ref: https://bogusecurity.com/2019/12/26/persistence-and-execution-at-scale-via-gpo-scheduled-task/'
requiredDataConnectors:
  - connectorId: SecurityEvents
    dataTypes:
      - SecurityEvent
tactics:
  - LateralMovement
relevantTechniques:
  - T1484
query: |
 SecurityEvent
    | where EventID == 5145 
    | where ShareName == "\\\\*\\SYSVOL" and RelativeTargetName endswith "ScheduledTasks.xml" and AccessList contains "%%4417"
    | summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated) by EventID, Computer, SubjectDomainName, SubjectUserName, SubjectLogonId, ShareName, RelativeTargetName, AccessList, IpAddress

Required Data Sources

Sentinel TableNotes
SecurityEventEnsure 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/SecurityEvent/LargeScaleMalwareDeploymentGPOScheduledTask.yaml