A detection method and system for anti-virtualization malicious programs
By modifying and hiding virtualization features in the virtual environment, combined with static and dynamic detection, simulating the human-in-the-loop business environment, the problem of anti-virtualization malicious programs avoiding detection is solved, and effective identification and detection of anti-virtualization malicious programs are achieved. defense, improving the detection success rate.
Patent Information
- Application Number
- CN202311506527.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-11-13
AI Technical Summary
Existing technologies are difficult to effectively identify and defend against anti-virtualization malicious programs, especially in virtualized environments. Advanced viruses avoid detection by hiding virtualization features and simulating manual operations, improving concealment and posing challenges to virus detection and protection. .
By modifying and hiding virtualization features in the virtual environment, conducting multiple behavioral data analyses, combining static and dynamic detection, and using disassembly technology and human-in-the-loop business environment simulation, we can identify and defend against anti-virtualization malicious programs.
Effectively identify and defend against anti-virtualization malicious programs, improve the detection success rate, avoid behavioral analysis of advanced viruses bypassing automatic detection, and take into account the efficiency of static detection and the comprehensiveness of dynamic detection.
Smart Images

Figure CN117540381B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cyberspace security technology, and in particular to a detection method and system for anti-virtualization malicious programs. Background Art
[0002] At present, mainstream antivirus software can effectively fight most computer viruses by matching virus signatures to identify suspicious files. To avoid detection, illegal hackers constantly modify the signatures of malicious programs to hide program features and break through the defense of protection software. In response to the iterative evolution of viruses, active defense technology based on autonomous analysis and judgment of program behavior has emerged. Starting from the origin of the virus, the behavior of the program is used as the basis for judging the virus, achieving better protection effects. However, there are fuzzy boundaries between whether some program behaviors are legal or not, and users need to use professional knowledge to make real-time judgments, which is not only labor-intensive and inefficient, but also places high demands on the user's professional level.
[0003] As virtual cloud technology develops, network security personnel are increasingly using virtual environments to test and evaluate malicious programs. In order to avoid analysis and detection of virtual environments, illegal hackers embed anti-virtualization fields to detect the running environment of malicious programs, and automatically stop running in virtual environments to reduce the exposure of vulnerabilities; with the launch of large-scale cloud applications, the attack value of virtualized environments has risen sharply, and some advanced viruses have added the functions of detecting virtual applications and human participation, which has greatly improved their concealment and brought new challenges to virus detection and virus protection. Summary of the invention
[0004] In view of this, the present invention provides a detection method and detection system that can modify and hide the characteristics of a virtualized test environment, avoid detection methods of some advanced malicious programs on the virtualized operating environment, and can effectively identify, detect, and defend against anti-virtualized malicious programs.
[0005] According to a first aspect, the present invention provides a detection method for anti-virtualization malicious programs, comprising the following steps:
[0006] Obtain the file format and required operating environment of the program to be tested;
[0007] Build and deploy a virtual environment based on the file format of the program to be tested and the required operating environment;
[0008] Execute the program under test for the first time in the virtual environment, and obtain the first behavior data of the network layer, the system layer and the application layer when the program under test is executed;
[0009] Analyze the first behavior data according to preset malicious behavior rules to determine whether the program to be tested has malicious behavior;
[0010] When the program under test has malicious behavior, analyze the malicious behavior and generate an analysis report;
[0011] When the program under test does not have malicious behavior, the program under test is executed for the second time in the virtual environment after the virtualization feature is hidden, and the second behavior data of the network layer, the system layer and the application layer when the program under test is executed is obtained;
[0012] The second behavior data is analyzed according to preset malicious behavior rules.
[0013] As an optional implementation of the present invention, hiding the virtualization feature refers to modifying the registry, process, file and command line in the virtual environment to hide the virtualization feature therein.
[0014] As an optional implementation of the present invention, the step of analyzing the second behavior data according to the preset malicious behavior rule specifically includes the following steps:
[0015] Analyze the second behavior data according to preset malicious behavior rules to determine whether the program under test has malicious behavior;
[0016] When the program under test has malicious behavior, analyze the malicious behavior and generate an analysis report;
[0017] When the program under test does not have malicious behavior, the program under test is executed for the third time in a virtual environment with virtualization features hidden and a simulated human behind the loop, and the third behavior data of the network layer, system layer and application layer when the program under test is executed is obtained;
[0018] The third behavior data is analyzed according to preset malicious behavior rules.
[0019] As an optional implementation method of the present invention, simulating a human in the loop refers to deploying a set of internal forum-style websites in a virtual environment, and performing indefinite periodic simulation operations based on pseudo-random numbers, imitating users to perform browsing, reading, writing, uploading, downloading and other operations at different time intervals.
[0020] As an optional implementation of the present invention, before the step of obtaining the file format and operating environment of the program to be tested, the following steps are also included:
[0021] Use disassembly technology to detect the program under test and determine whether the program under test is packed or obfuscated;
[0022] When the program under test is neither packed nor obfuscated, the program under test is determined to be a harmless program and an analysis report is generated;
[0023] According to the preset virtualization detection rules, check whether there are keywords matching the virtualization detection rules in the program to be tested;
[0024] When the program under test is neither packed nor obfuscated, the program under test is determined to be a harmless program and an analysis report is generated;
[0025] When the program to be tested contains keywords that match the virtualization detection rules, the program to be tested is determined to be a malicious program and an analysis report is generated;
[0026] When there are no keywords matching the virtualization detection rules in the program to be tested, but there is a shell or obfuscation, the step of obtaining the file format and operating environment of the program to be tested is performed.
[0027] According to a second aspect, an embodiment of the present invention provides a detection system for anti-virtualization malicious programs, including:
[0028] Static analysis module, used to analyze the file format and required operating environment of the program to be tested;
[0029] An environment construction module, connected to the static analysis module and the detection control module, is used to construct a virtual environment according to the file format of the program to be tested and the required operating environment sent by the static analysis module upon receiving a construction instruction from the detection control module;
[0030] The environment deployment module is connected to the detection control module and is used to install the business software and office software required for the operation of the virtual environment;
[0031] A feature hiding module, connected to the control module, for hiding the virtualization features of the virtual environment upon receiving a hiding instruction from the detection control module;
[0032] The malicious behavior tracking module is used to obtain the behavior data of the program under test during its execution according to the behaviors of the network layer, system layer and application layer of the program under test;
[0033] Malicious behavior analysis module, used to analyze behavior data and determine whether the program under test has malicious behavior based on preset malicious behavior rules;
[0034] The detection control module is used to upload the program to be tested to the virtual environment after the virtual environment deployment is completed, and to control the operation of the virtual environment and the first execution of the program to be tested; it is also used to send hiding instructions to the feature hiding module when the behavior data after the first execution of the program to be tested is judged to contain no malicious behavior, and to control the second execution of the program to be tested after the feature hiding module completes the virtualization feature hiding.
[0035] As an optional implementation of the present invention, the detection system for anti-virtualization malicious programs also includes:
[0036] A simulation module, connected to the detection control module, is used to deploy a virtualized business environment of a simulated human in the loop in the virtual environment upon receiving a simulation instruction from the detection control module, and monitor the operating status of the virtualized business environment;
[0037] The detection control module is also used to send simulation instructions to the simulation module when the behavior data after the second execution of the program under test is judged to contain no malicious behavior, and control the program under test to start the third execution after the simulation module completes the operation of the deployed virtualized business environment.
[0038] As an optional implementation method of the present invention, the simulation module may deploy multiple virtualized business environments. The simulation module is also used to forcibly destroy a failed virtualized business environment and call another virtualized business environment to replace it when a virtualized business environment fails during operation.
[0039] As an optional implementation method of the present invention, the simulation module uses the framework of JAVA+SpringBoot+VUE+MySQL+Redis to build a forum, and uses the framework of Selenium+Yaml+Xpath+Sleep+Python to build a user operation simulation part, so as to perform indefinite periodic simulation operations based on pseudo-random numbers, imitating users to perform browsing, reading, writing, uploading, downloading and other operations at different time intervals.
[0040] As an optional implementation of the present invention, the static analysis module is also used to use disassembly technology to detect whether the program to be tested is packed or obfuscated, and when the program to be tested is neither packed nor obfuscated, an analysis report is generated that the program to be tested is a harmless program; the static analysis module is also used to check whether there are keywords matching the virtualization detection rules in the program to be tested, and when the program to be tested has keywords matching the virtualization detection rules, an analysis report is generated that the program to be tested is a malicious program;
[0041] The detection control module is used to send a build instruction to the environment construction module when the program under test does not have keywords matching the virtualization detection rules but is packed or obfuscated.
[0042] The technical solution provided by the present invention has the following advantages:
[0043] 1. The detection method for anti-virtualization malicious programs provided by the present invention hides the virtualization features of the virtual environment (such as processes, files, drivers, registry, etc. of the virtual environment) by modifying (such as by filling in random number sequences and character strings) the virtualization features of the virtual environment (such as the processes, files, drivers, registry, etc. of the virtual environment) (the feature hiding occurs before the virtual environment is loaded and does not affect the virtualization files), and performs secondary execution and malicious behavior judgment on the tested program, which can prevent some advanced malicious programs from bypassing the behavior analysis of the automatic detection and analysis system, and effectively identify, detect, and defend against anti-virtualization malicious programs.
[0044] 2. The detection method for anti-virtualization malicious programs provided by the present invention performs business authenticity detection on the virtualized environment based on some advanced malicious programs, such as whether it undertakes actual business, whether there is valuable traffic, whether it is manually operated, and other factors; the present invention effectively avoids the identification of the virtualized environment by advanced malicious programs by simulating the human-in-the-loop actions in the virtual environment, thereby improving the success rate of detecting anti-virtualization programs.
[0045] 3. The detection method for anti-virtualization malicious programs provided by the present invention first performs static detection on the program to be tested before performing dynamic detection on the program to be tested to determine whether it is obfuscated, packed, or performs virtualization detection keyword retrieval, taking into account the advantages of efficient static detection and comprehensive dynamic detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A method flow chart of a detection method for anti-virtualization malicious programs provided in Embodiment 1 of the present invention;
[0048] Figure 2 A method flow chart of another method for detecting anti-virtualization malicious programs provided in Embodiment 1 of the present invention;
[0049] Figure 3 A schematic diagram of a human-in-the-loop simulated service environment framework provided in Embodiment 1 of the present invention;
[0050] Figure 4 A method flow chart of another method for detecting anti-virtualization malicious programs provided in Embodiment 1 of the present invention;
[0051] Figure 5A schematic diagram of the structure of a detection system for anti-virtualization malicious programs provided in Embodiment 2 of the present invention;
[0052] Figure 6 A schematic diagram of the structure of another detection system for anti-virtualization malicious programs provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0054] In the description of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0055] Example 1
[0056] Figure 1 A flow chart of a method for detecting anti-virtualization malicious programs in an embodiment of the present invention is shown. Specifically, Figure 1 As shown, the method may include the following steps:
[0057] S101: Obtain the file format and required operating environment of the program to be tested.
[0058] Specifically, for file-type programs with extensions, such as xxx.doc, xxx.pdf, etc., their format information can be obtained through the name; for files without extensions, their signature information can be obtained through the hexadecimal data segment characteristics, and then judged, such as ELF files have "0x5A4D" in the DOS header, JPG files have "0xD8FF" in the header file, etc. For common files without extensions, the type feature code library can be preset and matched with the required environment for their operation. Based on this, the file format and required operating environment of the program to be tested can be realized.
[0059] S102: Construct and deploy a virtual environment according to the file format of the program to be tested and the required operating environment.
[0060] Corresponding environment construction modules and environment deployment modules can be set in the system for implementing the method in this embodiment. Specifically, the environment construction module is responsible for two functions: one is to manage the basic image library covering common operating systems, and can add new system images according to usage requirements; the second is to be responsible for building virtual environment templates and corresponding environments, and fill in the template with the information such as the operating system, computing resources, business software, and database type required for the environment to run in the form of copywriting + topology diagram, generate a customized environment construction template, and complete the construction of the environment. Specifically, the environment deployment module relies on existing image resources, installs the required business software, office software, etc. according to the template information, and uploads the program to be tested to the specified virtual machine, waiting for the test instructions of the detection control module. For example, when the program to be tested is a word document, the office program is installed in the detection environment, and when the program to be tested is a pcap file, the wireshark program is installed.
[0061] S103: Execute the program to be tested for the first time in the virtual environment, and obtain first behavior data of the network layer, the system layer, and the application layer when the program to be tested is executed.
[0062] In specific implementation, based on the dump file, the behaviors of the program's network layer, system layer, and application layer can be tracked from two time points before and after the execution of the program to be tested, and the behavioral elements can be abstracted into the form of "five-tuple" for description; then, the behavioral data at different times can be compared, and the behavioral data during the execution of the program to be tested can be filtered out to reduce the workload of judging malicious behaviors.
[0063] For example, the following five-tuple can be used to describe the behavior:
[0064] <Type、Timestamp、Proc_ID、Action、Information>
[0065] Among them, Type includes: File (file behavior), Reg (registry behavior), Network (network behavior), Proc (process behavior), Other (other behavior); Timestamp is the timestamp of the action; Proc_ID is the process ID; Action is the execution action, including: Open, Read, Write, Delete, Rename, Download, Install; Information records the specific object of the action execution, including file path, registry key, process name, remote connection IP address and local port number and other information.
[0066] S104: Analyze the first behavior data according to preset malicious behavior rules to determine whether the program to be tested has malicious behavior.
[0067] Specifically, when the program to be tested has malicious behavior, the following step S105 is executed; when the program to be tested has no malicious behavior, the following step S106 is executed.
[0068] In the specific implementation, by identifying and parsing the abstract "five-tuple" data, we analyze whether privilege escalation, abnormal execution, abnormal access, abnormal detection and other operations have occurred during the execution of the program to be tested from five aspects: file operations, registry changes, network actions, process changes and other behaviors.
[0069] In the specific implementation, in terms of the network layer, the network connection records and network data packet sending records are mainly extracted, and the data packet records are obtained by capturing traffic packets at the gateway, filtering network data, and obtaining socket behavior and connection behavior. From the socket behavior, we can get information about which remote services the system has enabled, and from the connection behavior, we can get information about which remote addresses the system has established connections with.
[0070] In the specific implementation, at the system level, different systems have different focuses. The Windows operating system focuses on whether the registry has been tampered with, whether the directory files have changed, and other information. For example, the Microsoft\Windos\CurrentVersion\Run registry controls the system's startup items, and it is necessary to check whether other programs have been added to the startup items. The Linux operating system mainly focuses on the ~ / .* files and file information under the / etc / directory, such as the system environment variables under / etc / profile, the host name of / etc / hosts, and the system user database file of / etc / passwd. Whether other important system files have been tampered with. By comparing the differences in the above files in the dump files under different states, the modification actions of the program under test on the operating system layer are obtained.
[0071] In the specific implementation, the application layer focuses on the process information. The process structure contains a bidirectional linked list of ActiveProcessLinks, in which Flink points to the next process and Blink points to the previous process. By searching the bidirectional linked list of the process in the parsed dump file, we can obtain information including process offset, process name, process ID, process parent ID, number of threads, number of handles, session ID, and start time. Based on this information, we generate a process tree to show the parent-child relationship in the process, which is convenient for subsequent malicious behavior analysis.
[0072] In specific implementation, preset malicious behavior rules can be formulated based on the unauthorized and destructive nature of malicious behavior, as well as the main manifestations of unauthorized access or tampering of system resources. For example, the preset malicious behavior determination rules can be shown in Table 1. Once the behavior data in the execution process of the program to be tested contains the behavior in Table 1 below, the file to be tested is determined to be a malicious program:
[0073] Table 1 Malicious behavior determination rules
[0074]
[0075]
[0076] S105: Analyze the malicious behavior and generate an analysis report.
[0077] S106: executing the program to be tested for the second time in the virtual environment after hiding the virtualization feature, and obtaining second behavior data of the network layer, the system layer and the application layer when the program to be tested is executed.
[0078] Specifically, the virtualization features in the virtual environment can be hidden by modifying the registry, processes, files, and command lines in the virtual environment.
[0079] Exemplarily, the following six means may be used to hide virtualization features:
[0080] (1) Modify the registry key value containing virtualization features;
[0081] (2) Rename the registry key name containing virtualization features;
[0082] (3) Stop the virtualization feature process;
[0083] (4) Delete the virtualization driver file;
[0084] (5) Delete or rename files containing virtualization features in the system directory;
[0085] (5) Disguised command line. When the program under test uses the command line to execute commands, the system first executes the command in the background. When the returned information contains virtualization environment information, a disguised command line result is returned.
[0086] In specific implementation, a character string can be randomly generated from the range of az, 0-9, and when the above modification requires modification of the environment characteristic value, the random number sequence is filled in. It should be noted that changes to the driver files and processes will not affect the stability of the virtualization environment; the above file modifications all occur on the disk, and before the modification, the virtualization environment has been loaded into the memory. The above modification will not affect the virtualization files in the memory, and is only used to deceive the virtualization detection of malicious programs.
[0087] S107: Analyze the second behavior data according to preset malicious behavior rules.
[0088] The specific implementation of this step can be understood by referring to the content of the above step S104, which will not be repeated here.
[0089] Based on the inventor's discovery that the anti-virtualization malicious program will perform authenticity detection on the environment in which it is located in order to identify whether the virtualized environment is a test environment or an actual business environment, therefore, in order to improve the detection success rate of the anti-virtualization malicious program detection method in this embodiment, as Figure 2 As shown, as an optional specific implementation of the detection method for anti-virtualization malicious programs in this embodiment, the above step S107 may specifically include the following steps:
[0090] S701: Analyze the second behavior data according to preset malicious behavior rules to determine whether the program to be tested has malicious behavior.
[0091] Specifically, when the program to be tested has malicious behavior, the following step S702 is executed; when the program to be tested has no malicious behavior, the following steps S703 and S704 are executed.
[0092] S702: Analyze malicious behavior and generate an analysis report.
[0093] S703: Execute the program under test for the third time in a virtual environment with the virtualization feature hidden and the simulator simulated behind the loop, and obtain third behavior data of the network layer, the system layer and the application layer when the program under test is executed.
[0094] In specific implementation, a set of internal forum-style websites can be deployed in a virtual environment, and indefinite periodic simulation operations based on pseudo-random numbers can be performed to imitate users performing browsing, reading, writing, uploading, downloading and other operations at different time intervals, thereby realizing human-in-the-loop simulation.
[0095] When implementing it, Figure 3As shown, a set of internal forum-style websites can be deployed in a virtualized detection environment. The forum is built using the JAVA+SpringBoot+VUE+MySQL+Redis framework, including a forum server and a database. The forum server provides web page access, data processing and other services, and the database stores various service data, traffic data, etc. At the same time, the user operation simulation part is built using the Selenium+Yaml+Xpath+Sleep+Python framework. The idea of automated testing is borrowed to simulate user access in the form of automated scripts. A pseudo-random number generation module is used to randomly select numbers within 1-60 seconds, and the numbers are input into a time counter as the access time interval. The user operation simulation module imitates the user to perform browsing, reading, writing, uploading, downloading and other operations at different time intervals. The image library provides the necessary system and application images to support the user operation simulation module to build a realistic operating system environment.
[0096] S704: Analyze the third behavior data according to preset malicious behavior rules.
[0097] Since the above-mentioned dynamic detection based on the execution of the program to be tested has the advantage of comprehensive detection, but also has the problem of relatively low detection efficiency, therefore, in an optional specific implementation of this embodiment, a dynamic and static combined detection method is adopted to take into account the advantages of both efficient static detection and comprehensive dynamic detection. Figure 4 As shown, in an optional specific implementation of the present invention, before the above step S101, the method further includes:
[0098] S108: Use disassembly technology to detect the program to be tested, and determine whether the program to be tested is packed or obfuscated.
[0099] Specifically, when the program to be tested is neither packed nor obfuscated, the following step S110 is executed; when the program to be tested is packed or obfuscated, the above step S101 is executed.
[0100] During the specific implementation, the disassembly technology is used to check whether there are common functions of the packed program such as LoadLibrary and GetProcAddress inside it, count whether the function name in the assembly code is garbled, check whether the string in the assembly code is unrecognizable, etc. If any of the above conditions is met, it proves that the tested program is obfuscated or packed, and further behavior tracking and analysis are required; if the tested program is not obfuscated or packed, it is determined to be a harmless program. After disassembly detection, its call system library information is counted, and the program execution flow graph is constructed to form an analysis report.
[0101] S109: Determine whether the program to be tested is a harmless program and generate an analysis report.
[0102] S110: According to the preset virtualization detection rule, check whether there is a keyword matching the virtualization detection rule in the program to be tested.
[0103] Specifically, when the program to be tested contains keywords that match the virtualization detection rule, the following step S111 is executed; when the program to be tested does not contain keywords that match the virtualization detection rule, the above step S101 is executed.
[0104] Specifically, this step can check the registry key value, process name, system version, etc. Exemplarily, the virtualization detection rules can be shown in Table 2. If the program to be tested contains the detection fields in Table 2, it can be directly determined as a malicious program, and this detection ends:
[0105] Table 2 Virtualization detection rules
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112] S111: Determine whether the program to be tested is a malicious program and generate an analysis report.
[0113] In summary, the detection method for anti-virtualization malicious programs in this embodiment checks whether the program has virtualization detection by keyword matching, and then hides and simulates the business environment of human in the loop through the virtual environment characteristics to reveal the disguise of advanced malicious programs and expose their malicious behaviors. The present invention adopts a dynamic and static combination of detection methods, taking into account the advantages of efficient static detection and comprehensive dynamic detection; the unique simulation of the business environment of human in the loop effectively avoids the malicious program's identification of the virtualization environment, and improves the system's detection success rate for anti-virtualization programs.
[0114] Example 2
[0115] The embodiment of the present invention provides a detection system for anti-virtualization malicious programs, which is constructed based on the detection method for anti-virtualization malicious programs in the above embodiment 1 and is also the implementation basis of the detection method for anti-virtualization malicious programs in the above embodiment 1.
[0116] like Figure 5As shown, the system includes a static analysis module, an environment construction module, an environment deployment module, a feature hiding module, a malicious behavior tracking module, a malicious behavior analysis module and a detection control module.
[0117] The static analysis module is used to analyze the file format and required operating environment of the program to be tested. The specific function implementation of the static analysis module can be understood by referring to the content of step S101 in the above embodiment 1.
[0118] The environment construction module is connected to the static analysis module and the detection control module, and is used to construct a virtual environment according to the file format of the program to be tested and the required operating environment sent by the static analysis module when receiving the construction instruction of the detection control module. The environment deployment module is connected to the detection control module and is used to install the business software, office software, etc. required for the operation of the virtual environment. The specific functional implementation of the environment construction module and the environment deployment module can be understood by referring to the content of step S102 in the above embodiment 1.
[0119] The feature hiding module is connected to the control module and is used to hide the virtualization features of the virtual environment when receiving the hiding instruction from the detection control module. The specific function implementation of the feature hiding module can be understood by referring to the content of step S703 in the above embodiment 1.
[0120] The malicious behavior tracking module is used to obtain the behavior data of the program under test during execution according to the behaviors of the network layer, system layer and application layer of the program under test. The malicious behavior tracking module adopts an offline analysis method. The specific functional implementation of the malicious behavior tracking module can be understood by referring to the content of step S103 in the above embodiment 1.
[0121] The malicious behavior analysis module is used to analyze the behavior data and determine whether the program under test has malicious behavior according to the preset malicious behavior rules. The specific function implementation of the malicious behavior analysis module can be understood by referring to the content of step S104 in the above embodiment 1.
[0122] The detection control module is used to upload the program to be tested to the virtual environment after the virtual environment deployment is completed, and to control the operation of the virtual environment and the first execution of the program to be tested. It is also used to send a hiding instruction to the feature hiding module when the behavior data after the first execution of the program to be tested is judged to be free of malicious behavior, and to control the program to be tested to start the second execution after the feature hiding module completes the virtualization feature hiding. In other words, the detection control module is used to perform resource scheduling and manage the virtualized test environment throughout its life cycle, including starting, pausing, resuming, and resetting. It is also used to perform task management. When the program to be tested is passed in, the virtualized environment is constructed and deployed, and the test process is controlled in the initial environment test and feature hiding test stages respectively.
[0123] During specific implementation, the detection control module can also be set with a forced destruction function; in order to improve detection efficiency, if anti-virus software is not installed in the virtualization environment, when encountering some malicious programs that damage the environment or consume resources, the task may not be completed normally. Therefore, it is necessary to periodically poll the virtualization environment status and destroy the environment that has not been closed before the timeout.
[0124] Based on the inventor's discovery that the anti-virtualization malicious program will perform authenticity detection on the environment in which it is located in order to identify whether the virtualized environment is a test environment or an actual business environment, therefore, in order to improve the detection success rate of the anti-virtualization malicious program detection system in this embodiment for the anti-virtualization program, as Figure 6 As shown, as an optional specific implementation, the detection system for anti-virtualized malicious programs in this embodiment can also include a simulation module, which is connected to the detection control module and is used to deploy a virtualized business environment with a simulated human in the loop in the virtual environment when receiving a simulation instruction from the detection control module, and monitor the operating status of the virtualized business environment. At this time, the detection control module is also used to send simulation instructions to the simulation module when the behavior data after the second execution of the program to be tested is judged to be free of malicious behavior, and control the program to be tested to start the third execution after the simulation module completes the operation of the virtualized business environment deployed.
[0125] Specifically, the simulation module uses the JAVA+SpringBoot+VUE+MySQL+Redis framework to build a forum, and uses the Selenium+Yaml+Xpath+Sleep+Python framework to build the user operation simulation part, so as to perform indefinite periodic simulation operations based on pseudo-random numbers, imitating users to perform browsing, reading, writing, uploading, downloading and other operations at different time intervals. The simulation module can deploy multiple virtualized business environments. The simulation module is also used to forcibly destroy the failed virtualized business environment when a virtualized business environment fails during operation, and call another virtualized business environment to replace it.
[0126] The specific functional implementation of the simulation module can be understood by referring to the content of step S703 in the above embodiment 1.
[0127] Since the above-mentioned dynamic detection based on the program to be tested has the advantage of comprehensive detection, but also has the problem of relatively low detection efficiency, therefore, in an optional specific implementation of this embodiment, a dynamic and static combined detection method is adopted to take into account the advantages of both high efficiency of static detection and comprehensiveness of dynamic detection; in this case, Figure 6As shown, the static analysis module is also used to use disassembly technology to detect whether the program under test is packed or obfuscated, and when the program under test is neither packed nor obfuscated, generate an analysis report that the program under test is a harmless program; the static analysis module is also used to check whether there are keywords matching the virtualization detection rules in the program under test, and when the program under test has keywords matching the virtualization detection rules, generate an analysis report that the program under test is a malicious program; the detection control module is used to send construction instructions to the environment construction module when the program under test does not have keywords matching the virtualization detection rules but is packed or obfuscated.
[0128] At this time, the specific functional implementation of the static analysis module can be understood by referring to the contents of step S101, step S108 and step S109 in the above embodiment 1.
[0129] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.
Claims
1. A detection method for anti-virtualization malicious programs, characterized in that: The steps include: Obtain the file format and required operating environment of the program to be tested; Construct and deploy a virtual environment according to the file format of the program to be tested and the required operating environment; Executing the program to be tested for the first time in the virtual environment, and obtaining first behavior data of the network layer, the system layer, and the application layer when the program to be tested is executed; Analyze the first behavior data according to preset malicious behavior rules to determine whether the program to be tested has malicious behavior; When the program to be tested has malicious behavior, analyzing the malicious behavior and generating an analysis report; When the program to be tested has no malicious behavior, executing the program to be tested for a second time in the virtual environment after hiding the virtualization feature, and obtaining second behavior data of the network layer, the system layer and the application layer when the program to be tested is executed; Analyze the second behavior data according to preset malicious behavior rules to determine whether the program to be tested has malicious behavior; When the program to be tested has malicious behavior, analyzing the malicious behavior and generating an analysis report; When the program to be tested does not have malicious behavior, the program to be tested is executed for the third time in the virtual environment after the virtualization feature is hidden and the simulated person is in the loop, and the third behavior data of the network layer, system layer and application layer when the program to be tested is executed is obtained; the simulated person in the loop means that a set of internal forum-style websites are deployed in the virtual environment, and indefinite periodic simulation operations based on pseudo-random numbers are performed to imitate the user to perform browsing, reading, writing, uploading and downloading operations at different time intervals; The third behavior data is analyzed according to preset malicious behavior rules.
2. The method for detecting anti-virtualization malicious programs according to claim 1, characterized in that: Hiding the virtualization features refers to modifying the registry, process, file and command line in the virtual environment to hide the virtualization features therein.
3. The detection method for anti-virtualization malicious programs according to claim 1 or 2, characterized in that: Before the step of obtaining the file format and operating environment of the program to be tested, the following steps are also included: Using disassembly technology to detect the program to be tested, and determine whether the program to be tested is packed or obfuscated; According to a preset virtualization detection rule, checking whether there is a keyword matching the virtualization detection rule in the program to be tested; When the program to be tested is neither packed nor obfuscated, determining that the program to be tested is a harmless program and generating an analysis report; When the program to be tested contains keywords that match the virtualization detection rule, determining that the program to be tested is a malicious program and generating an analysis report; When there are no keywords matching the virtualization detection rules in the program to be tested, but there is a shell or obfuscation, the step of obtaining the file format and operating environment of the program to be tested is performed.
4. A detection system for anti-virtualization malicious programs, characterized in that: include: Static analysis module, used to analyze the file format and required operating environment elements of the program to be tested; An environment construction module, connected to the static analysis module and the detection control module, for constructing a virtual environment according to the file format of the program to be tested and the required operating environment sent by the static analysis module upon receiving a construction instruction from the detection control module; An environment deployment module, connected to the detection control module, for installing business software and office software required for the operation of the virtual environment; a feature hiding module, connected to the detection control module, and configured to hide the virtualization features of the virtual environment upon receiving a hiding instruction from the detection control module; A malicious behavior tracking module, used to obtain behavior data during the execution of the program under test based on the behaviors of the network layer, system layer and application layer of the program under test; A malicious behavior analysis module is used to analyze the behavior data and determine whether the program to be tested has malicious behavior according to preset malicious behavior rules; A detection control module, used to upload the program to be tested to the virtual environment after the deployment of the virtual environment is completed, and control the operation of the virtual environment and the first execution of the program to be tested; and also used to send a hiding instruction to the feature hiding module when the behavior data after the first execution of the program to be tested is judged to be free of malicious behavior, and control the program to be tested to start a second execution after the feature hiding module completes the virtualization feature hiding; A simulation module is connected to the detection control module and is used to deploy a virtualized business environment of a simulated person in the loop in the virtual environment upon receiving a simulation instruction from the detection control module, and monitor the operation status of the virtualized business environment; the simulation of the simulated person in the loop refers to deploying a set of websites in the form of internal forums in the virtual environment, and performing indefinite periodic simulation operations based on pseudo-random numbers, imitating users to perform browsing, reading, writing, uploading, and downloading operations at different time intervals; The detection control module is also used to send simulation instructions to the simulation module when the behavior data after the second execution of the program under test is judged to contain no malicious behavior, and control the program under test to start the third execution after the simulation module completes the operation of the virtualized business environment deployed.
5. The detection system for anti-virtualization malicious programs according to claim 4, characterized in that: The simulation module deploys multiple virtualized business environments. The simulation module is also used to forcibly destroy the failed virtualized business environment when one of the virtualized business environments fails during operation, and call another virtualized business environment to replace it.
6. The detection system for anti-virtualization malicious programs according to claim 4 or 5, characterized in that: The simulation module uses the framework of JAVA+SpringBoot+VUE+MySQL+Redis to build the forum, and uses the framework of Selenium+Yaml+Xpath+Sleep+Python to build the user operation simulation part, so as to perform indefinite periodic simulation operations based on pseudo-random numbers, imitating users to perform browsing, reading, writing, uploading and downloading operations at different time intervals.
7. The detection system for anti-virtualization malicious programs according to claim 4, characterized in that: The static analysis module is also used to detect whether the program to be tested is packed or obfuscated by using disassembly technology, and when the program to be tested is neither packed nor obfuscated, generate an analysis report that the program to be tested is a harmless program; the static analysis module is also used to check whether there are keywords matching the virtualization detection rules in the program to be tested, and when the program to be tested has keywords matching the virtualization detection rules, generate an analysis report that the program to be tested is a malicious program; The detection control module is used to send a construction instruction to the environment construction module when the program to be tested does not have a keyword that matches the virtualization detection rule but is packed or obfuscated.
