一个被指比“心脏出血”还要严重的Linux安全漏洞被发现,那就是ShellShock: CVE-2014-6271漏洞,可以让攻击者远程执行任意命令,完全控制您的服务器,比“心脏出血”更低的操作门槛,让它比前者更加危险。下面是漏洞提示原文:
“GNU Bash through 4.3 processes trailing strings after function definitions in the values of envir
onment variables, which allows remote attackers to execute arbitrary code via a crafted environment,
as demonstrated by vectors involving the ForceCommand feature in OpenSSH sshd, the mod_gi and
mod_cgid modules in the Apache HTTP Server, scripts executed by unspecified DHCP clients, and other
situations in which setting the environment occurs across a privilege boundary from Bash execution.”
如何验证
$ env x='() { :;}; echo vulnerable' bash -c 'echo hello'
在终端中运行上面的命令,如果返回有vulnerable,就说明这台服务器中枪了。
把命令中的bash替换成其他类型的shell,可以检查机器上其他shell是否中枪。
如何修复系统Bug
* GNU官方补丁所在地址:http://seclists.org/oss-sec/2014/q3/650
* 各大发行版的解决方法:
Debian:
查看https://www.debian.org/security/2014/dsa-3032
Ubuntu:
查看http://www.ubuntu.com/usn/usn-2362-1/
CentOS:
# yum -y update bash
Fedora:
查看https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-6271
Redhat:
产品 | 补丁包 | 详情 |
Red Hat Enterprise Linux 7 | bash-4.2.45-5.el7_0.2 | Red Hat Enterprise Linux |
Red Hat Enterprise Linux 6 | bash-4.1.2-15.el6_5.1 | Red Hat Enterprise Linux |
bash-4.1.2-15.el6_5.1.sjis.1 | Red Hat Enterprise Linux | |
bash-4.1.2-9.el6_2.1 | Red Hat Enterprise Linux 6.2 AUS | |
bash-4.1.2-15.el6_4.1 | Red Hat Enterprise Linux 6.4 EUS | |
Red Hat Enterprise Linux 5 | bash-3.2-33.el5.1 | Red Hat Enterprise Linux |
bash-3.2-33.el5_11.1.sjis.1 | Red Hat Enterprise Linux | |
bash-3.2-24.el5_6.1 | Red Hat Enterprise Linux 5.6 LL | |
bash-3.2-32.el5_9.2 | Red Hat Enterprise Linux 5.9 EUS | |
Red Hat Enterprise Linux 4 | bash-3.0-27.el4.2 | Red Hat Enterprise Linux 4 ELS |
Novel/SuSE:
查看http://support.novell.com/security/cve/CVE-2014-6271.html
* 其他发行版也可以参照上面的方法自行编译,或者通过发行版内置的包管理器来更新bash。