淘主机论坛

 找回密码
 成为淘友

QQ登录

只需一步,快速开始

KT服务器促销中 100M带宽 10T流量 超值传送门:会员注册及发帖规则 发帖看过来
查看: 1569|回复: 0

[安全] Linux Bash严重漏洞修复紧急通知

[复制链接]
发表于 2014-9-25 19:25:19 | 显示全部楼层 |阅读模式
日前Linux官方内置Bash中新发现一个非常严重安全漏洞(漏洞参考https://access.redhat.com/security/cve/CVE-2014-6271 ),黑客可以利用该Bash漏洞完全控制目标系统并发起攻击,为了避免您Linux服务器受影响,建议您尽快完成漏洞修补!

修补方案请参考论坛http://bbs.aliyun.com/read.php?tid=176977,请了解!


【已确认被成功利用的软件及系统】  
所有安装GNU bash 版本小于或者等于4.3的Linux操作系统。  


【漏洞描述】  
该漏洞源于你调用的bash shell之前创建的特殊的环境变量,这些变量可以包含代码,同时会被bash执行。  


【漏洞检测方法】  

修复前
输出:   
vulnerable   
this is a test   


使用修补方案修复后
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test
特别提示:该修复不会有任何影响,如果您的脚本使用以上方式定义环境变量,修复后您的脚本执行会报错。


【建议修补方案 】  

请您根据Linux版本选择您需要修复的命令, 为了防止意外情况发生,建议您执行命令前先对Linux服务器系统盘打个快照,如果万一出现升级影响您服务器使用情况,可以通过回滚系统盘快照解决。  

centos:
yum -y update bash

ubuntu:
14.04 64bit
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
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
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
wget http://mirrors.aliyun.com/fix_stuff/bash_4.2-2ubuntu2.2_i386.deb && dpkg -i  bash_4.2-2ubuntu2.2_i386.deb

10.10 64bit
wget http://mirrors.aliyun.com/fix_stuff/bash_4.1-2ubuntu3.1_amd64.deb && dpkg -i bash_4.1-2ubuntu3.1_amd64.deb

10.10 32bit
wget http://mirrors.aliyun.com/fix_stuff/bash_4.1-2ubuntu3.1_i386.deb && dpkg -i bash_4.1-2ubuntu3.1_i386.deb


debian:
7.5 64bit && 32bit
apt-get -y install --only-upgrade bash

6.0.x 64bit
wget http://mirrors.aliyun.com/debian ... %2bdeb6u1_amd64.deb &&  dpkg -i bash_4.1-3+deb6u1_amd64.deb

6.0.x 32bit
wget http://mirrors.aliyun.com/debian ... 3%2bdeb6u1_i386.deb &&  dpkg -i bash_4.1-3+deb6u1_i386.deb

opensuse:
13.1 64bit
wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.x86_64.rpm && rpm -Uvh bash-4.2-68.4.1.x86_64.rpm


13.1 32bit
wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.i586.rpm && rpm -Uvh bash-4.2-68.4.1.i586.rpm

aliyun linux:
5.x 64bit
wget http://mirrors.aliyun.com/centos ... 33.el5.1.x86_64.rpm && rpm -Uvh bash-3.2-33.el5.1.x86_64.rpm

5.x 32bit
wget http://mirrors.aliyun.com/centos ... 2-33.el5.1.i386.rpm && rpm -Uvh bash-3.2-33.el5.1.i386.rpm


测试漏洞过程:

To test if your version of Bash is vulnerable to this issue, run the following command:

$ env x='() { :;}; echo vulnerable'  bash -c "echo this is a test"
If the output of the above command looks as follows:

vulnerable
this is a test

you are using a vulnerable version of Bash. The patch used to fix this issue ensures that no code is allowed after the end of a Bash function. Thus, if you run the above example with the patched version of Bash, you should get an output similar to:

$ 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
您需要登录后才可以回帖 登录 | 成为淘友

本版积分规则

小黑屋|手机版|Archiver|淘主机

GMT+8, 2024-12-23 13:16

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表