Files
atomic-red-team/atomics/T1146/T1146.yaml
T
2018-05-25 12:21:10 -04:00

72 lines
1.4 KiB
YAML

---
attack_technique: T1146
display_name: Clear Command History
atomic_tests:
- name: Clear Bash history (rm)
description: |
Clears bash history via rm
supported_platforms:
- linux
- macos
executor:
name: sh
command: |
rm ~/.bash_history
- name: Clear Bash history (echo)
description: |
Clears bash history via rm
supported_platforms:
- linux
- macos
executor:
name: sh
command: |
echo "" > ~/.bash_history
- name: Clear Bash history (cat dev/null)
description: |
Clears bash history via cat /dev/null
supported_platforms:
- linux
- macos
executor:
name: sh
command: |
cat /dev/null > ~/.bash_history
- name: Clear Bash history (ln dev/null)
description: |
Clears bash history via a symlink to /dev/null
supported_platforms:
- linux
- macos
executor:
name: sh
command: |
ln -sf /dev/null ~/.bash_history
- name: Clear Bash history (truncate)
description: |
Clears bash history via truncate
supported_platforms:
- linux
executor:
name: sh
command: |
truncate -s0 ~/.bash_history
- name: Clear history of a bunch of shells
description: |
Clears the history of a bunch of different shell types by setting the history size to zero
supported_platforms:
- linux
- macos
executor:
name: sh
command: |
unset HISTFILE
export HISTFILESIZE=0
history -c