Linux / Mac OS: Check bash for shellshock vulnerability
You should check your Linux or Mac system for the shellshock vulnerability in the "Bash" prompt, as otherwise unauthorized users could access your system and run malicious code there. In order to prevent this from happening, we will show you in this guide how to track down the shellshock vulnerability and how to protect your computer from attack.
Check Ubuntu and Mac OS X for Shellshock vulnerability
Note: These instructions refer to Bash version 4.3.
- Start the terminal on your system.
- Enter the command env X = "() {:;}; echo shellshock" bash -c "echo completed" and press the Enter key.
- If the words "Shellshock" and "Completed" appear on your computer, there is a Shellshock gap on your computer. If there is only "Completed" and an error message appears, your system is no longer affected by the shellshock vulnerability.
- If your Linux or Mac system is affected, you should update "Bash" immediately.
Update against shellshock vulnerability in Linux and Mac OS X.
- Start the terminal and enter the command "sudo apt-get update" (without quotes) and the password.
- Then type the command "sudo apt-get upgrade".
- After that, the shellshock vulnerability is fixed on your system.