百度超级搜霸远程代码执行漏洞
发布日期:[07-08-07 00:00:00] 点击次数:[]

Summary:

  百度超级搜霸是百度公司出品的一款免费的浏览器工具栏,提供百度公司的各种服务。在百度超级搜霸中的一个ActiveX控件中存在一个远程代码执行漏洞,远程攻击者可利用此漏洞在被攻击者系统上以当前浏览器权限执行任意代码,进而可安装木马以及间谍程序。

  Affected Software Versions:

  百度超级搜霸5.4(Version of "BaiduBar.dll" is 2.0.2.144)

  Details:

  漏洞存在于由ActiveX控件"BaiduBar.dll"导出的"DloadDS()"函数中,相关信息如下:

  InprocServer32: C:Program FilesaiduarBaiduBar.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~1administratorLOCALS~1Tempcalc.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)被下载并执行。

  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 发布公告