← Back to SOC feed Coverage →

locate-surfbuyer-downloader-decoding-activity

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

Hunt Hypothesis

Adversaries may be using shell scripts to decode and exfiltrate malicious payloads via temporary directories, indicating potential adware activity. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect and mitigate early-stage adware campaigns before they establish persistence or execute malicious code.

KQL Query

// Find SurfBuyer command to decode a file and save it into a /tmp folder using a certain file name
DeviceProcessEvents
// Check for activity over the past 7 days
| where Timestamp > ago(7d)
| where ProcessCommandLine has "base64" and ProcessCommandLine has "/tmp/e_"

Analytic Rule Definition

id: 1f60df62-6551-48f6-8e65-64f61ff43def
name: locate-surfbuyer-downloader-decoding-activity
description: |
  This query was originally published in the threat analytics report, OSX/SurfBuyer adware campaign.
  It will return results if a shell script has furtively attempted to decode and save a file to a /tmp folder.
  If discovered on your system, this kind of activity might be associated with SurfBuyer, which is adware that installs a browser extension to take control of several major web browsers, including Safari, Google Chrome, and Firefox.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Execution
query: |
  // Find SurfBuyer command to decode a file and save it into a /tmp folder using a certain file name
  DeviceProcessEvents
  // Check for activity over the past 7 days
  | where Timestamp > ago(7d)
  | where ProcessCommandLine has "base64" and ProcessCommandLine has "/tmp/e_"

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/Execution/locate-surfbuyer-downloader-decoding-activity.yaml