bash 的漏洞造成的危害,請參考:
MyFirefox | Unix亮紅燈!大漏洞「Shellshock」可惡意挾持電腦系統

CentOS 5.x
# cat /etc/redhat-release
CentOS release 5.10 (Final)

目前安裝 bash 套件
# rpm -qa | grep bash
bash-3.2-32.el5_9.1

bash 版本
# bash --version
GNU bash, version 3.2.25(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

檢查是否有漏洞(有)
# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test

更新之後的 bash 套件
# rpm -qa | grep bash
bash-3.2-33.el5.1

bash-3.2-33.el5_10.4

bash 版本
# bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

檢查是否有漏洞(無)
# 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

CentOS 6.x
# cat /etc/redhat-release
CentOS release 6.5 (Final)

bash 版本
# bash --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)

檢查是否有漏洞(無)
# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
bash: warning: x: ignoring function definition attempt
bash: 錯誤,輸入的函數定義為 `x'
this is a test

更新之後的 bash 套件
# rpm -qa | grep bash
bash-4.1.2-15.el6_5.2.i686
bash-4.1.2-15.el6_5.2.x86_64

CentOS 7.x
# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)

目前安裝 bash 套件
# rpm -qa | grep bash
bash-4.2.45-5.el7.x86_64
bash-completion-2.1-6.el7.noarch

目前 bash 的版本
# bash --version
GNU bash, version 4.2.45(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.

檢查是否有漏洞(有)
# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test

更新之後的 bash 套件
# rpm -qa | grep bash
bash-4.2.45-5.el7_0.4.x86_64
bash-completion-2.1-6.el7.noarch

更新之後的 bash 版本
# bash --version
GNU bash, version 4.2.45(1)-release (x86_64-redhat-linux-gnu)

出現這樣,不知道有沒有修補完成(?),但應該是有修正完成
# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
this is a test

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料