Shell升級,/bin/bash版本4.1到4.3

來源:互聯網
上載者:User

標籤:bash   shell   安全性漏洞   

bash環境變數存在任意代碼執行漏洞:“通過CGI請求方式可以導致遠程代碼執行,進而導致伺服器被入侵,危害嚴重,且官方公布補丁也被繞過”

【漏洞影響】:

1)bash受影響版本:3.0 ~ 4.3,小於3.0的bash版本也可能受影響,

2)入侵方式:結合CGI方式可以導致遠程代碼執行,入侵伺服器;


瞭解系統當前bash的版本

[[email protected] ~]# /bin/bash -versionGNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)Copyright (C) 2009 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

bash:http://ftp.gnu.org/gnu/bash/

安裝升級bash

wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gztar zxvf bash-4.3.tar.gzcd bash-4.3./configuremakemake install

因為bash預設是安裝在/usr/local/bin/目錄下,所以需要建立一個連結到 /bin/目錄下,安裝完畢後需要重啟生效!

mv /bin/bash /bin/bash.bak; ln -s /usr/local/bin/bash /bin/bash
[[email protected] ~]# /bin/bash -versionGNU bash, version 4.3.0(1)-release (x86_64-unknown-linux-gnu)Copyright (C) 2011 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software; you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.
Linux Bash嚴重漏洞修複緊急通知(2014年9月25日更新)

日前Linux官方內建Bash中新發現一個非常嚴重安全性漏洞,駭客可以利用該Bash漏洞完全控制目標系統並發起攻擊,為了避免您Linux伺服器受影響,建議您儘快完成漏洞修補,修複方法如下:

漏洞檢測方法

可以使用如下命令來檢查系統存在此漏洞:

env -i  X=‘() { (a)=>\‘ bash -c ‘echo date‘; cat echo
修複前輸出:當前系統時間

使用修補方案修複後

date

特別提示:該修複不會有任何影響,如果您的指令碼使用以上方式定義環境變數,修複後您的指令碼執行會報錯。輸出結果中包含date字串就修複成功了。

修補方案

centos:

yum clean allyum makecacheyum -y update bash

ubuntu:

apt-cache gencachesapt-get -y install --only-upgrade bash

debian 7.5 64bit && 32bit :

apt-cache gencachesapt-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+deb6u2_amd64.deb &&  dpkg -i bash_4.1-3+deb6u2_amd64.deb

debian 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

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/5/updates/x86_64/RPMS/bash-3.2-33.el5.1.x86_64.rpm && rpm -Uvh bash-3.2-33.el5.1.x86_64.rpm5.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

Shell升級,/bin/bash版本4.1到4.3

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.