Sigma rule: Edit of .bash_profile and .bashrc
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-2aa7276d97bd, updated 2023-03-23T00:00:00.000Z.
SigmaHQ marks this rule as deprecated.
Rule
- Title
- Edit of .bash_profile and .bashrc
- Status
- deprecated
- Level
- medium
- Author
- Peter Matkovski
- Date
- 2019/05/12
- Modified
- 2023/03/23
- File
- deprecated/linux/lnx_auditd_alter_bash_profile.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects change of user environment. Adversaries can insert code into these files to gain persistence each time a user logs in or opens a new shell.
Log source
- product
- linux
- service
- auditd
Detection
selection:
type: 'PATH'
name:
- '/root/.bashrc'
- '/root/.bash_profile'
- '/root/.profile'
- '/home/*/.bashrc'
- '/home/*/.bash_profile'
- '/home/*/.profile'
- '/etc/profile'
- '/etc/shells'
- '/etc/bashrc'
- '/etc/csh.cshrc'
- '/etc/csh.login'
condition: selectionFalse positives (as the rule lists them)
- Admin or User activity
Tags
- attack.s0003
- attack.persistence
- attack.t1546.004
MITRE ATT&CK ids this rule names
References
- MITRE Attack technique T1156; .bash_profile and .bashrc.
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/deprecated/linux/lnx_auditd_alter_bash_profile.yml
Sources and licences
SigmaHQ
"Edit of .bash_profile and .bashrc" by Peter Matkovski (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/deprecated/linux/lnx_auditd_alter_bash_profile.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Edit of .bash_profile and .bashrc",
entity page, dataset version ref-2aa7276d97bd, updated 2023-03-23T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/e74e15cc-c4b6-4c80-b7eb-dfe49feb7fe9 (accessed 2026-11-03).
Underlying source: SigmaHQ rule e74e15cc-c4b6-4c80-b7eb-dfe49feb7fe9, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.