Detectionmediumtest

Print History File Contents

Detects events in which someone prints the contents of history files to the commandline or redirects it to a file for reconnaissance

Open in Detection LabConvert ruleBuild Package
Florian Roth (Nextron Systems)Created 2022-06-20Updated 2022-09-15d7821ff1-4527-4e33-9f84-d0d57fa2fb66linux
Log Source
LinuxProcess Creation
ProductLinux← raw: linux
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic2 selectors
detection:
    selection:
        Image|endswith:
            - '/cat'
            - '/head'
            - '/tail'
            - '/more'
    selection_history:
        - CommandLine|contains:
              - '/.bash_history'
              - '/.zsh_history'
        - CommandLine|endswith:
              - '_history'
              - '.history'
              - 'zhistory'
    condition: all of selection*
False Positives

Legitimate administration activities

Rule Metadata
Rule ID
d7821ff1-4527-4e33-9f84-d0d57fa2fb66
Status
test
Level
medium
Type
Detection
Created
2022-06-20
Modified
2022-09-15
Path
rules/linux/process_creation/proc_creation_lnx_susp_history_recon.yml
Raw Tags
attack.reconnaissanceattack.t1592.004
View on GitHub