← Back to SOC feed Coverage →

reverse-shell-ransomware-macos

kql MEDIUM Azure-Sentinel
DeviceFileEventsDeviceProcessEvents
huntingmicrosoftofficialransomware
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 reverse-shell-ransomware-macos detection identifies potential ransomware activity on macOS systems where an adversary establishes a reverse shell to exfiltrate data or deploy malicious payloads. SOC teams should proactively hunt for this behavior to detect and mitigate early-stage ransomware attacks that target macOS environments, which are increasingly becoming a focus for cybercriminals.

KQL Query

union DeviceFileEvents, DeviceProcessEvents
| where Timestamp >= ago(7d)
| where ProcessCommandLine has "bash -i >& /dev/tcp/"

Analytic Rule Definition

id: 936d985d-f44c-4ec7-81ae-7aa1995f940d
name: reverse-shell-ransomware-macos
description: |
  This query was originally published in the threat analytics report, EvilQuest signals the rise of Mac ransomware.
  As of the time of this writing (October 2020), ransomware designed to target macOS is relatively rare. EvilQuest is one of the few examples of this kind of malware on the platform.
  The query below can help locate a reverse shell established by an attacker. The command the query searches for is associated with, but not definitely indicative of, EvilQuest infections.
  Other queries related to EvilQuest ransomware can be found under the See also section below.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceFileEvents
  - DeviceProcessEvents
tactics:
- Command and control
query: |
  union DeviceFileEvents, DeviceProcessEvents
  | where Timestamp >= ago(7d)
  | where ProcessCommandLine has "bash -i >& /dev/tcp/"

Required Data Sources

Sentinel TableNotes
DeviceFileEventsEnsure this data connector is enabled
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/Command and Control/reverse-shell-ransomware-macos.yaml