Daily Archives: 26 9月, 2014

Linux Bash发现重大漏洞

GNU Bourne Again Shell (Bash)是Linux和Unix系统中广泛使用的命令行Shell。最近发现的bash重大漏洞允许攻击者运行任意代码,从而接管系统。由于Bash使用广泛,而此漏洞的利用难度极低,可以预见近期将有大量基于此漏洞的攻击发生。

受此漏洞影响的系统包括:

  • RedHat
  • CentOS
  • Ubuntu
  • Debian

受影响的程序包括:

  • Apache
  • SSH
  • DHCP
  • CUPS

可以在shell中运行以下测试代码检查系统是否有此漏洞:

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

如果出现以下内容,则表示漏洞存在:

vulnerable
this is a test

解决办法:
RedHat和CentOS系统可以通过以下命令将bash升级到bash-4.1.2-15.el6_5.1:

# yum update bash

升级完成之后必须重启系统!

Ubuntu用户可以通过以下命令升级bash:

# apt-get install bash

bash升级完成之后再次运行测试代码,如果出现以下提示,则表示漏洞已经修复好了:

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

此漏洞极易被用于攻击网站,目前已有知名网站被攻陷,所有运行Apache的服务器都应该马上更新bash程序。

(完)

26 9月 2014