Improving documentation with custom Hacker Shell prompts
There will be times a pen tester needs to produce evidence of whether they did or did not do certain activities; during a blue team investigation, it is required to understand more precisely when a certain command was run. As highlighted in the first part of this book, strategies for this include keeping good notes and screenshots, logging and storing C2 traffic, as well as leveraging screen recordings for sensitive actions.
It can also be useful to include the date and time (and, of course, the user) in the shell prompt. The goal is that screenshots contain that information automatically. Feel free to play around with these options until you find something that suits your needs—or just leave everything with the defaults. Let's dive into some ideas and existing solutions for modifying Command Prompts to improve documentation and its usability.
Customizing Bash shell prompts
The PS1
environment variable can...