linux_曝出重大bash安全漏洞及修复方法

 日前Linux官方内置Bash中新发现一个非常严重安全漏洞(漏洞参考https://access.redhat.com/security/cve/CVE-2014-6271  ),黑客可以利用该Bash漏洞完全控制目标系统并发起攻击。

    已确认被成功利用的软件及系统:所有安装GNU bash 版本小于或者等于4.3的Linux操作系统。 该漏洞源于你调用的bash shell之前创建的特殊的环境变量,这些变量可以包含代码,同时会被bash执行。  

漏洞检测方法:

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

输出: 

修复前    
vulnerable   
this is a test    
使用修补方案修复后 
bash: warning: x: ignoring function definition attempt 
bash: error importing function definition for `x' 
this is a test 

wKioL1QkBq3QQR_nAAFwtgMB2-I046.jpg特别提示:该修复不会有任何影响,如果您的脚本使用以上方式定义环境变量,修复后您的脚本执行会报错。 

修复方案:

ubuntu: 
14.04 64bit 

1
2
3
wget 
http://mirrors.aliyun.com/fix_stuff/bash_4.3-7ubuntu1.1_amd64.deb
 && dpkg -i bash_4.3-7ubuntu1.1_amd64.deb


14.04 32bit 

1
2
3
wget 
http://mirrors.aliyun.com/fix_stuff/bash_4.3-7ubuntu1.1_i386.deb
 && dpkg -i  bash_4.3-7ubuntu1.1_i386.deb


12.04 64bit 

1
2
3
wget 
http://mirrors.aliyun.com/fix_stuff/bash_4.2-2ubuntu2.2_amd64.deb
 && dpkg -i  bash_4.2-2ubuntu2.2_amd64.deb

 
12.04 32bit 

1
2
3
wget 
http://mirrors.aliyun.com/fix_stuff/bash_4.2-2ubuntu2.2_i386.deb
 && dpkg -i  bash_4.2-2ubuntu2.2_i386.deb

Ubuntu 用户可以通过如下命令打补丁,无需重启:  

1
2
3
apt-get update  
  
apt-get install bash

参考链接及其他Linux系统修复方案:Linux Bash严重漏洞修复紧急通知

 

转载:原文出处 http://xjhznick.blog.51cto.com/3608584/1558248

posted @ 2014-09-26 09:33  cphmvp  阅读(837)  评论(0编辑  收藏  举报
爬虫在线测试小工具: http://tool.haoshuju.cn/