Linux Bash 超級安全漏洞至新修復方法
近日,Linux社區(qū)爆出了關于Linux Bash的安全漏洞,該漏洞源于你調用的bash shell之前創(chuàng)建的特殊的環(huán)境變量,這些變量可以包含代碼,同時會被bash執(zhí)行。 不同于之前的SSL的HeartBlood漏洞,這個Bash漏洞能讓克極客通過嵌入惡意命令完全控制目標機器,而不像HeartBlood只是可以嗅探敏感信息。
對于所有安裝GNU bash 版本小于或者等于4.3的Linux操作系統(tǒng)都應該檢測并修復該漏洞,以免造成不必要的損失。
檢測方法:
命令行中輸入:
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"如果顯示了如下紅色加粗內容,說明你的linux系統(tǒng)存在該漏洞,請立即修復。
vulnerable
this is a test
修補方案:
Centos修補方案(執(zhí)行如下命令,不用重啟):
yum clean all
yum makecache
yum -y update bash
Ubuntu修補方案(執(zhí)行如下命令,不用重啟):
apt-get update
apt-get -y install --only-upgrade bash
Debian稍微復雜一點
先輸入如下命令查看Debian系統(tǒng)版本號:
cat /etc/issue
比如我的是Debian GNU/Linux 7 \n \l
再查看是32bit還是64bit的
file /bin/ls/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x55f1e005df252708d4c456dcc2c7dccea1006553, stripped
debian: 7.X 64bit && 32bit (至終解決方案)
apt-get update
apt-get -y install --only-upgrade bash
6.0.x 64bit
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_amd64.deb
dpkg -i bash_4.1-3+deb6u2_amd64.deb
6.0.x 32bit
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_i386.deb
dpkg -i bash_4.1-3+deb6u2_i386.deb
至后確認是否修復,輸入
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"如果看不到vulnerable,就說明修復成功了。