Guestguard: Dynamic Kernel Tampering Protection Using a Processor Assisted Virtual Machine

Guestguard: Dynamic Kernel Tampering Protection Using a Processor Assisted Virtual Machine

GUESTGUARD: DYNAMIC KERNEL TAMPERING PROTECTION USING A PROCESSOR ASSISTED VIRTUAL MACHINE A THESIS SUBMITTED TO THE GRADUATE DIVISION OF THE UNIVERSITY OF HAWAI‘I IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN INFORMATION AND COMPUTER SCIENCES DECEMBER 2009 By Yoshiaki Iinuma Thesis Committee: Edoardo S. Biagioni, Chairperson Henri Casanova Kazuo Sugihara We certify that we have read this thesis and that, in our opinion, it is satis- factory in scope and quality as a thesis for the degree of Master of Science in Information and Computer Sciences. THESIS COMMITTEE Chairperson ii c Copyright 2009 by Yoshiaki Iinuma iii To my wife and daughters, who offered me unconditional love and support throughout the course of this thesis. and In memory of Dr. Wes Peterson. iv Acknowledgments I would like to express my deep and sincere gratitude to my advisor, Dr. Edoardo S. Biagioni, for his sound advice and careful guidance, and patience throughout this project. This work would not have been possible without his support and encouragement. I would also like to thank my thesis committee, Dr. Henri Casanova, Dr. Kazuo Sugihara, and Dr. Wes Peterson, who willingly agreed to be my thesis committee, and dedicated their time and effort for my thesis. I cannot end without thanking my wife, Takayo, and my daughters, Lin and Beni, for their understanding and endless love. To each of the above, I extend my deepest appreciation. v Abstract Recent malware has become more powerful and stealthy by means of directly attacking kernels. For a more secure computing environment, keeping the integrity of the kernel is very essential. However, putting kernel protection into practice is very problematic since there are some problems which originate from the design deficiencies of operating systems widely used today. Many current operating systems provide a process with too much flexibility and allow malware to run in the same level as the security system. Kernel attacking malware often takes the following actions: 1) modifying a code segment; 2) executing a data segment; and, 3) accessing memory space of different processes. The proposed system, GuestGuard, has a goal to prevent malware from tampering with the kernel process. GuestGuard enforces a strict policy against illegal memory usages. GuestGuard has achieved this by extending the Intel x86 memory protection mechanism. When GuestGuard de- tects an illegal memory access, it can dynamically stop the process. GuestGuard is implemented on a processor-assisted virtualization system, KVM. By introducing a virtual machine as a new security layer, GuestGuard obtained two strong points: dynamic prevention and tamper-resistance, which the conventional security systems do not provide. In addition, because of its simple protec- tion mechanism using a processor feature, GuestGuard can work much more efficiently than other security systems using a virtual machine. GuestGuard targets the Windows operating system. By extracting the operating system level information directly from the guest kernel memory, GuestGuard can work with Windows without any modifications to it. GuestGuard does not have any guest side portion so that an attacker, in theory, does not have any chance to directly attack GuestGuard. GuestGuard has demonstrated its deterrent power against certain types of malware and also its potential to deal with any types of malware which attacks kernel. Additionally, GuestGuard can work with a commodity operating system and does not affect the performance of the computer system which GuestGuard protects. GuestGuard is a promising and realistic security solution. vi Table of Contents Acknowledgments ....................................... v Abstract............................................ vi ListofTables ......................................... ix ListofFigures........................................ x 1 Introduction......................................... 1 2 Background........................................ 3 2.1 Windows on the Intel X86 Architecture . 3 2.1.1 Windows System Architecture . 3 2.1.2 Object Manager and Security Reference Monitor (SRM) . 4 2.1.3 Points of Attack inside Windows . 5 2.2 Malware........................................ 7 2.2.1 HybridMalware ............................... 7 2.2.2 Rootkits . 8 2.2.3 MalwareTrend ................................ 8 2.2.4 User-level Malware and Kernel-level Malware . ... 9 2.2.5 Kernel-level Malware Installation . 9 2.2.6 Kernel-level Malware Technologies . 9 2.3 Anti-Malware..................................... 12 2.3.1 Malware Life Span and Detection Timing of each Anti-Malware Technology 12 2.3.2 Problems with Current Security Systems . 12 2.3.3 “Out-of-the-box” Approach . 13 2.3.4 State Monitoring (Polling Detection) and Behavior Monitoring (Event-Driven Detection)................................... 14 2.3.5 Security Policy Enforcement . 16 2.3.6 Hardware-assisted Policy Enforcement . 19 2.4 KVM ......................................... 19 2.4.1 KVM Shadow Page Table Implementation . 20 3 ThesisStatement ...................................... 22 4 GuestGuardOverview.................................. 23 4.1 GuestGuardDesignGoals .............................. 23 4.2 TargetMalware .................................... 23 4.3 Overview ....................................... 24 4.4 GuestGuard Memory Protection Typical Scenario . 25 4.5 Development Environment . 25 5 GuestGuard Implementation Detail . 26 vii 5.1 X86 Page Protection Virtualization . 26 5.2 ExtendedShadowPageTable. 27 5.3 Direct Extraction of Operating System Level Information . 28 5.4 Windows Kernel Object Accessibility . 29 5.5 Memory to be Protected . 29 5.6 How to find the memory areas to be protected (Windows Introspection) . 30 5.6.1 Global Descriptor Table (GDT) . 30 5.6.2 Interrupt Descriptor Table (IDT) and Interrupt Service Routines ...... 30 5.6.3 System Service Descriptor Table (SSDT) and System Services . 30 5.6.4 Loadedmodules ............................... 31 5.6.5 System Service Dispatch Routine (KiFastSystemCall) . 31 5.7 Shutdown ....................................... 31 5.8 GuestGuard Memory Protection Typical Scenario Details . 32 6 Evaluation.......................................... 33 6.1 PerformanceOverhead ............................... 33 6.2 FunctionalTest .................................... 36 6.2.1 TestSample.................................. 36 6.2.2 Results .................................... 36 7 Discussion.......................................... 44 7.1 Analysis of Functional Test Results . 44 7.2 Kernel Tampering Malware Classification . 45 7.3 Potential Improvements . 47 7.3.1 Against SMM rootkits (Type I & III KTM) . 47 7.3.2 Against the Memory Mapping Bypassing Technique (Type III KTM) . 48 7.3.3 AgainstDKOM(TypeIVKTM). 49 7.3.4 Against Filter Driver Perversion (Type II KTM) . 50 8 FutureWork......................................... 51 9 Conclusions......................................... 53 A PerformanceTestResultDetail . 55 Bibliography .......................................... 60 viii List of Tables Table Page 2.1 TopMalwareActions................................. 8 6.1 PCMark05 Score Calculation . 34 6.2 Physical Machine Specification . 34 6.3 Virtual Machine Specification . 34 6.4 FunctionalTestResult ................................ 37 6.5 Attacking Points of Rootkits Detected by GuestGuard . 37 A.1 Native Performance Test Result Detail . 56 A.2 QEMU Performance Test Result Detail . 57 A.3 KVM Performance Test Result Detail . 58 A.4 GuestGuard Performance Test Result Detail . 59 ix List of Figures Figure Page 2.1 Windows System Architecture . 4 2.2 Anti-Malware Problems . 12 2.3 Virtual Machine Differences . 20 4.1 GuestGuardOverview ................................ 24 5.1 X86 Paging Mechanism Virtualization . 26 5.2 ShadowPageTable .................................. 28 6.1 BenchmarkResults .................................. 35 7.1 KTMClassification.................................. 46 7.2 SMMOverview.................................... 47 7.3 Memory Mapping Circumvention . 48 7.4 AgainstDKOM.................................... 49 x Chapter 1 Introduction Malware technologies are steadily advancing and now some malware can subvert com- puter security systems. The demand for a more robust computing environment has been rapidly increasing. However, we cannot expect a completely trustworthy security system for current com- puting environments. There are three major problems, which originate from the design deficiencies of operating systems widely used today. By taking advantage of these three problems, malware becomes more powerful. Malware can run in the same execution level as the security system. • A security system only has limited ways of dynamically detecting malicious behavior. • Processes have too much flexibility. • Recent malware often tries to compromise the attacked computer system, hide its pres- ence, and circumvent the security system. To implement this functionality, malware tampers with the kernel. With a tampered kernel, there is no security in the computer system. Kernel integrity is indispensable to a secure computer system. Hence, we need a solution to overcome the three operating system design problems that allow malware to compromise the computer system. These operating system design problems have long been recognized. However, the cur- rent operating system designs prioritize performance, compatibility, and portability over security. This trend will not likely change for the foreseeable

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    76 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us