分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]
Sep 25
一、漏洞概述
在GNU bash环境变量中定义一个函数之后,如果后续还有其它字符串,bash在解析这些字符串的时候存在一个缺陷,允许远程攻击者执行任意的命令,只要攻击者 构建一个特殊的环境变量即可。攻击者可以利用此缺陷重写或绕过环境变量的限制执行shell命令,从而导致信息泄漏、未授权的恶意修改、服务中断。

二、受影响版本

  目前GNU bash4.3及以下版本存在此问题。

三、利用场景

如下业务场景中都会受此缺陷影响:
1、OpenSSHsshd使用了ForceCommand特性

ForceCommand特性用来给远程用户提供受限的命令执行能力,因此使用了此特性的如git、subversion等都会受影响。

2、Apache HTTP Server使用了modcgi和mod_cgid模块;
        
在Apache Server启用了modcgi和mod_cgid模块时,只要CGI脚本是由bash编写,或者使用了派生的subshell都会受影响。能够产生这样的subshell的包括:
C语言的system/popen,Python的os.system/os.popen,PHP的system/exec,Perl的open/system。

四、修复方法

yum clean all
yum --enablerepo=updates install bash

五、验证方法

验证是否存在次漏洞的方法:
      
[root@localhost]# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test

漏洞修复之后,再执行该命令:
[root@localhost]# 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

六、参考链接
https://www.invisiblethreat.ca/2014/09/cve-2014-6271/
https://access.redhat.com/node/1200223
Tags: ,
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]