Check whether your system has the "Shellshock" vulnerability and fix it.
It quickly shows you how to check whether your system is affected by Shellshock, and, if so, how to fix your system from being exploited by Bash vulnerabilities.
If you are tracking the news, you may have heard of a vulnerability found in Bash, known as a Bash Bug or ** Shellshock **. RedHat is the first organization to discover this vulnerability. Shellshock errors allow attackers to inject their own code, making the system open to various malware and remote attacks. In fact, hackers have used it to launch DDoS attacks.
Bash is available in all Unix-like systems. If all these run a specific version of bash, it will make all Linux systems vulnerable to this Shellshock error.
Want to know if your Linux system has been affected by Shellshock? There is a simple way to check it, which is what we want to see.
Check the Shellshock vulnerability in Linux
Open a terminal and run the following command:
- Env x = '() {:;}; echo vulnerable 'bash-C' echo hello'
If your system has no vulnerabilities, you will see the following output:
- Bash: warning: x: ignoring function definition attempt
- Bash: error importing function definition for 'X'
- Hello
If your system has the Shellshock vulnerability, you will see an output like this:
- Vulnerable
- Hello
I tried to run on my Ubuntu14.10 and I got this:
You can also use the following command to view the bash version:
- Bash -- version
If the bash version is 3.2.51 (1), you should update it.
Patch Linux systems with the Shellshock Vulnerability
If you are running a Debian-based Linux operating system, such as Ubuntu or Linux Mint, use the following command to upgrade Bash:
- Sudo apt-get update & sudo apt-get install -- only-upgrade bash
For operating systems such as Fedora, Red Hat, and Cent OS, run the following command:
- Yum-y update bash
I hope this tip will help you to see if you are affected by the Shellshock vulnerability and solve it. You are welcome to raise any questions or suggestions.
Gitlab-shell is affected by Bash CVE-2014-6271 Vulnerability
Linux security vulnerability exposure Bash is more serious than heartbleed
The solution is to upgrade Bash. Please refer to this article.
Bash remote parsing command execution vulnerability Test Method
This article permanently updates the link address: