Files
blue-team-tools/rules/linux/lnx_shell_clear_cmd_history.yml
T

32 lines
1001 B
YAML
Raw Normal View History

title: Clear Command History
2019-11-12 23:12:27 +01:00
id: fdc88d25-96fb-4b7c-9633-c0e417fdbd4e
2019-04-01 14:03:54 +02:00
status: experimental
2019-11-12 23:12:27 +01:00
description: Clear command history in linux which is used for defense evasion.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1146/T1146.yaml
- https://attack.mitre.org/techniques/T1146/
2019-09-26 12:53:13 -04:00
- https://www.hackers-arise.com/single-post/2016/06/20/Covering-your-BASH-Shell-Tracks-AntiForensics
author: Patrick Bareiss
date: 2019/03/24
logsource:
product: linux
detection:
keywords:
- 'rm *bash_history'
- 'echo "" > *bash_history'
- 'cat /dev/null > *bash_history'
- 'ln -sf /dev/null *bash_history'
- 'truncate -s0 *bash_history'
2019-04-01 14:03:54 +02:00
# - 'unset HISTFILE' # prone to false positives
- 'export HISTFILESIZE=0'
- 'history -c'
2019-09-26 12:53:13 -04:00
- 'history -w'
- 'shred *bash_history'
condition: keywords
falsepositives:
- Unknown
level: high
tags:
- attack.defense_evasion
- attack.t1146