多年还未补的win03 quser.exe漏洞

5452 0
枫扬 2009-5-6 10:47:17 | 显示全部楼层 |阅读模式

从来就没有公开过未修补的bug,庆祝今天中午吃到一个很甜的砂糖桔,公开一个05年发现现在还没有修补的中文windows2003的bug。
典型问题出现在quser.exe。query user也是一样的。

main调用DisplayUserInfo,函数开始是:

.text:010017E6 ; __stdcall DisplayUserInfo(x, x, x)
.text:010017E6 _DisplayUserInfo@12 proc near            ; CODE XREF: _main+165 p
.text:010017E6
.text:010017E6 DefaultChar      = byte ptr -10C8h
.text:010017E6 arglist          = byte ptr -10C4h
.text:010017E6 var_10C0         = word ptr -10C0h
.text:010017E6 var_107C         = dword ptr -107Ch
.text:010017E6 var_1064         = dword ptr -1064h
.text:010017E6 cchTime          = dword ptr -105Ch
.text:010017E6 WideCharStr      = word ptr -0C3Ch
.text:010017E6 var_C0C          = dword ptr -0C0Ch
.text:010017E6 var_C04          = dword ptr -0C04h
.text:010017E6 var_804          = dword ptr -804h
.text:010017E6 var_404          = dword ptr -404h
.text:010017E6 var_4            = dword ptr -4
.text:010017E6 arg_0            = dword ptr 8
.text:010017E6 arg_4            = dword ptr 0Ch
.text:010017E6 arg_8            = dword ptr 10h
.text:010017E6
.text:010017E6                  mov      edi, edi
.text:010017E8                  push     ebp
.text:010017E9                  mov      ebp, esp
.text:010017EB                  mov      eax, 10C8h
.text:010017F0                  call     __chkstk开头是一段检查用户状态的,都很简单,到这里的时候

.text:01001918                  push     offset a20s15s ; "%-20s %-15s "
.text:0100191D                  push     eax              ; FILE *
.text:0100191E                  call     ebx ; __imp__fprintf
.text:01001920                  add      esp, 10h
.text:01001923                  push     1
.text:01001925                  push     dword ptr [ebp+arglist] ; arglist
.text:0100192B                  call     _StrConnectState@8 ; StrConnectState(x,x)调用了utildll.dll的一个函数。我们来看看中文win2k3 sp2 all hot fix下面的这个函数:

.text:5A9C2C5A ; __stdcall StrConnectState(x, x)
.text:5A9C2C5A                  public _StrConnectState@8
.text:5A9C2C5A _StrConnectState@8 proc near
.text:5A9C2C5A
.text:5A9C2C5A String2          = word ptr -204h
.text:5A9C2C5A var_4            = dword ptr -4
.text:5A9C2C5A arg_0            = dword ptr 8
.text:5A9C2C5A arg_4            = dword ptr 0Ch开始是一些初始化的,然后在处理字符串的时候:

.text:5A9C2D33                  lea      ecx, [ebp+String2]
.text:5A9C2D39                  push     ecx              ; lpBuffer
.text:5A9C2D3A                  push     eax              ; uID
.text:5A9C2D3B                  push     offset ModuleName ; "UTILDLL.DLL"
.text:5A9C2D40                  call     ds:__imp__GetModuleHandleW@4 ; GetModuleHandleW(x)
.text:5A9C2D46                  push     eax              ; hInstance
.text:5A9C2D47                  call     ds:__imp__LoadStringW@16 ; LoadStringW(x,x,x,x)这个时候,倘若有一个远程登录的用户登录后关闭了远程桌面,uID应该是0x135,这时候调用LoadStringW的时候,会返回一个unicode字符串"\x31\x55\x47\x72"。
在这种情况下对应的资源Disc,从上下文来看是"Disconnected"的缩写,因此对应中文本来该是“断开”,但是资源中,也就是上面的那个unicode字符串"\x31\x55\x47\x72",却是“唱片”,这是一个很明显的bug。
顺便说一句,在英文版中,utildll.dll不存在这个问题。
[fly]我是HUC的一名战士,编号HUC1500![/fly]
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2026 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行