Detection rules › Sigma

macOS ESF Suspicious W+X Memory Mapping

Status
experimental
Severity
high
Log source
product macos, service endpointsecurity
Author
Eric Brown - Nebulock, Inc.
Source
github.com/Nebulock-Inc/macos-coresigma

Detect processes creating writable and executable memory mappings which can indicate shellcode/JIT usage.

MITRE ATT&CK coverage

TacticTechniques
StealthNo specific technique

Rule body yaml

title: macOS ESF Suspicious W+X Memory Mapping
id: 1d3f5c4b-3c5b-4a2a-bf6d-0d1a9e7f2d77
status: experimental
description: Detect processes creating writable and executable memory mappings which
  can indicate shellcode/JIT usage.
author: Eric Brown - Nebulock, Inc.
date: 2025-10-29
logsource:
  product: macos
  service: endpointsecurity
level: high
detection:
  selection_evt:
    esf.event_type: 20
    event.action: mprotect
  selection_flags:
    MemoryProtection|contains:
    - wx
    - xw
  condition: selection_evt and selection_flags
falsepositives:
- legitimate JIT engines (e.g., browsers, VMs)
tags:
- attack.defense_evasion
modified: 2025/01/15

Stages and Predicates

Stage 0: condition

selection_evt and selection_flags

Stage 1: selection_evt

selection_evt:
  esf.event_type: 20
  event.action: mprotect

Stage 2: selection_flags

selection_flags:
  MemoryProtection|contains:
  - wx
  - xw

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
MemoryProtectionmatch
  • wx
  • xw
esf.event_typeeq
  • 20
event.actioneq
  • mprotect