How to Fix Shellshock Bash Vulnerability Tutorial : Shellshock or the “Bash Bug” vulnerability allows remote attackers to execute arbitrary code given certain conditions, by passing strings of code following environment variable assignments. Because of Bash’s ubiquitous status amongst Linux, BSD, and Mac OS X distributions, many computers are vulnerable to Shellshock; all unpatched Bash versions between 1.14 through 4.3 (i.e. all releases until now) are at risk. Today we will learn how to fix Shellshock bash Vulnerability on servers.
- Apache HTTP Servers that use CGI scripts (via mod_cgi and mod_cgid) that are written in Bash or launch to Bash subshells
- Certain DHCP clients
- OpenSSH servers that use the ForceCommand capability
- Various network-exposed services that use Bash
![]() |
How to Fix Shellshock Bash Vulnerability Tutorial |
How to check that you are vulnerable to Bash bug or shellshock bash bug?
env X=”() { :;} ; echo Bash is Infected” /bin/sh -c “echo completed”
env X=”() { :;} ; echo Bash is Infected” `which bash` -c “echo completed”
env VAR='() { :;}; echo Bash is Infected‘ bash -c “echo completed”
bash: warning: VAR: ignoring function definition attempt
bash: error importing function definition for `VAR’
Bash Test
How to test Remote sites or CGI Scripts that they are vulnerable to shellshock Bash Bug or Not?
Fix Bash Bug or Shellshock Vulnerability – Update Bash:
APT-GET: Ubuntu / Debian
sudo apt-get update && sudo apt-get install –only-upgrade bash
YUM: CentOS / Red Hat / Fedora
sudo yum update bash
Leave a Reply