Suspicious Unix Shell Configuration Change (via auditd)

This rule detects unix shell configuration modification. Threat actors may establish persistence through running hostile commands triggered when a new shell is opened.

SigmamediumLinuxv1
sigma
title: Suspicious Unix Shell Configuration Change (via auditd)
id: ba729569-0ea6-552d-94d6-a74e9d9a5caf
status: stable
description: This rule detects unix shell configuration modification. Threat actors may establish persistence through running hostile commands triggered when a new shell is opened.
references:
    - https://attack.mitre.org/techniques/T1546/004/
    - https://objective-see.org/blog/blog_0x68.html
    - https://web.archive.org/web/20221204161143/https://www.glitch-cat.com/p/green-lambert-and-attack
    - https://www.anomali.com/blog/pulling-linux-rabbit-rabbot-malware-out-of-a-hat
author: Huntrule Team
date: 2026-07-20
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1546.004
logsource:
    product: linux
    service: auditd
detection:
    selection:
        type: 'PATH'
        name:
            - '/etc/shells'
            - '/etc/profile'
            - '/etc/profile.d/*'
            - '/etc/bash.bashrc'
            - '/etc/bashrc'
            - '/etc/zsh/zprofile'
            - '/etc/zsh/zshrc'
            - '/etc/zsh/zlogin'
            - '/etc/zsh/zlogout'
            - '/etc/csh.cshrc'
            - '/etc/csh.login'
            - '/root/.bashrc'
            - '/root/.bash_profile'
            - '/root/.profile'
            - '/root/.zshrc'
            - '/root/.zprofile'
            - '/home/*/.bashrc'
            - '/home/*/.zshrc'
            - '/home/*/.bash_profile'
            - '/home/*/.zprofile'
            - '/home/*/.profile'
            - '/home/*/.bash_login'
            - '/home/*/.bash_logout'
            - '/home/*/.zlogin'
            - '/home/*/.zlogout'
    condition: 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.