Suspicious Print History File Contents (via process_creation)

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

SigmamediumLinuxv1
sigma
title: Suspicious Print History File Contents (via process_creation)
id: 691edb71-b86d-56ef-a75c-78d9be2f43a9
status: stable
description: This rule detects events in which someone prints the contents of history files to the commandline or redirects it to a file for reconnaissance
references:
    - https://attack.mitre.org/techniques/T1592/004/
    - https://github.com/sleventyeleven/linuxprivchecker/
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1552.003/T1552.003.md
author: Huntrule Team
date: 2026-06-01
tags:
    - attack.reconnaissance
    - attack.t1592.004
logsource:
    category: process_creation
    product: linux
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*
falsepositives:
    - Unknown
level: medium

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.