安全研究

安全漏洞
阿里巴巴支付宝pta.dll远程指令执行漏洞

发布日期:2007-02-06
更新日期:2007-02-07

受影响系统:
Alibaba Alipay 所有版本
描述:
BUGTRAQ  ID: 22446
CVE(CAN) ID: CVE-2007-0827

阿里巴巴支付宝(Alipay)是阿里巴巴站点所提供的电子商务在线支付服务。

阿里巴巴支付宝的口令输入控件实现上存在漏洞,远程攻击者可能利用此漏洞控制用户机器。

支付宝的口令输入控件pta.dll中存在远程代码执行漏洞。pta.dll以如下方式引用Remove()函数:

    InprocServer32:    pta.dll
    ClassID      :     66F50F46-70A0-4A05-BD5E-FBCC0F9641EC

    [id(0x60030001), helpstring("method Remove")]
    void Remove([in] int idx);

Remove()函数以如下方式处理idx参数:

    .text:10003D4E ; Remove
    .text:10003D4E
    .text:10003D4E sub_10003D4E    proc near            ; DATA XREF: .rdata:1000B3A4o
    .text:10003D4E                            ; .rdata:1000B41Co ...
    .text:10003D4E
    .text:10003D4E arg_0           = dword ptr  4
    .text:10003D4E arg_4           = dword ptr  8
    .text:10003D4E
    .text:10003D4E                 mov     eax, [esp+arg_4]        
    .text:10003D52                 test    eax, eax
    .text:10003D54                 jl      short loc_10003D78    
    .text:10003D56                 push    esi
    .text:10003D57                 mov     esi, [esp+4+arg_0]    ; get idx
    .text:10003D5B                 shl     eax, 4            ; idx << 4
    .text:10003D5E                 add     eax, [esi+8]        ; [esi+8]=0
    .text:10003D61                 push    edi            ;
    .text:10003D62                 mov     edi, eax            ; idx << 4 ==>edi
    .text:10003D64                 mov     eax, [edi+8]        ; [(idx << 4)+8]==>eax
    .text:10003D67                 push    eax
    .text:10003D68                 mov     ecx, [eax]        ; [[(idx << 4)+8]]==>ecx
    .text:10003D6A                 call    dword ptr [ecx+8]    ; [[[(idx <<4)+8]]+8]==>jmp addr
    .text:10003D6D                 push    edi
    .text:10003D6E                 lea     ecx, [esi+4]
    .text:10003D71                 call    sub_10003F35
    .text:10003D76                 pop     edi
    .text:10003D77                 pop     esi
    .text:10003D78
    .text:10003D78 loc_10003D78:                    ; CODE XREF: sub_10003D4E+6j
    .text:10003D78                 xor     eax, eax
    .text:10003D7A                 retn    8
    .text:10003D7A sub_10003D4E    endp

idx是用户可控的DWORD值,因此攻击者可以获得完全控制。例如,如果将idx设置为0x41414141的话,就会在地址[[[14141410h+8]]+8]执行任意指令。

<*来源:cocoruder (frankruder@hotmail.com
  
  链接:http://marc.theaimsgroup.com/?l=full-disclosure&m=117082595126194&w=2
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

http://ruder.cdut.net/attach/exploit_alipay_vul.rar

建议:
临时解决方法:

为pta.dll设置killbit,或删除%system%\aliedit\pta.dll。

厂商补丁:

Alibaba
-------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

https://www.alipay.com

浏览次数:3551
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障