Skip to content

Instantly share code, notes, and snippets.

@albertzsigovits
Last active December 15, 2023 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertzsigovits/42a08d6258affe2db713da7bc4eea278 to your computer and use it in GitHub Desktop.
Save albertzsigovits/42a08d6258affe2db713da7bc4eea278 to your computer and use it in GitHub Desktop.
Linux Forensics/Anti-forensics
export HISTFILE=/dev/null
export HISTSIZE=0
export HISTFILESIZE=0
/proc/PID/environ | tr '\0' '\n'
unset HISTFILE
rm $HISTFILE
shred $HISTFILE
rm .bash_history
cat /dev/null > $HISTFILE
set +o history
chattr +i $HISTFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment