How To Check If Your Mac Or Linux Machine Is Vulnerable To Shellshock

How To Check If Your Mac Or Linux Machine Is Vulnerable To Shellshock

Shellshock, the newly-discovered vulnerability that allows attackers to inject code into your computer, puts your Mac or Linux machine at a serious risk for malicious attacks. Here’s how to test if your machine is vulnerable.

Shellshock uses a bash script to access your computer. From there, attackers can launch programs, enable features, and access files. The script only affects Unix-based systems, so Linux and Mac are vulnerable while Windows isn’t.

You can test your system by running this test command from Terminal:

env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

If you’re not vulnerable, you’ll get this result:

bash: warning: x: ignoring function definition attempt bash: error importing function definition for 'x' this is a test

If you are vulnerable, you’ll get:

this is a test

You can also check the version of bash you’re running by entering:

bash --version

If you get version 3.2.51(1)-release as a result, you’ll need to update. Head over to WonderHowTo for the guide to update on Mac, and LinuxNewsPro to get the update for Linux.

Every Mac Is Vulnerable to the Shellshock Bash Exploit: Here’s How to Patch OS X [WonderHowTo]

How to patch bash for shellshock in CentOS, Ubuntu, etc [LinuxNewsPro]


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


7 responses to “How To Check If Your Mac Or Linux Machine Is Vulnerable To Shellshock”