Detection rules › Sigma

Copy Passwd Or Shadow From TMP Path

Status
test
Severity
high
Log source
category process_creation, product linux
Author
Joseliyo Sanchez, @Joseliyo_Jstnk
Source
github.com/SigmaHQ/sigma

Detects when the file "passwd" or "shadow" is copied from tmp path

MITRE ATT&CK coverage

Telemetry coverage

PlatformRecord / event type
LinuxEvent ID 1: Process Create

Rule body

title: Copy Passwd Or Shadow From TMP Path
id: fa4aaed5-4fe0-498d-bbc0-08e3346387ba
status: test
description: Detects when the file "passwd" or "shadow" is copied from tmp path
references:
    - https://blogs.blackberry.com/
    - https://twitter.com/Joseliyo_Jstnk/status/1620131033474822144
author: Joseliyo Sanchez, @Joseliyo_Jstnk
date: 2023-01-31
tags:
    - attack.credential-access
    - attack.t1552.001
logsource:
    product: linux
    category: process_creation
detection:
    selection_img:
        Image|endswith: '/cp'
    selection_path:
        CommandLine|contains: '/tmp/'
    selection_file:
        CommandLine|contains:
            - 'passwd'
            - 'shadow'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    Image|endswith: '/cp'

Stage 2: selection_path

selection_path:
    CommandLine|contains: '/tmp/'

Stage 3: selection_file

selection_file:
    CommandLine|contains:
        - 'passwd'
        - 'shadow'

Indicators

These rows show field, operator, and value matches.