Detection rules › Sigma

Suspicious History File Operations - Linux

Status
test
Severity
medium
Log source
product linux, service auditd
Author
Mikhail Larin, oscd.community
Source
github.com/SigmaHQ/sigma

Detects commandline operations on shell history files

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1552.003 Unsecured Credentials: Shell History

Event coverage

Rule body yaml

title: Suspicious History File Operations - Linux
id: eae8ce9f-bde9-47a6-8e79-f20d18419910
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: 2022-11-28
tags:
    - attack.credential-access
    - attack.t1552.003
logsource:
    product: linux
    service: auditd
detection:
    execve:
        type: EXECVE
    history:
        - '.bash_history'
        - '.zsh_history'
        - '.zhistory'
        - '.history'
        - '.sh_history'
        - 'fish_history'
    condition: execve and history
falsepositives:
    - Legitimate administrative activity
    - Legitimate software, cleaning hist file
level: medium

Stages and Predicates

Stage 0: condition

execve and history

Stage 1: execve

execve:
    type: EXECVE

Stage 2: history

history:
    - '.bash_history'
    - '.zsh_history'
    - '.zhistory'
    - '.history'
    - '.sh_history'
    - 'fish_history'

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
typeeq
  • EXECVE