JavaScript must be enabled in order for you to see "WP Copy Data Protect" effect. However, it seems JavaScript is either disabled or not supported by your browser. To see full result of "WP Copy Data Protector", enable JavaScript by changing your browser options, then try again.

在CentOS與Mac OSX下修復Bash Shellshock的Vulnerability


最近Bash的Vulnerability人家挖出來了,比前陣子的OpenSSL Heartbeat的洞(CVE-2014-0160)還要,就連RHEL 7.0 GA的版本都躲不過,所以只要是Unix-Like的系統幾乎都中,如RHEL、SLES、Ubuntu、Debian或Mac OSX等等,不過主要影響是在Apache搭配CGI的服務可以被有心人士導入環境變數進去,進而取得系統的控制權;至於這個漏洞是由法國人Stephane Schazelas所發現的,在NIST也可以找到該漏洞的說明(CVE-2014-7169);除此之外,在TrustedSec網站也提到如果DHCP Server透過這個漏洞將變數放到環境變數中,恰巧DHCP Client的Process是用Root跑的話,也可以拿到Root的控制權(CVE-2014-6271);總而言之,還是趕快把這個洞補起來吧,怎麼勒?很簡單,如下:
I. For CentOS 6.x
1) 透過下列指令來檢測是否有漏洞(如果出現如下一樣的回應,那就是中了><")
#env x=’() { :;}; echo vulnerable’ bash -c "echo this is a test"
vulnerable
this is a test
#rpm -qa | grep -i bash -> 順便Check Bash的版本

2) 透過直接Mirror更新或下載RPM套件更新(可以從這裡下載CentOS 6.x的Bash Latest套件)
#yum update -y bash -> Method of 1
#wget http://mirror01.idc.hinet.net/centos/6.5/updates/x86_64/Packages/bash-4.1.2-15.el6_5.2.x86_64.rpm
#rpm -Uvh bash-4.1.2-15.el6_5.2.x86_64.rpm/

3) Double Check漏洞是不是已經被修掉
#env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
this is a test
#rpm -qa | grep -i bash -> 順便Check Bash的版本是否已經被更新

II. For Mac OSX

4) 透過Command Line來Check目前的環境(Ensure the Bash vulnerability is presented or not)

5) 先將OS透過Apps store更新成10.9.5


6) 透過BashUpdateMavericks.dmg來打Patch(這邊可以下載Patch的DMG)
#hdiutil attach /root/BashUpdateMavericks.dmg

#hdiutil detach /<PATH about the dmg>
#sudo port selfupdate -> 透過MacPorts來更新!
#sudo port upgrade bash

7) 再透過Command Line來Check Bash的Patch是否已打上

◎、以上就是在CentOS與Mac OSX下修復Bash Shellshock Vulnerability的簡易介紹,至於看倌們不想透過Package的方式更新,可以考慮直接改Source後自行Compiler細部可以參考這裡,先到這,收工!

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
This site is protected by WP-CopyRightPro