先办事后付款的黑客qq黑客接单网

访客3年前黑客文章321

Author: axisDate: 2007-12-17Team: 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 withUUID fdb3a030-065f-11d1-bb9b-00a024ea5525. During the processing ofopnum 0x06 the service copies user-supplied information into a fixedlength stack buffer. Sending at least 300 bytes will trigger a stackbased buffer overflow due to a vulnerable wcscat() call. Exploitationof 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_m *** q.htmlThe Message Queuing service (m *** q) runs RPC services, listening on the ncacn_ip_tcp transport. By default, the m *** q 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.076d12b80-3467-11d3-91ff-0090272f9ea3 v1.01088a980-eae5-11d0-8d9b-00a02453c337 v1.05b5b3580-b0e0-11d1-b92d-0060081e87f0 v1.041208ee0-e970-11d1-9b9e-00e02c064c39 v1.0Table 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组件。500)this.width=500;">如果是英文版的系统,那么这里可能叫做 Message Queuing安装完之后,可以通过 net start m *** q 来启动服务。服务的进程是 mqsvc.exe, 而服务是在 mqqm.dll 中,所以我们可以反汇编这个dll文件用IDA反汇编mqqm.dll后,用mida插件逆向出RPC调用500)this.width=500;">导出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文件.通过IDA看 _QMCreateObjectInternal 函数,没过多久就看出了问题所在在 QMCreatePrivateQueue 中的 ReplaceDNSNameWithNetBiosName 中,没有对输入进行充分检查,wcscat()导致了一个栈溢出。 ; int __cdecl ReplaceDNSNameWithNetBiosName(wchar_t *Str, wchar_t *Dest)?ReplaceDNSNameWithNetBiosName@@YAXPBGPAG@Z proc nearStr= dword ptr 4Dest= dword ptr 8push esipush 5Ch ; Chpush [esp+8+Str] ; Strcall ds:__imp__wcschrpop ecxmov esi, eaxpop ecxpush ?g_szMachineName@@ *** AGA ; Sourcepush [esp+8+Dest] ; Destcall ds:__imp__wcscpypop ecxpop ecxpush esi ; Sourcepush [esp+8+Dest] ; Destcall ds:__imp__wcscat // 溢出pop ecxpop ecxpop esiretn?ReplaceDNSNameWithNetBiosName@@YAXPBGPAG@Z endp伪代码: wchar_t *__cdecl ReplaceDNSNameWithNetBiosName(wchar_t *Str, wchar_t *Dest){wchar_t *v3; // esi@1v3 = _wcschr(Str, 0x5Cu);_wcscpy(Dest, g_szMachineName);return _wcscat(Dest, v3);}这里我们后面再回过头来看。那么,函数调用是这样的: _QMCreateObjectInternal|---------------QMCreatePrivateQueue|-------------------ReplaceDNSNameWithNetBiosName_QMCreateObjectInternal的伪代码为: signed int __thiscall QMCreateObjectInternal(struct _RTL_CRITICAL_SECTION *this, RPC_BINDING_HANDLE Binding, unsigned int Type, wchar_t *Str, int a5, int a6, int a7, int a8, int a9){__int32 v10; // edi@6__int32 v11; // eax@7int v12; // ST18_4@9struct _RTL_CRITICAL_SECTION *v13; // [sp+4h] [bp-10h]@1int v14; // [sp+10h] [bp-4h]@4v13 = this;if ( a5 && !a6 ){LogMsgHR(-1072824314, off_6B27271C, 0x125u);return -1072824314;}v13 = &qmcmd_cs;EnterCriticalSection(&qmcmd_cs);v14 = 0;if ( Type == 1 ){v12 = 1;goto LABEL_14;}if ( Type == 2 ){Type = 0;v11 = I_RpcBindingInqTransportType(Binding, &Type);if ( v11 )goto LABEL_20;if ( Type == 4 ){v12 = 0;LABEL_14:v10 = CQPrivate__QMCreatePrivateQueue(Str, a5, a6, a7, a8, a9, v12);goto LABEL_15;}if ( v11 )LABEL_20:LogMsgRPCStatus(v11, off_6B27271C, 0x28u);LeaveCriticalSection(&qmcmd_cs);return -1072824283;}v10 = -1072824319;LABEL_15:if ( v10 < 0 )LogMsgHR(v10, off_6B27271C, 0x32u);LeaveCriticalSection(&qmcmd_cs);return v10;}============= 这是华丽的分割线 ================首先要调用到 QMCreatePrivateQueue .我们看到以下是依次是 _QMCreateObjectInternal的六个参数Type= dword ptr 0ChStr= dword ptr 10harg_C= dword ptr 14harg_10= dword ptr 18harg_14= dword ptr 1Charg_18= dword ptr 20harg_1C= dword ptr 24h看以下代码片段 loc_6B22555B: ; CCriticalSection qmcmd_c *** ov esi, offset ?qmcmd_cs@@3VCCriticalSection@@Apush esi ; lpCriticalSectionmov [ebp+var_10], esicall ds:__imp__EnterCriticalSection@4 ; EnterCriticalSection(x)mov eax, [ebp+Type]mov [ebp+var_4], ebxdec eaxjz short loc_6B2255C1在代码中,如果eax为1,dec eax后条件为真,会跳转到QMCreatePrivateQueue 去执行而eax是由mov eax, [ebp+Type]传入的所以要让流程走到QMCreatePrivateQueue_QMCreateObjectInternal的之一个参数必须是为0x00000001以下是 QMCreatePrivateQueue的调用 loc_6B2255C3: ; intpush [ebp+arg_1C]mov ecx, offset ?g_QPrivate@@3VCQPrivate@@A ; CQPrivate g_QPrivatepush [ebp+arg_18] ; intpush [ebp+arg_14] ; intpush [ebp+arg_10] ; intpush [ebp+arg_C] ; intpush [ebp+Str] ; Strcall ?QMCreatePrivateQueue@CQPrivate@@QAEJPBGKPAXKQAKQAUtagPROPVARIANT@@H@Z ; CQPrivate::QMCreatePrivateQueue(ushort const *,ulong,void *,ulong,ulong * const,tagPROPVARIANT * const,int)实际上,我们在后面可以看到,漏洞是由于QMCreatePrivateQueue的之一个参数,也就是_QMCreateObjectInternal的第二个参数所造成的。进入QMCreatePrivateQueue 之后,我们要调用到 ReplaceDNSNameWithNetBiosName.以下是代码片段 .text:6B2178A9 mov eax, offset sub_6B25BE64.text:6B2178AE call __EH_prolog.text:6B2178B3 sub esp, 138h.text:6B2178B9 push ebx.text:6B2178BA push esi.text:6B2178BB mov esi, [ebp+8].text:6B2178BE lea eax, [ebp-1Ch].text:6B2178C1 push edi.text:6B2178C2 push eax ; int.text:6B2178C3 mov [ebp-18h], ecx.text:6B2178C6 push esi ; Source.text:6B2178C7 call ?IsPathnameForLocalMachine@@YAHPBGPAH@Z ; IsPathnameForLocalMachine(ushort const *,int *).text:6B2178CC xor ebx, ebx ; ebx 清0.text:6B2178CE pop ecx.text:6B2178CF cmp eax, ebx ; 比较ispath函数的返回值.text:6B2178D1 pop ecx.text:6B2178D2 jnz short loc_6B2178EC ; 这里有个判断.text:6B2178EC cmp [ebp-1Ch], ebx ; 这里有个判断.text:6B2178EF jz short loc_6B217906.text:6B2178F1 lea eax, [ebp-144h] ; 在栈上.text:6B2178F7 push eax ; Dest.text:6B2178F8 push esi ; Str 我们传入的参数.text:6B2178F9 call ?ReplaceDNSNameWithNetBiosName@@YAXPBGPAG@Z ; ReplaceDNSNameWithNetBiosName(ushort const *,ushort *)========== 这是聪明的分割线

