Author: axis
Date: 2007-12-17
Team:
http://www.ph4nt0m.org微软的补丁链接
http://www.microsoft.com/technet/security/bulletin/ms07-065.mspx根据ZDI的
漏洞描述:
The specific flaw exists in the RPC interface defined on port 2103 with
UUID fdb3a030-065f-11d1-bb9b-00a024ea5525. During the processing of
opnum 0x06 the service copies user-supplied information into a fixed
length stack buffer. Sending at least 300 bytes will trigger a stack
based buffer overflow due to a vulnerable wcscat() call. Exploitation
of this issue can result in arbitrary code execution.
漏洞是在UUID fdb3a030-065f-11d1-bb9b-00a024ea5525 的第6个调用引起的。最终通过一个 wcscat()的拷贝造成一个栈溢出.
查找了一下关于
这个接口的一些定义
http://www.hsc.fr/ressources/articles/win_net_srv/msrpc_msmq.htmlThe Message Queuing service (msmq) runs RPC services, listening on the
ncacn_ip_tcp transport. By default, the msmq services opens 4 TCP ports [
81], including one or several of 2101/tcp, 2103/tcp, 2105/tcp and 2107/tcp.
The
mqqm.dll (Windows NT MQ Queue Manager) DLL, loaded in the
mqsvc.exe process, contains the following RPC services:
fdb3a030-065f-11d1-bb9b-00a024ea5525 v1.0
76d12b80-3467-11d3-91ff-0090272f9ea3 v1.0
1088a980-eae5-11d0-8d9b-00a02453c337 v1.0
5b5b3580-b0e0-11d1-b92d-0060081e87f0 v1.0
41208ee0-e970-11d1-9b9e-00e02c064c39 v1.0
Table 4.49. qmcomm operationsInterface Operation number Operation namefdb3a030-065f-11d1-bb9b-00a024ea5525 v1.0: qmcomm
0x00 QMOpenQueue
0x01 QMGetRemoteQueueName
0x02 QMOpenRemoteQueue
0x03 QMCloseRemoteQueueContext
0x04 QMCreateRemoteCursor
0x05 QMSendMessageInternal
0x06 QMCreateObjectInternal
。。。。。。
事实上,
这个服务运行在2101、2103、2105、2107端口,根据我后来的结果可以看到,这些端口都能够直接溢出
这个漏洞被微软标记为important,因为在2003偷偷修复了,在xp和2000 professional版本上,
这个漏洞利用时候需要验证用户密码,只有在2000 server上,才能够无须身份验证的触发溢出。
Windows默认是没有装
这个服务的,要安装
这个服务可以在添加删除程序里,选择添加windows组件。

如果是英文版的系统,那么这里可能叫做 Message Queuing
安装完之后,可以通过 net start msmq 来启动
服务。
服务的进程是 mqsvc.exe, 而
服务是在 mqqm.dll 中,所以我们可以反汇编
这个dll文件
用IDA反汇编mqqm.dll后,用mida插件逆向出RPC调用

导出IDL文件后,可以看到函数结构如下:3
/* opcode: 0x06, address: 0x613B5F03 */
long _QMCreateObjectInternal (
[in] long arg_1,
[in][string] wchar_t * arg_2,
[in][range(0,524288)] long arg_3,
[in][unique][size_is(arg_3)] char * arg_4,
[in][range(1,128)] long arg_5,
[in][size_is(arg_5)] long arg_6[],
[in][size_is(arg_5)] struct struct_4 arg_7[]
);
这个函数结构暂时先不管他,也可以自己重新构造了一个IDL文件.
[1] [2] [3] [4] [5] [6] 下一页