CVE-2014-6271 - 比 HeartBleed Bug 更嚴重的漏洞 !
remote code execution through bash (CVE-2014-6271)
大家對於今年 4 月初爆發的 HeartBleed Bug 應該還記憶猶新吧!
HeartBleed Bug 號稱是10年來最嚴重的漏洞!
更在今年 駭客奧斯卡獎Pwnie Awards獲得四項提名!
原本我們都以為短時間要再出現比 Heartbleed Bug 更嚴重的漏洞應該不會太快。
結果,9/25 就又爆發出 remote code execution through bash (CVE-2014-6271) 漏洞,一個比 HeartBleed Bug 危害更大且影響範圍更廣的漏洞。
Heartbleed Bug 只能造成資料泄露,並不能直接遠端執行命令或是取得電腦管理權限,但是 remote code execution through bash (CVE-2014-6271) 在成功執行下能取得電腦管理權限。
同時,因為是 Bash 的漏洞,所以影響範圍比利用 openssh 的漏洞的 Heartbleed Bug 還要廣泛,絕大部分類 Unix 系統皆曝露在此漏洞威脅下。
和 Heartbleed Bug 相似的是,兩個漏洞使用複雜性都不高,黑帽駭客可以很輕易地利用此漏洞發動攻擊。
remote code execution through bash 簡介
- 嚴重性 : 高 (可以遠端執行任意指令,能取得電腦管理權限。)
- 影響範圍 : 所有有安裝使用 Bash 的類 Unix 系統 (包括 : LINUX & Mac OS X)
- 使用複雜性 : 低 (只需要複製貼上稍微修改一行代碼即可。)
修補方式:
-
Debain/Ubuntu/Mint
apt-get update && apt-get upgrade
-
RHEL/CentOS/Fedora
yum check-update && yum update
檢測方式:
在終端機 (terminal) 輸入
x='() { :;}; echo vulnerable' bash -c "echo this is a test"
- 有漏洞存在時:
vulnerable this is a test
- 漏洞修補完成:
bash: warning: x: ignoring function definition attempt bash: 錯誤,輸入的函數定義為 `x' this is a test
目前修補狀況: :
目前各大 LINUX 發行版已經發佈針對 remote code execution through bash (CVE-2014-6271) 的patch,但 Google 安全人員 Tavis Ormandy 在 Twitter 上表示 "這次的 patch 似乎並不完整",讓人擔心後續是否還會有相關資安威脅。
該注意的是!在本文章完成之前,Apple 尚未有針對 Mac OS X 的 patch,對於廣大 Mac OS X 使用者來說,這應該相當頭痛(本文也是在 Mac OS X 上完成)。
隨文附上相關資料與討論連結:
https://www.youtube.com/watch?v=PLnvKsYJwiM (demo 影片)
http://www.exploit-db.com/exploits/34766/
http://seclists.org/oss-sec/2014/q3/650
http://www.reddit.com/r/netsec/comments/2hbxtc/cve20146271_remote_code_execution_through_bash/
https://securityblog.redhat.com/2014/09/24/bash-specially-crafted-environment-variables-code-injection-attack/
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271