Windows 内核漏洞 ms08025 分析
Author: Polymorphours Email: Polymorphours@whitecell.org Homepage:http://www.whitecell.org Date: 2008-04-10
经内部讨论后决定公布分析成果。
4月8号microsoft再次发布了一个系统内核的补丁(KB941693), 微软对该漏洞的描述为: 此安全更新解决 Windows 内核中一个秘密 报告的漏洞。 成功利用此漏洞的本地攻击者可以完全控制受影响的 系统。 攻击者可随后安装程序;查看、更改或删除数据;或者创建 新帐户。这是用于 Windows 2000、Windows XP、Windows Server 2003、 Windows Vista 和 Windows Server 2008 所有受支持版本的重要安全 更新。此安全更新通过修改 Windows 内核验证从用户模式传递过来的 输入的方式来解决此漏洞。
从这个介绍中我们看到这个漏洞影响非常广,从2000到2008。为了 能一睹这个漏洞的细节,我分析了ms08-025的补丁,发现该漏洞存在于 win32k.sys 模块中。在这个补丁中修补了win32k.sys中的多个地方,其 中出问题的地方非常有趣,是因为溢出寄存器来绕过 ProbeForWrite 函数对用户层传来的指针的检查,下面我们就从 NtUserfnOUTSTRING 函数中的问题来展开我们的分析(我分析的平台是winxp sp2)
.text:BF86FB04 ; int __stdcall NtUserfnOUTSTRING(int,int,int,PVOID Address,int,int,int) .text:BF86FB04 __stdcall NtUserfnOUTSTRING(x, x, x, x, x, x, x) proc near .text:BF86FB04 ; CODE XREF: xxxDefWindowProc(x,x,x,x)+6Ep .text:BF86FB04 ; NtUserMessageCall(x,x,x,x,x,x,x)+61p .text:BF86FB04 ; xxxSendMessageToClient(x,x,x,x,x,x,x)-Ep .text:BF86FB04 ; xxxSendMessageToClient(x,x,x,x,x,x,x)+6Dp .text:BF86FB04 ; xxxWrapCallWindowProc(x,x,x,x,x)-4Bp .text:BF86FB04 ; xxxWrapCallWindowProc(x,x,x,x,x)+60p ... .text:BF86FB04 .text:BF86FB04 var_24 = dword ptr -24h .text:BF86FB04 var_20 = dword ptr -20h .text:BF86FB04 UserBuffer = dword ptr -1Ch .text:BF86FB04 ms_exc = CPPEH_RECORD ptr -18h .text:BF86FB04 arg_0 = dword ptr 8 .text:BF86FB04 arg_4 = dword ptr 0Ch .text:BF86FB04 arg_8 = dword ptr 10h .text:BF86FB04 Address = dword ptr 14h .text:BF86FB04 arg_10 = dword ptr 18h .text:BF86FB04 arg_14 = dword ptr 1Ch .text:BF86FB04 arg_18 = dword ptr 20h .text:BF86FB04 .text:BF86FB04 ; FUNCTION CHUNK AT .text:BF86FAE1 SIZE 0000001E BYTES
1 2 下一页 |