← Back to SOC feed Coverage →

ExecuteBase64DecodedPayload

kql MEDIUM Azure-Sentinel
DeviceProcessEvents
huntingmicrosoftofficial
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-19T23:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may execute Base64-decoded payloads to obfuscate malicious binaries and evade detection. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential malware execution attempts masked by encoding techniques.

KQL Query

DeviceProcessEvents 
| where Timestamp > ago(14d) 
| where ProcessCommandLine contains ".decode('base64')"
        or ProcessCommandLine contains ".b64decode("
        or ProcessCommandLine contains "base64 --decode"
        or ProcessCommandLine contains ".decode64(" 
| project Timestamp , DeviceName , FileName , FolderPath , ProcessCommandLine , InitiatingProcessCommandLine 
| top 100 by Timestamp 

Analytic Rule Definition

id: 0c068643-049c-4c10-8771-ef3865627aa2
name: ExecuteBase64DecodedPayload
description: |
  Process executed from binary hidden in Base64 encoded file.  Encoding malicious software is a.
  Technique to obfuscate files from detection.
  The first and second ProcessCommandLine component is looking for Python decoding base64.
  The third ProcesssCommandLine component is looking for the Bash/sh commandline base64 decoding tool.
  The fourth one is looking for Ruby decoding base64.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
query: |
  DeviceProcessEvents 
  | where Timestamp > ago(14d) 
  | where ProcessCommandLine contains ".decode('base64')"
          or ProcessCommandLine contains ".b64decode("
          or ProcessCommandLine contains "base64 --decode"
          or ProcessCommandLine contains ".decode64(" 
  | project Timestamp , DeviceName , FileName , FolderPath , ProcessCommandLine , InitiatingProcessCommandLine 
  | top 100 by Timestamp 

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/Execution/ExecuteBase64DecodedPayload.yaml