VIDEO: Shellshock Bug Explained + Helpful Command Line Tests

Shellshock Bug Explained

If you run a website, then you’ve probably heard about a massive new security flaw called Shellshock. Any web server using Unix, Linux or Mac OS X is at risk of being hacked into and giving root access to all of your files.

As you might guess, everyone’s freaked out. We all know it’s bad, but what exactly does the Shellshock bug mean to the average blogger or business owner and how do you test your server to see if you’re at risk? In this video, YouTube user Tom Scott tells you everything you need to know about Shellshock in just 4 mins. We’ve also posted some shell commands that will enable you to test your server below.

If you want to see if you’re at risk from Shellshock, then connect to your server and copy and paste the below into a command prompt (doesn’t have to be root).

env x='() { :;}; echo vulnerable’ bash -c ‘echo hello’

If it echoes the below you are vulnerable:

[[email protected] rtm-admin]# env x='() { :;}; echo vulnerable’ bash -c ‘echo hello’

If you are patched it will echo the following:

[[email protected] ~]# env x='() { :;}; echo vulnerable’ bash -c ‘echo hello’
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x’

If you want to check your httpd access logs to see if hackers have been checking you out:

cat /var/log/httpd/access_log | grep “{ :;}”


If you’re unsure about using command line, then ask a professional for help. Command line can be pretty powerful stuff. Whatever you do, DON’T type “rm -rf /” unless you want to erase everything. Those 8 characters have the power to kill. Be careful and good luck!