相关文章

《幸福触手可及》人物角色特点介绍 《幸福触手可及》人物角色性格是怎样的

《幸福触手可及》人物角色特点介绍 《幸福触手可及》人物角色性格是怎样的

《幸福触手可及》5月19日开播,它是迪丽热巴和黄景瑜第一次搭挡的电视连续剧,网民们還是很希望男女主撞击出的火苗的,那麼《幸福触手可及》游戏角色是如何的设置呢?我产生详细介绍。 《幸福触手可及》游戏角...

复韵母(18个复韵母是哪些?)

什么是复韵母(18个复韵母是哪些?) 声母是:b、p、m、f、d、t、n、l、g、k、h、j、q、x、zh、ch、sh、z、c、s 、 y、w、r. 单韵母是:a、o、e、i、u、v. 复韵母是...

警惕黑客虚拟资产(黑客如何盗取虚拟币)

警惕黑客虚拟资产(黑客如何盗取虚拟币)

本文目录一览: 1、虚拟资产改变了什么 2、拿别人的QQ号900块钱卖出去买主说被盗了要报案会怎么样? 3、malware.qvm27.gen是木马程序吗 4、如何理解虚拟资产的理论价格...

换了苹果手机怎么传数据(2个苹果手机怎么传软件)

  怎样与朋友共享运用,或将运用同歩到另一部 iPhone 上?下边有三个小窍门,一起来看一下:   一、根据隔空投送共享   该方式适用与朋友共享自身早已免费下载的运用:长按桌面的桌面图标,挑选共享...

网上有能查询老公微信聊天已删好友

领导安排临时任务,要更换企业邮箱服务商,并且在一定的预算内完成,品牌要大、安全性高、服务要好。究竟哪家企业邮箱安全又可靠,最安全的邮箱排名是什么?希望这篇内容,能帮助你快速选择一款适合的企业邮箱。...

黑客笔记本电脑(黑客笔记本电脑多少钱)

黑客笔记本电脑(黑客笔记本电脑多少钱)

本文导读目录: 1、黑客们都用什么笔记本电脑 2、黑客是怎么修笔记本电脑的 3、黑客适合用什么笔记本电脑? 4、顶尖黑客用什么笔记本电脑? 5、推荐几个黑客专业的笔记本电脑 6、黑...