Secondary Categories: 02-Defense Evasion

Ensuring that you clean up your command line history will impair defenders from catching you and clear any evidence.

Linux

#Completely removing the bash history file
rm -rf ~/.bash_history
 
#Leaving the bash history file blank
echo '' > ~/.bash_history
 

Windows

# Disable the PSReadLine module
Set-PSReadlineOption -HistorySaveStyle SaveNothing
 
# Modify where logs are stored
Set-PSReadLineOption -HistorySavePath {File Path}

Resources:

TitleURL
MITRE - Impair Defenseshttps://attack.mitre.org/techniques/T1562/003/

Also Check Out:

  • PLACEHOLDER