macOS Host Indicator Removal via rm/unlink/shred of Local Log Paths

Flags macOS rm/unlink/shred commands targeting /var/log or ~/Library/Logs to remove local log evidence.

FreeReviewedSigma · Medium · v2
Product
macos
Category
process_creation
Author
remotephone, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-11
Updated
2026-07-31
title: macOS Host Indicator Removal via rm/unlink/shred of Local Log Paths
id: d19e56cc-4926-4723-b226-2fd8c63dcf38
status: test
description: This rule flags process executions of rm, unlink, or shred on macOS when the command line includes local log directory paths such as /var/log or /Users/.../Library/Logs/. Attackers may remove or destroy logging material to impair detection and reduce forensics after compromise. Telemetry required includes macOS process creation events with the executable path and full command line.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1070.002/T1070.002.md
  - https://github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_clear_system_logs.yml
author: remotephone, oscd.community, Huntrule Team
date: 2020-10-11
modified: 2022-09-16
tags:
  - attack.defense-impairment
  - attack.t1685.006
logsource:
  product: macos
  category: process_creation
detection:
  selection1:
    Image|endswith:
      - /rm
      - /unlink
      - /shred
  selection_cli_1:
    CommandLine|contains: /var/log
  selection_cli_2:
    CommandLine|contains|all:
      - /Users/
      - /Library/Logs/
  condition: selection1 and 1 of selection_cli*
falsepositives:
  - Legitimate administration activities
level: medium
license: DRL-1.1
related:
  - id: acf61bd8-d814-4272-81f0-a7a269aa69aa
    type: derived