Safe from Shellshock: How to protect your home computer from the Bash shell bug

The 'Shellshock' Bash shell bug is a big deal, but it's relatively easy to keep your home PC safe.

On the surface, the critical "Shellshock" bug revealed this week sounds devastating. By exploiting a bug in the Bash shell command line tool found in Unix-based systems, attackers can run code on your system--essentially giving them access to your system. Bad guys are already developing exploits that use Shellshock to crack your passwords and install DDoS bots on computers. And since Bash shell is borderline ubiquitous, a vast swath of devices are vulnerable to Shellshock: Macs, Linux systems, routers, web servers, "Internet of Things" gizmos, you name it.

Yeah, it sounds bad.

But really, the impact on you at home should be minimal, especially if you take some basic precautions. Windows systems aren't vulnerable whatsoever--though your router may very well be--unless you're running a program like Cygwin.

How to determine if your computer  is vulnerable to Shellshock

Before we dive in, let's quickly talk about determining whether or not your system is running a vulnerable version of Bash shell. (If you're running a modern version of OS X or Linux, it probably is.)

Simply open the Terminal on your computer and type in the following:

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

If your system is vulnerable to the Bash bug, you'll see the following:


this is a test

If your system has already been patched to protect against the bug, on the other hand, you'll see something similar to this:

$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" bash: warning: x: ignoring function definition attempt bash: error importing function definition for `x' this is a test

How to keep your computer safe from the Shellshock bug

Oh no! Your system is still vulnerable to Shellshock! What should you do now?

Nothing drastic, if you're an average computer user. If your computer is tucked safely behind a firewall--as it should be--the impact on you should be minimal, since attackers won't have any way to execute malicious code through the Bash shell on your system unless they trick you into running the command locally somehow. Shellshock is more dangerous for web servers and devices that "listen" for Internet commands than home PCs.

Apple drove that point home in its response to the Shellshock bug, which was provided to iMore:

"The vast majority of OS X users are not at risk to recently reported bash vulnerabilities... With OS X, systems are safe by default and not exposed to remote exploits of bash unless users configure advanced UNIX services. We are working to quickly provide a software update for our advanced UNIX users."

If you are one of those advanced Unix users on a Mac, this StackExchange thread can show you how recompile Bash with Xcode to plug the bug immediately.

If you're running Linux, most of the big-name distributions have already released updates that patch Shellshock, including Red HatUbuntu, DebianFedoraCentOS and more. Be warned, however, that while this critical update mostly plugs the Shellshock, it is still considered incomplete, as Red Hat explains:

"Red Hat is aware that the patch for CVE-2014-6271 is incomplete. An attacker can provide specially-crafted environment variables containing arbitrary commands that will be executed on vulnerable systems under certain conditions... We are working on patches in conjunction with the upstream developers as a critical priority... Red Hat advises customers to upgrade to the version of Bash which contains the fix for CVE-2014-6271 and not wait for the [additional] patch."

Beyond your computer's operating system, many Internet-enabled devices are vulnerable to Shellshock--including network gear. Check your router manufacturer's website and make sure your firmware is up to date.

The bottom line

Don't panic! Shellshock isn't the end of the world.

But if you're running Linux or OS X, install the newest security updates as soon as possible. Make sure your networking gear is running the latest available firmware as well. (Check back on your router manufacturer's website over the coming days if there's nothing available now). And definitely be on the lookout for malicious emails that try to convince you to run software locally, or attempt to play off Shellshock fears to phish your personal information or login credentials to services. Big scares like this always bring the creeps out of the woodwork.

PCWorld's guides to protecting your PC against devious security traps and identifying malicious email can help you with the latter. For the full rundown on Shellshock--including how the Bash bug affects Internet of Things devices like security cameras and smart appliances--be sure to check out our original report on the bug.

Join the CSO newsletter!

Error: Please check your email address.

Tags MacLinuxOS X MavericksShellsecuritysoftwareoperating systems

More about AppleDebianFedoraLinuxMacsRed HatUbuntu

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Brad Chacos

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts