• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home VPS/Servers management guides

Bash ShellShock – The Best Ways to Check if You Are Vulnerable.

How VPS by How VPS
November 2, 2018
in VPS/Servers management guides
0
Bash ShellShock – The Best Ways to Check if You Are Vulnerable.
0
SHARES
58
VIEWS
Share on FacebookShare on Twitter

Contents

  1.  How to check your servers for Bash ShellShock (CVE-2014-6271, CVE-2014-7169)
  2. How do I check my server is Vulnerable to Bash ShellShock?
    1. Check Locally
    2.  Checking Remotely
  3.  How do I patch my system to prevent ShellShock?
  4. Conclusion

Bash ShellShock – The Best Ways to Check if You Are Vulnerable. How to check your servers for Bash ShellShock (CVE-2014-6271, CVE-2014-7169)

ShellShock, what a fitting name. The latest major headache for Sys Admins, Developers…well pretty much anyone who has a*nix system running… has been brought to our attention by Security Researcher Stephane Chazelas.

The impact of this vulnerability is far bigger than the recent SSL Heartbleed vulnerability. While most people would not think of a bash being something you would be able to access remotely. Its just a shell right? Well Not quite.

Bash, the Bourne Again Shell, is widely used (and loved) by many system administrators and developers. Bash allows you to do some very powerful things that you would normally do in a programming language. With Bash, you can use variables and functions, just as you would in any good programming language. This is what makes bash so powerful.



Unfortunately, the way Bash validated the input for variables and functions, allowed for a malicious user to append a command to the end of the function or variable. Then every time bash is run, it populates the variables, but also runs those commands.

Its unbelievable this has not been found before now. The vulnerability impacts bash versions going back 15 years or more. But it doesn’t just end there. Think of all the “things” that might use a shell. Also in RHEL and CentOS /bin/sh is actually a symlink to /bin/bash. So now think of all the “things” that might call /bin/sh to the list of attack vectors.

Some of the “things” that might use calls to a shell are:

  • CGI Scripts with system() calls or even back-tics /bin/something
  • OpenSSH
  • DHCP Serverices
  • system() type calls in various programing languages, beyond Perl and CGI.
  • Embedded software on devices like webcams and home routers. (these will rarely get updated)

The list goes on and on. The more I think about it, the more I find could be vulnerable to the ShellShock vulnerability.

How do I check my server is Vulnerable to Bash ShellShock?

We have been following the news and scouring the internet to find the latest resources to identify if you or your website is vulnerable.

Check Locally

RedHat has a very detailed article here. There are a few simple tests you can run from a shell on your server to see if you are vulnerable. This command will test your system. If it is vulnerable it will print the word “vulnerable”. If it does not, you are safe for CVE-2014-6271!

1
env ‘x=() { :;}; echo vulnerable’ ‘BASH_FUNC_x()=() { :;}; echo vulnerable’ bash –c “echo test”

But this is only half the battle, you still need to check for CVE-2014-7169. To do just that run the following command. If your system is vulnerable, it will print the time and place a file in /tmp called “echo”. If it doesn’t tell you the time, and the file is not created, you are safe from CVE-2014-7169 type attack.

1
cd /tmp; rm –f /tmp/echo; env ‘x=() { (a)=>/‘ bash –c “echo date”; cat /tmp/echo

 Checking Remotely

We have already seen metaSploit Modules for ShellShock publicly available. We won’t touch on that now but know they are out there, and more are coming, so get patched quickly.

If you still want to see if your site is vulnerable, we have found a few really good places to do that.



A tool that uses HTTP based exploits only can be found at: shellshock.brandonpotter.com.

Another great resource for testing is the aptly named BashSmash!

 How do I patch my system to prevent ShellShock?



The way to fix this is to update your version of bash running on the server. So at least the patch is easy!

Run the following command to install the latest bash package provided by RedHat or CentOS.

1
yum update bash

If you do not see any packages available for update, you might be using a stale cache. If so try running the following command before you install.

1
yum clean all

Thats all it takes. Three simple words, well six if you have to update the cache!

Conclusion

The Bash ShellShock vulnerability is a severe vulnerability that is widespread and has the high potential to be remotely exploited. Luckly it is just as easy to protect your systems. Just remember those three little words…”yum update bash”.

-Tutor

Previous Post

How to Transfer Files Between Two Computers using nc and pv Commands

Next Post

How to Configure a Firewall with UFW

Next Post
How to Configure a Firewall with UFW

How to Configure a Firewall with UFW

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet