A virtual machine security monitoring method and system based on introspection technology
Through the virtual machine security monitoring method based on introspection technology, the problem of difficulty in ensuring the security of virtual machines in a virtualized environment is solved, efficient and safe virtual machine monitoring is achieved, API function monitoring is dynamically adjusted, potential abnormal behaviors of virtual machines are discovered, and enhanced improve the security of the cloud environment.
Patent Information
- Application Number
- CN202110265368.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-11
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-03-11
AI Technical Summary
It is difficult to guarantee the security of virtual machines in a virtualized environment. Traditional security software can easily become the target of malware attacks, and malware poses a serious threat in cloud environments. Existing virtual machine introspection technology has monitoring modules deployed inside virtual machines that are vulnerable to attacks. question.
Adopting a virtual machine security monitoring method based on introspection technology, by establishing a behavior plug-in library and dynamic behavior interception analysis, it can realize fine-grained virtual machine physical address access behavior monitoring, dynamically adjust API function monitoring, and combine interrupt trapping and semantic analysis to provide efficient Malicious behavior detection and analysis.
It achieves efficient and safe monitoring of virtual machines, reduces the impact of the introspection mechanism on the operating efficiency of virtual machines, can dynamically adjust monitoring, discover potential abnormal behaviors of virtual machines, and enhances the security of the cloud environment.
Smart Images

Figure CN113127149B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of virtualization security monitoring, and in particular to a virtual machine security monitoring method and system based on introspection technology. Background Art
[0002] Virtualization technology can integrate the underlying physical computing resources into an operating environment, and logically abstract and unify the underlying computing resources. Virtualization technology is a key technology for cloud computing, and its security directly determines the security of user data in the entire cloud platform. At present, network attacks are diverse, the duration and number of attacks are increasing, and devices and applications are facing huge security threats. Compared with traditional environments, cloud computing brings huge economic benefits, which makes hackers from all countries see the benefits and turn to attacks on virtualized environments, resulting in serious security issues in virtualized environments.
[0003] Through virtualization technology, various types of virtual machines and software can be freely created and deleted by users, which brings great convenience to users, but also hides the security issues of the virtualization platform itself, such as how to ensure the security of virtual machines and control the network traffic of virtual machines. With the rapid development of the network and the increasing updating and opening of computer systems, such problems have become more and more complicated. If malicious attacks appear in the virtualization environment and maliciously hide sensitive processes, sensitive files or other malicious system call programs, it will directly cause the unreliability of cloud services, and the data in the cloud will be even more unsafe. Therefore, virtualization security is the cornerstone of cloud platform security. Among all types of attacks, malware is the biggest threat to cloud platforms. In traditional environments, host-based security software is usually at the same privilege level as malware. Security software can easily become the target of malware attacks. Once malware finds a vulnerability in security software, it will exploit the vulnerability to paralyze it, thereby directly obtaining the highest authority of the system in order to further engage in illegal activities. In a cloud environment, several virtual machines on the same physical server are not physically isolated. Once a virtual machine is compromised, it will pose a great threat to the entire cloud environment. The prevalence of malware and outdated security tools make the security situation of the cloud environment very complicated. Cloud environments require innovative security tools now more than ever.
[0004] Faced with such severe security issues, relevant scholars have put forward targeted suggestions such as isolating and segmenting virtual networks, introducing security software to protect virtualized environments, and using encryption technology and access control to manage communications. In terms of virtualization security, virtual machine introspection (VMl) is a good choice. It can monitor internal events of virtual machines, allowing users to see the operation of virtual machines more transparently, timely understand the dynamic information of virtual machines, and help users analyze and make decisions. The so-called virtual machine introspection (VMl) is to understand the internal state of the virtual machine by analyzing its internal system state (software and hardware) outside the virtual machine. Since the virtual machine manager has both the high "visibility" of the host-based intrusion detection framework and the good isolation of the network-based intrusion detection framework, virtual machine introspection uses the virtual machine manager (VMM) to monitor the virtual machine. To achieve virtual machine introspection, solving the "semantic gap" problem is a key. The so-called "semantic gap" refers to the difference between the information observed from the outside of the virtual machine and the actual situation inside the virtual machine. The virtual machine manager is usually an independent and trusted virtual machine. Since the virtual machine is independent of the monitored client, it has a good isolation effect. The virtual machine manager reads low-level semantic events such as memory pages, registers, interrupts, etc. within the virtual machine and restores them into high-level semantic objects that users can recognize, such as virtual machine processes, kernel modules, system calls, etc.
[0005] There are two main modes of virtual machine introspection (VMI): in-band and out-of-band. In the in-band mode, a monitoring module needs to be deployed inside the virtual machine to obtain detailed information about the state of the virtual machine. Since the monitoring module is deployed inside the virtual machine, this mode is more vulnerable to malicious attacks and is not a safe and effective security mode. The out-of-band mode does not require the deployment of a security agent inside the virtual machine, but it is highly dependent on the external semantics of the virtual machine operating system. Since this technology monitors the state of the virtual machine through the underlying hardware states that cannot be bypassed by attackers, such as virtual machine registers, interrupts, and memory pages, it has high security and is currently the most reliable VMI technology. Summary of the invention
[0006] The present invention realizes an efficient introspection mechanism, can monitor the virtual machine physical address access behavior in a fine-grained manner, minimizes the impact of the introspection mechanism on the virtual machine's operating efficiency, and adopts a dynamic behavior interception and analysis method, which can dynamically adjust the monitored API functions according to user needs, and also guarantees the virtual machine's operating efficiency from the side. According to system needs, two application methods are designed, one is the interception of abnormal pop-up windows of virtual machines, and the other is the establishment of a behavior plug-in library, both of which provide a good foundation for malicious behavior detection and analysis.
[0007] The technical solution adopted by the present invention is as follows:
[0008] A virtual machine security monitoring method based on introspection technology includes the following steps:
[0009] Establish a plug-in library for virtual machine behavior, in which API functions with similar functions are aggregated together as plug-ins;
[0010] Select the plug-in to be monitored from the plug-in library according to the monitoring instruction, and calculate the virtual address of the API function by reading the API function name and the relative offset address of the API function in the plug-in library;
[0011] Read the virtual address of the API function in the plug-in library, save the machine code stored at the virtual address, and then modify the machine code stored at the virtual address to the machine code of the interrupt instruction;
[0012] After the virtual machine accesses the modified virtual address and triggers an interrupt, the operation of the virtual machine is suspended, and semantic analysis of the virtual machine is performed to obtain the calling information of the API function;
[0013] After the semantic analysis is completed, the original machine code stored in the virtual address of the API function is written back to the virtual address, and the virtual machine is set to single-step execution and then the virtual machine execution is resumed.
[0014] Furthermore, the plug-in library classifies Windows API functions into host behaviors according to files, processes, networks, registries, shells, and drivers. Each behavior class is a plug-in, and each behavior class includes commonly used API function names in the class and relative offset addresses of library functions used to calculate virtual addresses.
[0015] Further, the plug-in to be monitored is selected from the plug-in library according to the monitoring instruction, and the virtual address of the API function is calculated by reading the API function name and the relative offset address of the API function in the plug-in library, including:
[0016] Receive the target virtual machine configuration and monitoring configuration messages, parse them and send them to the plug-in library for matching;
[0017] Match the plug-in through the plug-in library, and read the API function name and the relative offset address of this function in the target plug-in library in turn;
[0018] Add the base address of the dll library to the relative offset address of the API function to calculate the virtual address of this function;
[0019] The correspondence between the virtual address and the function name is stored in mapping table A.
[0020] Further, the reading of the virtual address of the API function in the plug-in library, saving the machine code stored in the virtual address, and then modifying the machine code stored in the virtual address into the machine code of the interrupt instruction includes:
[0021] Read the functions in the specified directory file, match them with the monitored functions in the current program, and determine whether the function needs to be dynamically added or dynamically reduced;
[0022] If it is a function that needs to be dynamically reduced, modify the virtual address content of the function to the previously saved machine code;
[0023] If it is a function that needs to be added dynamically, the virtual address stored in the plug-in library is read in sequence, the storage content of the virtual address is read, and a mapping relationship between the virtual address and the storage content is established; then the machine code originally stored in the virtual address is rewritten into the machine code of the interrupt instruction, and the virtual machine is waited for to access the virtual address to trigger an interrupt trap.
[0024] Furthermore, the semantic parsing of the virtual machine to obtain the calling information of the API function includes:
[0025] Call libvmi library function to read memory value according to the value of CPU register RCX and RDX;
[0026] Use the memory value and the symbol offset table to restore the process name, process ID, and function parameters of the API function.
[0027] Furthermore, after the virtual machine single-steps the instruction, it falls into the virtual machine manager layer. At this time, the single-step execution of the virtual machine is canceled, and the virtual address content is restored to the interrupt instruction, waiting for the next trigger.
[0028] Furthermore, the plug-in library is used to intercept abnormal pop-up windows of the virtual machine, and by intercepting the pop-up window API and analyzing the pop-up window content, it is known whether the virtual machine has ever had an anti-virus software warning prompt.
[0029] A virtual machine security monitoring system based on introspection technology using the above method comprises:
[0030] The plug-in library module is used to establish a plug-in library for virtual machine behavior. The API functions with similar functions in the plug-in library are grouped together as plug-ins. The plug-in to be monitored is selected from the plug-in library according to the monitoring instruction, and the virtual address of the API function is calculated by reading the API function name and the relative offset address of the API function in the plug-in library.
[0031] The interrupt setting module is used to read the virtual address of the API function in the plug-in library, save the machine code stored in the virtual address, and then modify the machine code stored in the virtual address to the machine code of the interrupt instruction;
[0032] A semantic analysis module, used for performing semantic analysis on the virtual machine to obtain the calling information of the API function after the virtual machine accesses the modified virtual address and triggers an interrupt;
[0033] The interrupt recovery module is used to write the original machine code stored in the virtual address of the API function back to the virtual address after the semantic analysis is completed, set the virtual machine to single-step execution, and then resume the execution of the virtual machine.
[0034] The present invention discloses a virtual machine security monitoring system based on introspection technology. The system dynamically receives the user's detection requirements for host behavior, calls the corresponding behavior plug-in library, and performs high-performance, high-precision, and high-coverage behavior monitoring on the virtual machine. Compared with the disclosed methods, the system has the following advantages:
[0035] 1) Fine-grained and efficient introspection mechanism, which monitors virtual machine API calls down to the instruction level. Introspection traps are triggered only when the API is called, thus minimizing the impact of the introspection mechanism on the operating efficiency of the virtual machine.
[0036] 2) Dynamically intercept host behavior, dynamically add API functions to be monitored and dynamically delete monitored API functions according to different stages of virtual machine operation and user needs, to ensure the efficiency of monitoring data;
[0037] 3) By monitoring the pop-up behavior of Windows virtual machines and analyzing the pop-up content, it is possible to discover potential abnormal behavior of virtual machines out of band, know whether the virtual machine has ever had antivirus software warning prompts, and perform auxiliary analysis for intrusion detection;
[0038] 4) A virtual machine behavior plug-in library has been established, which classifies the API provided by Windows according to file, process, network, registry and other operations, which can fully cover a certain type of host behavior and provide users with accurate monitoring information. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 .An architecture diagram of a virtual machine security monitoring system based on introspection technology.
[0040] Figure 2 .Plugin library matching flowchart.
[0041] Figure 3 .Interrupt into the flowchart.
[0042] Figure 4 .Interrupt recovery flow chart.
[0043] Figure 5 .Semantic parsing flowchart. DETAILED DESCRIPTION
[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below through specific embodiments and drawings.
[0045] The present invention mainly includes the following contents:
[0046] (1) Fine-grained and efficient introspection mechanism. The present invention can set an interrupt trap to the physical address of the virtual machine API, so that the virtual machine is trapped in the VMM layer when calling the API, reaching the VMM layer trap at the instruction level, thereby minimizing the impact of the introspection mechanism on the original operating efficiency of the virtual machine.
[0047] (2) Dynamic interception and analysis of host behavior. The present invention can dynamically adjust the API of the monitored virtual machine as needed, dynamically add the API functions that need to be monitored, and dynamically delete the monitored API functions according to the different stages of the virtual machine operation and user needs, thereby ensuring the high efficiency of the monitoring data.
[0048] (3) Interception of abnormal pop-up windows of virtual machines. The present invention can monitor Windows pop-up windows. Generally, some malicious intrusion behaviors will trigger anti-virus software alarm pop-up windows. By intercepting the pop-up window API and analyzing the pop-up window content, the system can know whether the virtual machine has ever had an anti-virus software alarm prompt, which is an auxiliary evidence analysis for intrusion detection.
[0049] (4) Establishment of a behavior plug-in library. The present invention establishes a virtual machine behavior plug-in library, and classifies the API provided by Windows according to operations such as files, processes, networks, and registry. When a virtual machine needs to monitor certain host behaviors, the plug-in of this class in the plug-in library is directly called to complete the monitoring of the virtual machine host behavior.
[0050] The invention discloses a virtual machine security monitoring system based on introspection technology. Figure 1As shown, it is mainly composed of a plug-in library module, an interrupt setting module, an interrupt recovery module, and a semantic parsing module. The plug-in library module and the semantic parsing module are upper-layer applications, and the interrupt setting and interrupt recovery modules interact with the VMM through the ioctl channel. The plug-in library module classifies the host behavior of Windows API functions according to files, processes, networks, registry, shells, and drivers. A class of API functions with similar functions are aggregated together to form a plug-in, that is, each behavior class is a plug-in, and each behavior class covers the commonly used API function names in the category and the relative offset addresses of the library functions used to calculate the virtual address. The virtual machine abnormal pop-up window in the present invention is intercepted as a malicious pop-up window plug-in in the plug-in library. The main method is to monitor the windows API function DrawTextExW. When the monitored windows virtual machine has a pop-up window behavior, it will fall into the semantic parsing module. The semantic parsing module analyzes whether it is an antivirus software pop-up window by parsing the content of the second parameter (pop-up window title text) of this function. The interrupt setting module is mainly responsible for setting the interrupt according to the calculated API address; the interrupt recovery module is mainly responsible for performing virtual machine interrupt recovery operations and single-step execution operations when the virtual machine is trapped in an interrupt; the semantic parsing module uniformly analyzes the CPU register values and memory status of the interrupt trapped virtual machine, and parses out information such as the process and parameters of the current API call.
[0051] The specific steps of the above system operation are as follows:
[0052] (1) After the system is turned on, it will select the plug-in to be monitored from the plug-in library module according to the monitoring instructions issued, calculate the virtual address of the function by reading the API function name and the relative offset address of the function in the plug-in library module, and establish a mapping table (Table A) that is, the correspondence between the virtual address and the API function name and save it.
[0053] (2) The interrupt setting module reads the virtual address saved in the plug-in library module (Table A), first reads the machine code in the memory of the virtual address and saves it in the mapping table (Table B), then rewrites the machine code of the virtual address to the machine code of the interrupt instruction (0xCC), and waits for the virtual machine to access the address to trigger an interrupt.
[0054] (3) When the modified address triggers an access operation, the virtual machine is suspended, and the semantic parsing module restores the process information, function information, etc. of the current call based on the memory pages, registers, symbol offsets, etc. within the virtual machine.
[0055] (4) After the interrupt recovery module waits for the semantic parsing module to complete the parsing, it writes the value of the address previously saved by the interrupt setting module in table B into the interrupt address, sets the virtual machine to single-step execution, and then resumes the execution of the virtual machine.
[0056] Figure 2 A plug-in library matching flow chart of an embodiment of the present invention is provided, and the specific implementation steps of the plug-in library module are as follows:
[0057] (1) Receive the target virtual machine configuration and monitoring configuration messages, parse them and send them to the plug-in library for matching;
[0058] (2) Match the marked plug-in and read the API function name and the relative offset address of this function in the target plug-in library in sequence;
[0059] (3) Add the base address of the dll library to the relative offset address of the above function to calculate the virtual address of this function;
[0060] (4) The corresponding relationship between the virtual address and the function name is stored in Table A and the process ends.
[0061] Figure 3 A flowchart of interrupt setting according to an embodiment of the present invention is provided. The specific implementation steps of the interrupt setting module are as follows:
[0062] (1) Read the functions in the specified directory file, match them with the monitored functions in the current program, and determine whether the function needs to be dynamically added or reduced;
[0063] (2) If it is a function that needs to be dynamically reduced, modify the virtual address content of the function to the previously saved machine code;
[0064] (3) If it is a function that needs to be added dynamically, the virtual address stored in the plug-in library is read in sequence, the storage content of the virtual address is read, and a mapping relationship between the virtual address and the storage content is established (Table B); then the machine code originally stored in the virtual address is rewritten into the machine code of the interrupt instruction (0xcc), and the virtual machine is waited for to access the virtual address to trigger an interrupt trap.
[0065] Figure 4 An interrupt recovery flow chart of an embodiment of the present invention is provided, and the specific implementation steps of the interrupt recovery module are as follows:
[0066] (1) When an interrupt is triggered, the VM will fall into the VMM layer, obtain the virtual address that triggered the interrupt, and suspend the execution of the virtual machine;
[0067] (2) Save the current virtual machine CPU register value and call the semantic parsing module to perform semantic parsing processing;
[0068] (3) After the semantic parsing module completes the processing, the virtual address is matched according to the previously established mapping relationship between the virtual address and the storage content (Table B), the machine code originally stored in the memory of the virtual address (the content stored before the interrupt is set) is obtained, the value is written back to the virtual address, and the virtual machine operation mode is set to single-step operation;
[0069] (4) After the virtual machine single-steps and executes the instruction, it still falls into the VMM layer. At this time, the single-step execution of the virtual machine is canceled, and the virtual address content is restored to the interrupt instruction, waiting for the next trigger.
[0070] Figure 5 A semantic parsing flow chart of an embodiment of the present invention is given, and the specific implementation steps of the semantic parsing module are as follows:
[0071] (1) Call the libvmi library function to read the memory value according to the values of the CPU registers RCX and RDX;
[0072] (2) Use the memory value and the symbol offset table to restore the process name, process ID, and function parameters that call this function; the symbol offset refers to the size of the space occupied by each parameter (structure) in the memory or the offset relative to the base address of the structure. The symbol offset table can be established by downloading the symbol file published on the Microsoft official website;
[0073] (3) After completing the call information restoration, return to the interrupt recovery module to continue execution.
[0074] The following is a piece of data obtained by running this solution, which is in json format. The type field indicates the type of this API, user is a user-level function, the TimeStamp field indicates the timestamp of this API call, the ProcessName field indicates the process name, the TID field indicates the thread ID, PID indicates the process ID, PPID indicates the parent process ID, Module indicates the module to which it belongs, Method indicates the name of this API, and Args indicates the name and value of each parameter.
[0075]
[0076]
[0077] Based on the same inventive concept, another embodiment of the present invention provides a virtual machine security monitoring system based on introspection technology using the above method, which includes:
[0078] The plug-in library module is used to establish a plug-in library for virtual machine behavior. The API functions with similar functions in the plug-in library are grouped together as plug-ins. The plug-in to be monitored is selected from the plug-in library according to the monitoring instruction, and the virtual address of the API function is calculated by reading the API function name and the relative offset address of the API function in the plug-in library.
[0079] The interrupt setting module is used to read the virtual address of the API function in the plug-in library, save the machine code stored in the virtual address, and then modify the machine code stored in the virtual address to the machine code of the interrupt instruction;
[0080] A semantic analysis module, used for performing semantic analysis on the virtual machine to obtain the calling information of the API function after the virtual machine accesses the modified virtual address and triggers an interrupt;
[0081] The interrupt recovery module is used to write the original machine code stored in the virtual address of the API function back to the virtual address after the semantic analysis is completed, set the virtual machine to single-step execution, and then resume the execution of the virtual machine.
[0082] Based on the same inventive concept, another embodiment of the present invention provides an electronic device (computer, server, smart phone, etc.), which includes a memory and a processor, the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program includes instructions for executing each step in the method of the present invention.
[0083] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium (such as ROM / RAM, disk, CD), which stores a computer program. When the computer program is executed by a computer, it implements the various steps of the method of the present invention.
[0084] The specific embodiments of the present invention disclosed above are intended to help understand the content of the present invention and implement it accordingly. It can be understood by those skilled in the art that various replacements, changes and modifications are possible without departing from the spirit and scope of the present invention. The present invention should not be limited to the contents disclosed in the embodiments of this specification, and the scope of protection of the present invention shall be subject to the scope defined in the claims.
Claims
1. A virtual machine security monitoring method based on introspection technology, It is characterized in that The following steps are involved: Establish a plug-in library for virtual machine behavior, in which API functions with similar functions are aggregated together as plug-ins; Select the plug-in to be monitored from the plug-in library according to the monitoring instruction, and calculate the virtual address of the API function by reading the API function name and the relative offset address of the API function in the plug-in library; Read the virtual address of the API function in the plug-in library, save the machine code stored at the virtual address, and then modify the machine code stored at the virtual address to the machine code of the interrupt instruction; After the virtual machine accesses the modified virtual address and triggers an interrupt, the operation of the virtual machine is suspended, and semantic analysis of the virtual machine is performed to obtain the calling information of the API function; After the semantic analysis is completed, the original machine code stored in the virtual address of the API function is written back to the virtual address, and the virtual machine is set to single-step execution and then resumed. The method comprises: selecting a plug-in to be monitored from the plug-in library according to the monitoring instruction, and calculating the virtual address of the API function by reading the API function name and the relative offset address of the API function in the plug-in library, including: Receive the target virtual machine configuration and monitoring configuration messages, parse them and send them to the plug-in library for matching; Match the plug-in through the plug-in library, and read the API function name and the relative offset address of this function in the target plug-in library in turn; Add the base address of the dll library to the relative offset address of the API function to calculate the virtual address of this function; The correspondence between the virtual address and the function name is stored in mapping table A.
2. The method according to claim 1, It is characterized in that The plug-in library classifies Windows API functions into host behaviors according to files, processes, networks, registries, shells, and drivers. Each behavior class is a plug-in, and each behavior class includes the commonly used API function names in the class and the relative offset addresses of library functions used to calculate virtual addresses.
3. The method according to claim 1, It is characterized in that The method of reading the virtual address of the API function in the plug-in library, saving the machine code stored in the virtual address, and then modifying the machine code stored in the virtual address into the machine code of the interrupt instruction includes: Read the functions in the specified directory file, match them with the monitored functions in the current program, and determine whether the function needs to be dynamically added or dynamically reduced; If it is a function that needs to be dynamically reduced, modify the virtual address content of the function to the previously saved machine code; If it is a function that needs to be added dynamically, the virtual address stored in the plug-in library is read in sequence, the storage content of the virtual address is read, and a mapping relationship between the virtual address and the storage content is established; then the machine code originally stored in the virtual address is rewritten into the machine code of the interrupt instruction, and the virtual machine is waited for to access the virtual address to trigger an interrupt trap.
4. The method according to claim 1, It is characterized in that The semantic parsing of the virtual machine to obtain the calling information of the API function includes: Call libvmi library function to read memory value according to the value of CPU register RCX and RDX; Use the memory value and the symbol offset table to restore the process name, process ID, and function parameters of the API function.
5. The method according to claim 1, It is characterized in that After the virtual machine single-steps and executes the instruction, it falls into the virtual machine manager layer. At this time, the single-step execution of the virtual machine is canceled, and the virtual address content is restored to the interrupt instruction, waiting for the next trigger.
6. The method according to claim 1, It is characterized in that The plug-in library is used to intercept abnormal pop-up windows of virtual machines. By intercepting the pop-up window API and analyzing the pop-up window content, it is known whether the virtual machine has ever had an antivirus software warning prompt.
7. A virtual machine security monitoring system based on introspection technology using the method of any one of claims 1 to 6, It is characterized in that include: The plug-in library module is used to establish a plug-in library for virtual machine behaviors. API functions with similar functions in the plug-in library are aggregated together as plug-ins. Select the plug-in to be monitored from the plug-in library according to the monitoring instruction, and calculate the virtual address of the API function by reading the API function name and the relative offset address of the API function in the plug-in library; The interrupt setting module is used to read the virtual address of the API function in the plug-in library, save the machine code stored in the virtual address, and then modify the machine code stored in the virtual address to the machine code of the interrupt instruction; A semantic analysis module, used for performing semantic analysis on the virtual machine to obtain the calling information of the API function after the virtual machine accesses the modified virtual address and triggers an interrupt; The interrupt recovery module is used to write the original machine code stored in the virtual address of the API function back to the virtual address after the semantic analysis is completed, set the virtual machine to single-step execution, and then resume the execution of the virtual machine.
8. An electronic device, It is characterized in that The invention comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the method according to any one of claims 1 to 6 is implemented.
