Nytro Posted September 24, 2012 Report Posted September 24, 2012 Defeating PatchGuardBypassing Kernel Security Patch Protection in Microsoft WindowsBy Deepak Gupta, McAfee Labs,and Xiaoning Li, Intel LabsTable of ContentsSummary 3Introduction 3Kernel Patching 4PatchGuard 5Initialization and operations 5Initialization 6Operations 6Attacks and countermeasures 7Exception handler hooking 7Hooking KeBugCheckEx 8Debug register attack with general detect bit on 8Translation cache attack 11Patching the kernel timer DPC dispatcher 11A generic attack 12A New Level of Security 18SummaryThe kernel forms the core of any operating system. In conjunction with device drivers, the kernelabstracts interfaces for processes, memory management, file system, networking, and other servicesused by application developers. The kernel and other device drivers run at ring 0, the highest privilege,and form the bottom of the stack. Attacking the kernel and drivers puts an attacker in an advantageousposition and helps hide footprints (rootkit activity). This stealth is required because most antimalwarescanners update very frequently. If malware leaves behind footprints, then it can be traced, contained,and easily caught. Thus kernel-level malware with rootkit abilities are a very high-risk category.To protect the 64-bit Windows kernel, Microsoft created Kernel Patch Protection, commonly calledPatchGuard. We haven’t seen many attacks on the 64-bit kernel barring some incidents of TDL4/Alureonand Xpaj. (These are actually “bootkit” attacks against the hard drive’s master boot record that canbe prevented or cleaned later.) We know of no attack in the wild that targets PatchGuard and thenpatches the kernel image or critical kernel data structures. However, independent research, includingour own, has proved that it is possible to defeat PatchGuard. These “white hat” attacks were publishedwith proof of concept code and are purely for educational purposes. However, just as we have seenwith earlier versions of Windows, malware developers will eventually find a way to crack the operatingsystem’s defenses.Unlike 32-bit x86 processors, 64-bit processors from Intel come with virtualization extensions that canbe used to set memory and CPU-register protections at the hardware level. DeepSAFE technology isone such offering from the collaborative efforts of Intel and McAfee; it will be instrumental in stayingone step ahead of malware authors.Download:http://www.mcafee.com/us/resources/reports/rp-defeating-patchguard.pdf Quote