Detection rules › Sigma

Suspicious History File Operations

Status
test
Severity
medium
Log source
category process_creation, product macos
Author
Mikhail Larin, oscd.community
Source
github.com/SigmaHQ/sigma

Detects commandline operations on shell history files

Known false positives

  • Legitimate administrative activity
  • Legitimate software, cleaning hist file

MITRE ATT&CK coverage

TacticTechniques
Credential Access

Telemetry coverage

Rule body

title: Suspicious History File Operations
id: 508a9374-ad52-4789-b568-fc358def2c65
status: test
description: Detects commandline operations on shell history files
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1552.003/T1552.003.md
author: 'Mikhail Larin, oscd.community'
date: 2020-10-17
modified: 2021-11-27
tags:
    - attack.credential-access
    - attack.t1552.003
logsource:
    product: macos
    category: process_creation
detection:
    selection:
        CommandLine|contains:
            - '.bash_history'
            - '.zsh_history'
            - '.zhistory'
            - '.history'
            - '.sh_history'
            - 'fish_history'
    condition: selection
falsepositives:
    - Legitimate administrative activity
    - Legitimate software, cleaning hist file
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    CommandLine|contains:
        - '.bash_history'
        - '.zsh_history'
        - '.zhistory'
        - '.history'
        - '.sh_history'
        - 'fish_history'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • .bash_history
  • .history
  • .sh_history
  • .zhistory
  • .zsh_history
  • fish_history
field:"CommandLine" kind:match