-
Book Overview & Buying
-
Table Of Contents
Digital Forensics Cookbook
By :
Like Apple macOS, many Linux distributions keep a per-user shell history file that records commands entered in a terminal. These are stored as hidden plain-text files (named .bash_history) for each user on the system. By default, bash only stores the command lines themselves, with no associated timestamps indicating when they were executed. However, in some cases administrators or advanced users may enable additional configuration (such as the HISTTIMEFORMAT setting), which results in Unix timestamps being recorded alongside commands.
Note that systems and users sometimes use other shells (for example zsh), which use different history files and may include timestamps if configured.
In this recipe, we will examine .bash_history files to identify command-line activity and demonstrate how shell history can be used to reconstruct user actions during an investigation.
For this section we will use the Linux forensic image.
Using FTK Imager or another tool...