Hypervisor Breakpoints Using Execute-Only Pages
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The limitations of software breakpoints, such as code modification and limited availability, and the constraints of hardware breakpoints, like the number of breakpoints that can be set, hinder effective debugging, especially in scenarios like debugging malware and memory-intensive applications within virtual machines.
Innovation Solution
The implementation of nested page tables and hypervisor breakpoints, which allow for flexible and unlimited breakpoints by using execute-only pages, enabling interception of memory access attempts and insertion of breakpoint instructions without altering the guest program's behavior.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If software breakpoints are used to debug programs, then breakpoints can be set in code locations, but the code is modified which may alter program behavior and limits debugging of read-only memory
Solution Approach 1:
The patent divides memory into pages and uses execute-only page permissions to separate code execution from modification. By marking pages as execute-only, the system allows breakpoints without modifying the actual code bytes, thus maintaining program integrity while enabling debugging flexibility.
Solution Approach 2:
The patent introduces an intermediary mechanism (execute-only page permissions) between the debugger and the program code. This intermediary allows the debugger to intercept execution without directly modifying the program's readable code, preventing behavior alteration while maintaining breakpoint functionality.
2Reliability
If hardware breakpoints are used to avoid code modification, then program behavior integrity is maintained, but the number of breakpoints is limited
Solution Approach 1:
The patent makes execute-only pages serve multiple functions: they both protect code integrity (like hardware breakpoints) and provide unlimited breakpoint locations (overcoming the hardware limitation). Any memory page can be marked execute-only to create a breakpoint, providing universal applicability across the entire address space.
3Ease of operation
If traditional debugging methods are used in virtual machines, then debugging functionality is provided, but performance penalties increase and malware detection is limited
Solution Approach 1:
The patent enables the virtual machine to self-monitor its own execution through execute-only page permissions. The VM can detect unauthorized modifications or debugging attempts by checking page permissions, reducing the need for external debugging overhead and improving performance.
Data Source
AI summary
Methods and systems allow the use of hypervisors to use software breakpoints in the same manner as hardware breakpoints. A program to be tested is executed by a hypervisor running a virtual machine. A memory page containing the location of a breakpoint is copied to a temporary memory page. Then a new page is written containing breakpoint instructions at specified memory locations. The new page is tagged as execute only, so the program to be tested is unaware of any changes to the program. If the program attempts to read from the changed memory page, it will read from the temporary memory page instead. Such a method can be used to search websites for malware in relative safety because of the inability of the malware to write to memory locations that are located on a page that is execute only.


