How to do it...

To see how the Shellshock bug can be used to exploit a SSH server, we need to first configure our SSH server as a vulnerable system. To do so, we will follow these steps:

  1. The first step is to add a new user account called user1 on the SSH server system. We must also add /home/user1 as its home directory and /bin/bash as its shell:

Once the account is added, we cross check it by checking the /etc/passwd file.

  1. Next, we create a directory for user1 in /home and grant the ownership of this directory to the user1 account:

Get Practical Linux Security Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.