漏洞测试:
1
|
env
x=
'() { :;}; echo vulnerable'
bash
-c
"echo this is a test"
|
有漏洞输出信息:
vulnerable
this is a test
没有漏洞的输出信息
this is a test
在线修复方案:
请您根据Linux版本选择您需要修复的命令, 为了防止意外情况发生,建议您执行命令前先对Linux服务器系统盘打个快照,如果万一出现升级影响您服务器使用情况,可以通过回滚系统盘快照解决。
centos:(最终解决方案)
yum clean all
yum makecache
yum -y update bash
ubuntu:(最终解决方案)
apt-get update
apt-get -y install --only-upgrade bash
debian:(最终解决方案)
7.5 64bit && 32bit
apt-get update
apt-get -y install --only-upgrade bash
6.0.x 64bit
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_amd64.deb && dpkg -i bash_4.1-3+deb6u2_amd64.deb
6.0.x 32bit
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_i386.deb && dpkg -i bash_4.1-3+deb6u2_i386.deb
aliyun linux:(最终解决方案)
5.x 64bit
wget http://mirrors.aliyun.com/centos/5/updates/x86_64/RPMS/bash-3.2-33.el5_10.4.x86_64.rpm && rpm -Uvh bash-3.2-33.el5_10.4.x86_64.rpm
5.x 32bit
wget http://mirrors.aliyun.com/centos/5/updates/i386/RPMS/bash-3.2-33.el5_10.4.i386.rpm && rpm -Uvh bash-3.2-33.el5_10.4.i386.rpm
opensuse:(最终解决方案)
zypper clean
zypper refresh
zypper update -y bash
离线修复方案:
可借鉴阿里云服务器的修复方法:
下载修复包
CentOS 6.X x64位新版本bash rpm包: bash-4.1.2-29.el6.x86_64.rpm
下载地址:http://download.youkuaiyun.com/detail/open_data/8607503
# 执行命令
# rpm -Uvh bash-4.1.2-29.el6.x86_64.rpm
安装之后在此执行test case