百度超級搜霸遠程代碼執行漏洞
文章作者:cocoruder
資訊來源:XFocus
Summary:
百度超級搜霸是百度公司出品的一款免費的瀏覽器工具列,提供百度公司的各種服務。更多資訊請參考:
http://bar.baidu.com/sobar/promotion.html
在百度超級搜霸中的一個ActiveX控制項中存在一個遠程代碼執行漏洞,遠程攻擊者可利用此漏洞在被攻擊者系統上以當前瀏覽器許可權執行任意代碼,進而可安裝木馬以及間諜程式。
Affected Software Versions:
百度超級搜霸5.4(Version of "BaiduBar.dll" is 2.0.2.144)
Details:
漏洞存在於由ActiveX控制項"BaiduBar.dll"匯出的"DloadDS()"函數中,相關資訊如下:
InprocServer32: C:/Program Files/baidu/bar/BaiduBar.dll
ClassID : A7F05EE4-0426-454F-8013-C41E3596E9E9
[id(0x0000001d), helpstring("method DloadDS")]
void DloadDS(
[in] BSTR bstrUrl,
[in] BSTR bstrName,
[in] long lShow);
如果把bstrUrl設定成某個伺服器上的CAB檔案,DloadDS()函數會嘗試下載這個檔案到TEMP目錄並解壓,然後執行其中的以bstrName命名的檔案,執行處的關鍵代碼如下:
.text:1006F407 lea eax, [ebp-28h]
.text:1006F40A lea ecx, [ebp-10h]
.text:1006F40D push eax ; lpProcessInformation
.text:1006F40E lea eax, [ebp-6Ch]
.text:1006F411 push eax ; lpStartupInfo
.text:1006F412 push esi ; lpCurrentDirectory
.text:1006F413 push esi ; lpEnvironment
.text:1006F414 push esi ; dwCreationFlags
.text:1006F415 push esi ; bInheritHandles
.text:1006F416 push esi ; lpThreadAttributes
.text:1006F417 push esi ; lpProcessAttributes
.text:1006F418 push esi
.text:1006F419 call sub_10004147 ; get the CommandLine
.text:1006F419
.text:1006F41E push eax ; lpCommandLine
.text:1006F41F push esi ; lpApplicationName
.text:1006F420 call ds:CreateProcessA
此時lpCommandLine指向"C:/DOCUME~1/administrator/LOCALS~1/Temp/calc.exe",由於之前沒有任何有效檢查措施,因此攻擊者可構造包含木馬或者間諜程式的CAB檔案,然後用DloadDS()函數下載並運行它。因此,有漏洞的百度搜霸相當於一個完美的後門。
How to Reproduce:
Exploit在如下URL地址:
http://ruder.cdut.net/attach/baidu_soba/baidu_soba_exploit.html
安裝百度搜霸, 用IE開啟它並點擊"DowndloadCalcAndRun"按紐,你會發現計數器程式(在http://ruder.cdut.net/attach/calc.cab)被下載並執行。
如果你無法找到受影響的版本,帶有數位簽章的百度搜霸5.4版在如下地址也可以下載到:
http://ruder.cdut.net/attach/baidu_soba/setup.exe
此檔案的MD5值:7F751A157AF42E92FDD0AF3F179FE9AB
Solution:
Baidu通知已經修複了此漏洞,但實際上,從http://bar.baidu.com/sobar/promotion.html下載的Baidu搜霸依舊受到影響(MD5值沒變,不過可能是線上更新未成功),強烈建議使用者對此CLSID設定Killbit。
Disclosure Timeline:
2007.07.19 漏洞發現並通知廠商
2007.07.19 廠商回應
2007.07.23 廠商通知新版本發布但不發布公告
2007.07.24 新版本未發布成功
2007.08.01 廠商再次通知新版本發布,但仍未完全修複
2007.08.02 發布公告
--EOF--