| 关键词: nbsp text 010017E6 dword ptr StrConnectState 010017 5A9C2C5A push 一个 |
来源:天鹅糊&&乌鸦酱从来就没有公开过未修补的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 [email protected]: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不存在这个问题。 免费公布了一个bug,大牛蛙同学我们俩是两块七分熟的牛排,就不好意思叫你请客了哈~ |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|