← Back to SOC feed Coverage →

APT Baby Shark

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-04-25T09:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries are leveraging Azure AD credentials in conjunction with Azure Blob Storage to exfiltrate data, mimicking legitimate user behavior to avoid detection. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential APT activity that evades traditional detection methods.

KQL Query

DeviceProcessEvents 
| where Timestamp > ago(7d)
| where ProcessCommandLine =~ @"reg query ""HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default""" 
     or ProcessCommandLine startswith "powershell.exe mshta.exe http"
     or ProcessCommandLine =~ "cmd.exe /c taskkill /im cmd.exe"
| top 100 by Timestamp desc

Analytic Rule Definition

id: 26721b80-a9b7-4594-9b0f-ec21e5da1bc2
name: APT Baby Shark
description: |
  Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_babyshark.yml.
  Questions via Twitter: @janvonkirchheim.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
query: |
  DeviceProcessEvents 
  | where Timestamp > ago(7d)
  | where ProcessCommandLine =~ @"reg query ""HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default""" 
       or ProcessCommandLine startswith "powershell.exe mshta.exe http"
       or ProcessCommandLine =~ "cmd.exe /c taskkill /im cmd.exe"
  | 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 Baby Shark.yaml