当前位置:首页 > Linux > 正文

如何下载linux bash重大安全破绽

nux Bash重大安全破绽(如CVE-2014-6271)的下载方式,需根据系统版本选择对应补丁包,如通过阿里云镜像下载特定deb或rpm包,或从GNU官网获取源码编译安装

nux Bash曾出现过重大安全破绽,如CVE-2014-6271等,以下是关于该破绽的详细介绍、检测方法以及不同Linux系统下的修复方式:

破绽详情

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

  • 影响范围:所有安装GNU bash版本小于或者等于4.3的Linux操作系统。

    如何下载linux 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

不同Linux系统的修复方法

Linux系统 修复命令
CentOS yum clean all
yum makecache
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
Ubuntu 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
Ubuntu 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
Ubuntu 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
Ubuntu 10.x 64bit wget http://mirrors.aliyun.com/fix_stuff/bash_4.1-2ubuntu3.1_amd64.deb
dpkg -i bash_4.1-2ubuntu3.1_amd64.deb
Ubuntu 10.x 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
Debian 6.0.x 64bit wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u1_amd64.deb
dpkg -i bash_4.1-3+deb6u1_amd64.deb
Debian 6.0.x 32bit wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u1_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
OpenSUSE 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/5/updates/x86_64/RPMS/bash-3.2-33.el5.1.x86_64.rpm
rpm -Uvh bash-3.2-33.el5.1.x86_64.rpm
Aliyun Linux 5.x 32bit wget http://mirrors.aliyun.com/centos/5/updates/i386/RPMS/bash-3.2-33.el5.1.i386.rpm
rpm -Uvh bash-3.2-33.el5.1.i386.rpm

相关问答FAQs

  • 问题1:修复Bash破绽后,原来的脚本还能正常运行吗?

    • 解答:一般情况下,修复该破绽不会对大多数正常脚本的运行产生影响,但如果您的脚本使用了特定的环境变量定义方式,可能会在修复后出现报错的情况,不过这种影响相对较小,而且为了保证系统安全,修复破绽是必要的,建议在执行修复命令前,先对重要的脚本和数据进行备份,以防万一。
  • 问题2:如何确认Bash破绽是否真正修复成功?

    • 解答:在执行完相应的修复命令后,再次使用破绽检测命令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
      • 则说明破绽已经成功修复,如果仍然显示vulnerablethis is a test,则需要检查修复过程是否正确,或者是否存在其他
0