Linux Auditd: Unix Shell Configuration File Modification

Alerts when shell startup or login configuration files (system or user) are modified on Linux.

FreeReviewedSigma · Medium · v3
Product
linux
Service
auditd
Author
Peter Matkovski, IAI (SigmaHQ), DRL 1.1
Published
2023-03-06
Updated
2026-07-31

ATT&CK techniques

Persistence → Priv Esc
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Defense Evasion

  6. Cred Access

  7. Discovery

  8. Lateral Movement

  9. Collection

  10. C2

  11. Exfiltration

  12. Impact

What it detects

This rule flags modifications involving common Unix shell initialization and profile files, including system-wide and user-specific paths. Attackers may abuse these files to persist by triggering malicious commands when a shell session starts. It relies on auditd events that report file path values matching the listed shell configuration locations.

Related detections2 linkedT1546.004 — drag to rearrange
Malicious Koske Persistence via Systemd Service and Shell Profile Hijack (via process_creation)
Suspicious Shell Profile Persistence Modification (via process_creation)
Linux Auditd: Unix Shell Configuration File Modification
Pivot detection · T1546.004 · 2 related

Changelog

v3
  1. v3
    Candidate ingested via manual entry.2026-07-31
  2. v2
    Candidate ingested via manual entry.2026-07-31
  3. v1
    No changelog recorded for this version.2026-07-30

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