Lab setup
Bash isn’t the only shell interpreter for Linux and Unix systems, but it is the most common. Other shells were influenced by Bash. You may also encounter Zsh on macOS and Kali Linux.
You might be wondering why this book has chosen to focus on Bash, despite some operating systems switching to Zsh. While macOS and Kali have switched to Zsh for new user accounts, they still have Bash installed. Most code written for Bash will also work on Zsh with a few minor changes. You can include a shebang line in your shell scripts to ensure that the Bash interpreter runs your script on systems where multiple shells are installed. While performing security assessments, you’re very likely to encounter Linux servers where Bash is the default shell. It will be essential for a pentester to understand how to interact with Bash to exploit applications, escalate privileges, and move laterally.
Fortunately, there are many ways you can access a Bash shell for free. This section...