Linux Command History Tampering
Description
Detects commands that try to clear or tamper with the Linux command history. This technique is used by threat actors in order to evade defenses and execute commands without them being recorded in files such as "bash_history" or "zsh_history".
Query · sigma
keywords: - cat /dev/null >*sh_history - cat /dev/zero >*sh_history - chattr +i*sh_history - echo "" >*sh_history - empty_bash_history - export HISTFILESIZE=0 - history -c - history -w - ln -sf /dev/null *sh_history - ln -sf /dev/zero *sh_history - rm *sh_history - shopt -ou history - shopt -uo history - shred *sh_history - truncate -s0 *sh_history condition: keywords
Known false positives
- Unknown