一个利用windows系统漏洞造成蓝屏的病毒

发布时间:2008-10-29 23:43:26    点击数:295
昨天收到一个会造成windows系统蓝屏(BSOD)的病毒 感觉挺有趣的,利用了windows内核对于handle操作的一个bug 文件信息: 文件名:Exploit.exe 大小:49152字节 MD5:640f5b263c9697ee402285e16d91c963 程序执行起来系统立即蓝屏,提示的错误是 INVALID_KERNEL_HANDLE 扔到PEID里发现这个程序是Microsoft Visual Studio .NET 2005 -- 2008 -> Microsoft Corporation * 没有加壳,省了一步,很开心,少了许多潜在的麻烦。 扔到IDA里,自动识别到main函数。 push esi push 0 ; lpsa push 37Fh ; dwDesiredAccess push 0 ; dwReserved push 0 ; lpwinsta call ds:CreateWindowStationW push 2 ; dwFlags mov esi, eax push 2 ; dwMask push esi ; hObject call ds:SetHandleInformation push esi ; hWinSta call ds:CloseWindowStation xor eax, eax pop esi retn main函数很简单,里面就只调用了三个API CreateWindowStationW SetHandleInformation CloseWindowStation 这几个API在以前的分析中很少见到。 把样本扔到OD里,在401000下断点,F9直接过去,F7单步,发现执行完call ds:CloseWindowStation就导致蓝屏。 对于这个结果十分不解。但是几次试下来每次都是这样的结果,可以确定作者是故意构造成这样使系统发生蓝屏的。 于是到网上找了一下资料,发现这个是Alex Ionescu大牛在今年 2008 black hat大会上发布的一个windows的bug,这个bug不仅影响Windows XP,并且在Vista SP1/Windows Server 2008中也依然存在。 Alex Ionescu大牛在PPT中是这样做说明的: Find a handle that we can control, and wait for the kernel to close it. Or better yet, have some sort of function that can coerce the kernel to close the handle immediately. But all handle closing is done with CloseHandle. False! Window Stations and Desktops are actually managed by the Object Manager, even if they are Win32k objects. Cannot normally use CloseHandle on a window station or desktop handle. Win32k blocks CloseHandle calls with the OkayToClose mechanism Provides CloseWindowStation and CloseDesktop APIs (NtUserCloseWindowStation/Desktop) NtUserCloseWindowStation is a simple wrapper around... ZwClose! So all we have to do is: 1. Create a window station with CreateWindowStation 2. Protect the handle with SetHandleInformation 3. Close it with CloseWindowStation Bug was caught in Vista SP1 / Server 2008 timeframe. Probably due to SDL -- obvious bug 详细内容可以参考Alex Ionescu's Blog中的文章Black Hat 2008 Wrap-up、这里有PPT的PDF版本下载: http://www.alex-ionescu.com/BH08-AlexIonescu.pdf 这样看下来,这个程序应该是构造用来展示Windows内核的一个bug的演示程序,不过介于其造成的结果是导致Windows系统Crash蓝屏,可能会被利用对计算机进行破坏,所以最终还是加进病毒码进行查杀。 以上是一些小感想,抛砖引玉,希望引来大牛进一步解释一下。
上一篇: 网站设计制作
下一篇: 微软将推网络版Office软件
[返回所有新闻信息]

您的网站 © 中国 版权所有 本站程序界面、源代码受相关法律保护,未经授权,严禁使用
Copyright © 2000-2015 您的域名. All rights reserved
以下js为测试信息