Analyzing Bash history
The most commonly used shell on Linux systems is Bash, one of the most popular Unix shells. One of the reasons for this popularity is that it is preinstalled on the vast majority of Linux distributions. At the same time, it is quite functional, as it allows you to interactively execute many commands and scripts, work with the filesystem, redirect the input and output of commands, and much more.
Typically, if Bash history logging is enabled, it is stored in the user's home directory, in the .bash_history
file. Naturally, attackers may perform various manipulations on both this file and the history-logging process in order to hide their traces. Nevertheless, we can try to recover this information from memory. Volatility has a specific plugin for this, linux_bash
. Running this plugin looks like this:
As you can see, in our case, the user first tried to output the contents of the passwords file with...