Detection rules › Sigma

macOS ESF Deletion In Sensitive Directories

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

Detect unlink (delete) operations in sensitive directories such as LaunchAgents/Daemons or system configs.

MITRE ATT&CK coverage

Rule body yaml

title: macOS ESF Deletion In Sensitive Directories
id: 52b5612d-3c9e-4a4a-9b7a-1b6f94b6a0aa
status: experimental
description: Detect unlink (delete) operations in sensitive directories such as LaunchAgents/Daemons
  or system configs.
author: Eric Brown - Nebulock, Inc.
date: 2025-10-29
logsource:
  product: macos
  service: endpointsecurity
level: medium
detection:
  selection_evt:
    esf.event_type: 19
    event.action: unlink
  selection_path:
    TargetFilename|startswith:
    - /Library/LaunchDaemons/
    - /Library/LaunchAgents/
    - /System/Library/LaunchDaemons/
    - /etc/
  condition: selection_evt and selection_path
falsepositives:
- legitimate maintenance or upgrades
modified: 2025/01/15

Stages and Predicates

Stage 0: condition

selection_evt and selection_path

Stage 1: selection_evt

selection_evt:
  esf.event_type: 19
  event.action: unlink

Stage 2: selection_path

selection_path:
  TargetFilename|startswith:
  - /Library/LaunchDaemons/
  - /Library/LaunchAgents/
  - /System/Library/LaunchDaemons/
  - /etc/

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
TargetFilenamestarts_with
  • /Library/LaunchAgents/
  • /Library/LaunchDaemons/
  • /System/Library/LaunchDaemons/
  • /etc/
esf.event_typeeq
  • 19
event.actioneq
  • unlink