WO2013020400A1 - 恶意代码的检测方法、系统及相关装置 - Google Patents
恶意代码的检测方法、系统及相关装置 Download PDFInfo
- Publication number
- WO2013020400A1 WO2013020400A1 PCT/CN2012/075380 CN2012075380W WO2013020400A1 WO 2013020400 A1 WO2013020400 A1 WO 2013020400A1 CN 2012075380 W CN2012075380 W CN 2012075380W WO 2013020400 A1 WO2013020400 A1 WO 2013020400A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- program code
- execution
- cluster
- code
- malicious code
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
- G06F21/566—Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
Definitions
- the present invention relates to the field of computer security technologies, and in particular, to a method for detecting malicious code, a host machine, a device for detecting malicious code, and a detection system for malicious code. Background technique
- Hardware virtualization technology is widely used in software testing, parallel computing and other fields. Hardware virtualization technology virtualizes one or more virtual machines on a physical host, so that several or even dozens of virtual machines can share the hardware resources of one physical host. This physical host is also called a host.
- the cloud computing centralizes the data processing tasks of the respective terminal devices to the network for execution, so that the data service is provided by the network to users using a plurality of different terminal devices, thereby overcoming the difference of the terminal devices.
- Distributed computing on the network side in cloud computing has become a new important application scenario for hardware virtualization technology. Since each virtual machine on the same host can pass through the network device, but only through the public host to generate data interaction, when using hardware virtualization technology to implement cloud computing, a virus-infected virtual machine can easily pass through the sink. The host infects other virtual machines that are on the same host. Therefore, cloud computing is easy to become the target of computer viruses and network attacks.
- the prior art proposes: installing anti-virus software on each virtual machine of the same host, and using the anti-virus software installed on each virtual machine. The malicious code on the virtual machine is checked and killed.
- the embodiment of the invention provides a method for detecting a malicious code, which solves the problem of low detection efficiency and high resource occupation in the prior art.
- an embodiment of the present invention further provides a host machine, a malicious code detecting apparatus, and a malicious code detecting system.
- a method for detecting malicious code including:
- the obtained execution feature is compared with pre-stored execution characteristics of known malicious code, and the program code is determined to be malicious code when the comparison result is met.
- a method for detecting malicious code including:
- the result of the determination is sent to the host.
- a host machine includes a virtual machine monitor and at least one virtual machine, and further includes detection means for malicious code, wherein:
- the detecting means of the malicious code is configured to monitor execution of an instruction in a virtual machine monitor of the host machine, where the read/write request generated when the program code is executed in the virtual machine of the host machine is sent to the virtual When the machine monitor is generated, the escaping is generated; according to the execution condition of the instruction, the execution characteristics of the malicious code are obtained for comparison, and when the comparison result is matched, the program code is determined to be malicious code.
- a detection device for malicious code comprising:
- a monitoring unit configured to monitor execution of an instruction in a virtual machine monitor of the host, where the read/write request generated when executing the program code in the virtual machine of the host is sent to the virtual machine monitor Escaped
- an obtaining unit configured to obtain an execution feature of the program code according to an execution condition of the instruction; perform an alignment of the execution features of the code, and determine that the program code is a malicious code when the comparison result is met.
- a detection device for malicious code comprising:
- a first receiving unit configured to receive a program code sent by the host machine
- An execution unit configured to execute the program code in a first sandbox pre-built for simulating a virtual machine monitor environment, obtain a security status report of the first sandbox after execution ends; and/or pre-build Executing the program code in a second sandbox for simulating a virtual machine environment, obtaining a set of discriminating rules of the second sandbox after the execution ends; determining whether the program code is a malicious code,
- the determination rule includes a threshold determination range of at least one of the preset parameters;
- the first sending unit is configured to send the determination result of the determining unit to the host.
- a detection system for malicious code comprising at least one host machine and at least one cluster killing device, wherein: The host machine is configured to capture an instruction in a virtual machine monitor of the host machine, where the execution instruction is a read/write request generated when the program code is executed in the virtual machine of the host machine is sent to the virtual machine monitor Obtaining an execution characteristic of the program code according to the instruction; comparing the obtained execution feature with an execution characteristic of a known malicious code in a local database blacklist, if the comparison result is consistent, Determining that the program code is malicious code; if the comparison result does not match, sending the program code to the cluster killing device, and receiving the determination that the program code returned by the cluster killing device is malicious code result;
- the cluster killing device is configured to receive program code sent by the host, execute the program code in a first sandbox pre-built for simulating a virtual machine monitor environment, and obtain the first after the execution ends a security status report of the sandbox; and/or executing the program code in a second sandbox pre-built to simulate a virtual machine environment, obtaining a security status report of the second sandbox after execution ends; a parameter value of the preset parameter in the security status report, and a set of preset discriminating rules, determining whether the program code is a malicious code, and the discriminating rule includes at least one parameter value range of the preset parameter; The result is sent to the host.
- the method for detecting malicious code monitors an instruction generated by escaping in a virtual machine monitor of a host machine, and obtains an execution feature of the program code according to the instruction; and obtains the obtained execution feature and the pre-stored known feature.
- the execution characteristics of the malicious code are compared, and it is determined whether the program code is malicious code according to the comparison result.
- the detection efficiency is improved, and the storage resources of the host occupied by the anti-virus software in each virtual machine are saved, and the processing resources of the host occupied by the virtual machine respectively running the anti-virus software are saved.
- FIG. 1 is a schematic structural diagram of a host machine in a hardware virtualization scenario in the embodiment;
- 2a is a flowchart of a method for detecting malicious code according to Embodiment 1 of the present invention;
- FIG. 2b is a schematic diagram of an example of obtaining a program code execution feature according to Embodiment 1 of the present invention;
- FIG. 3 is a malicious code according to Embodiment 2 of the present invention; Flow chart of the determination method;
- FIG. 4a is a flowchart of a malicious code determining method according to Embodiment 3 of the present invention.
- FIG. 4b is a flowchart of another method for determining a malicious code according to Embodiment 3 of the present invention
- FIG. 6 is a flowchart of a method for detecting malicious code according to Embodiment 6 of the present invention
- FIG. 7 is a flowchart of a method for updating a database on a cluster killing device according to Embodiment 7 of the present invention
- FIG. 8 is a schematic structural diagram of a database in a cluster killing device according to Embodiment 7 of the present invention
- FIG. 9 is a detailed flowchart of a method for updating a database on a cluster killing device according to Embodiment 7 of the present invention
- FIG. 10 is a schematic structural diagram of a host device according to Embodiment 8 of the present invention.
- FIG. 11 is a schematic structural diagram of a device for detecting malicious code according to Embodiment 8 of the present invention
- FIG. 12 is a schematic structural diagram of another device for detecting malicious code according to Embodiment 8 of the present invention.
- FIG. 13 is a schematic structural diagram of a cluster killing device according to Embodiment 9 of the present invention
- FIG. 14 is a schematic structural diagram of a malicious code detecting system according to Embodiment 10 of the present invention. detailed description
- Embodiments 1 to 5 of the present invention introduce a method for detecting malicious code from the perspective of a host machine.
- Embodiment 6 Embodiment 7 introduces a method for detecting malicious code from the perspective of a cluster killing device.
- FIG. 1 is a schematic structural diagram of a host machine in a hardware virtualization scenario in the embodiment.
- the host is abstracted into a three-layer logical architecture, which is the upper virtual machine VM! ⁇ VM n , the middle layer virtual machine monitor (hypervisor) and the underlying hardware.
- the underlying hardware includes a central processing unit (CPU), memory, network adapters, disks, and so on.
- Step 201 Monitor execution of the instruction in a virtual machine monitor of the host machine
- the escape operation is a function of the existing virtual machine monitor itself, and the escape operation converts the virtual machine's access to the virtual hardware device into a virtual machine monitor access to the real physical hardware device, and the program code in the virtual machine is An indispensable part of the implementation process, the detailed technical details are not repeated here.
- the execution of the instructions monitored in the virtual machine monitor of the host machine refers to the execution of the instructions after the virtual machine monitor is escaped, and is not the program in the virtual machine before the escaping.
- the execution of the code refers to the execution of the instructions after the virtual machine monitor is escaped, and is not the program in the virtual machine before the escaping.
- Step 202 Obtain an execution feature of the program code according to an execution condition of the instruction.
- the execution characteristics of the program code include: a content of the instruction generated by the read/write access request escaping generated when the program code is executed, a behavior characteristic of the instruction in the virtual machine monitor, or the instruction accessing physical hardware The behavioral characteristics of the device.
- the behavior characteristics of the instruction in the virtual machine monitor include: content, storage location, or file parameter information of the system file in the virtual machine monitor to be modified by the instruction, and the file parameter information includes the name of the system file. Identification, build time, version number, access rights, and more.
- the behavior of the physical hardware device is as follows: the duration of the storage space of the memory device, the hard disk, the flash memory, and the like exceeds the first set threshold, the duration of the CPU usage exceeding the second set threshold, Whether to read and write the range of input and output interfaces and so on.
- the first setting threshold may be calculated according to a situation that the storage device is accessed according to an instruction after the known malicious code escaping, and the second setting threshold may be based on a known malicious code.
- the statistics of the CPU occupied by the execution of the instructions are statistically obtained.
- the instruction set of the read/write access request set generated by the program code al.exe in the virtual machine is escaped, and the instruction set is al ', which contains cmd0 ⁇ cmd9 for a total of 10 instructions;
- the content of the instruction generated by the escaping of the read/write request generated when the program code is executed can be obtained (as shown in Table 1), and optionally, only some of the instructions can be read.
- the content of reading cmdl is "0xl95fd3”
- the content of reading cmd6 is "0xl3457e'O
- the behavioral characteristics of the escaping generated instructions in the virtual machine monitor or the behavioral characteristics of the instructions accessing the physical hardware device can be obtained by:
- the ?cmdlO the parameters passed in the virtual machine monitor or the behavior characteristics of the instruction accessing the physical hardware device are obtained according to the parameters passed in the API when the instruction is invoked.
- the incoming parameters include file parameter information such as file path, file identification, etc., or an identifier of an interface to be read or written, data to read or write a file or interface, and the like.
- the parameters passed in when the file system API is called according to cmd2 can be obtained. cmd2 needs to modify the contents of the system file named xen.gz under the path boot/.
- the storage resource or the processing resource usage on the host during the execution of the instruction may be learned by monitoring the predetermined API, thereby further obtaining behavior characteristics of the instruction access hardware, such as the storage space size of the storage device, and The proportion of CPU usage.
- Step 203 Compare the obtained execution feature with a pre-stored execution characteristic of a known malicious code, and determine whether the program code is malicious code according to the comparison result.
- the processing performance of the host when setting a specific comparison mode, it may be comprehensively considered according to the requirements of the security level, the processing performance of the host, and the like. For example, if the demand for the security level is high, it may be set as long as at least one execution is performed in the obtained execution feature. The feature is consistent with the execution characteristic of the known malicious code, indicating that the comparison result is consistent, and the program code is determined to be malicious code, and the program code is determined to be malicious as long as the identifier of the program code is consistent with the identifier of the known malicious code. Code; or if If the processing performance of the host is low, it is only possible to compare the execution characteristics that are easily obtained by the part. If they are consistent, the comparison result is consistent, otherwise the comparison result does not match.
- comparison process includes but is not limited to:
- the host computer's local database stores a blacklist, and the blacklist contains the execution characteristics of known malicious code.
- the execution characteristics of the intended code are compared; if the comparison result is consistent, the program code is determined to be a malicious code, otherwise the program code is determined to be non-malicious code.
- the blacklist contains the execution characteristics of the known malicious code malwarel.exe, malware2.exe, and malware3.exe.
- the host performs the above-mentioned execution code of the program code al.exe and the execution characteristics of the three malicious codes in the blacklist. Compare one by one, taking the comparison of the execution characteristics of the program code al.exe and malwarel.exe as an example:
- Known malicious code malwarel.exe execution characteristics include:
- the instruction set generated by escaping malwarel' has the content of cmdl as "0xl95fd3" and the content of cmd6 as "0xl3457e”.
- the generated instruction set a1 When the program code al.exe is executed, the generated instruction set a1, the contents of cmdl and cmd6 are compared with the contents of cmdl and cmd6 in the instruction set malwarel ', and the instruction in the instruction set a1 is in the virtual
- the behavioral characteristics in the machine monitor are compared with the behavioral features of the instructions in malwarel' in the virtual machine monitor; the comparison results are the contents of cmdl, cmd6, and the instructions in the instruction set al, are in the
- the behavioral characteristics in the virtual machine monitor and the behavior of the instructions in the 'mall' in the virtual machine monitor are both "modify the contents of the system file named xen.gz under the path boot/". Therefore, the result of the comparison is that the program code al.exe matches the execution characteristic of the malicious code mall.exe, indicating that the program code al.exe is malicious code.
- the local database may be updated periodically.
- step 201 to step 203 may be performed by a detecting device of malicious code in the host machine.
- the method for detecting malicious code monitors an instruction generated by escaping in a virtual machine monitor of a host machine, and obtains an execution feature of the program code according to the instruction; and obtains the obtained execution feature and the pre-stored known feature.
- the execution characteristics of the malicious code are compared, and it is determined whether the program code is malicious code according to the comparison result.
- the embodiment provides another process for determining whether the program code is malicious code in step 203 in the first embodiment, and the host computer also stores a white list in the local database. Determining whether the program code is malicious code according to the comparison result of the black and white list, and sending the execution feature or the program code to the cluster killing device when the program code cannot be determined according to the local database comparison result, whether the program code is malicious code The determination is made, and the determination result returned by the cluster killing device is received, as shown in FIG. 3.
- the blacklist is stored, but also the whitelist is stored, and the whitelist contains the execution characteristics of the known normal code.
- the execution feature of the known malicious code in the first comparison is performed, if the comparison result is consistent, it is determined that the program code is malicious code, otherwise proceeds to step 302;
- Step 302 If the first comparison result does not match, perform the second comparison between the obtained execution feature and the execution characteristic of the known normal code in the local database whitelist.
- step 303a If the second comparison result is consistent, determining that the program code is a non-malicious code; If the second comparison result does not match, proceed to step 303a or step 303b;
- Step 303a The host sends the obtained execution feature to the cluster killing device, and enters 304a.
- Step 304a the host computer receives a determination result of whether the program code returned by the cluster killing device is a malicious code, and the determination result is that the cluster killing device adds the feature to the cluster killing device extension database. It is known that the execution characteristics of malicious code are determined by comparison.
- the cluster killing device can take advantage of the computing performance of the distributed computing technology, or the storage capacity of the distributed storage, and execute the execution characteristics of the host and the execution of the known malicious code in the extended database blacklist. The characteristics are compared to obtain the judgment result, and the specific comparison manner is similar to that of the host machine, and the description will not be repeated here.
- Step 303b the host sends the program code to the cluster killing device, and proceeds to step 304b.
- Step 304b the host computer receives a determination result of whether the program code returned by the cluster killing device is a malicious code, and the determination result is that the cluster killing device uses a sandbox technology or other sandbox-like technology execution center. After the program code is described, it is determined based on the execution result.
- Sandbox (or sandbox) technology is an existing virtualization security isolation technology that enforces the behavior of the program in accordance with security policies. Code running in the sandbox cannot modify or view the user system.
- the cluster killing device simulates running suspicious code by sandbox technology, and gives a judgment result of whether the suspicious code is malicious code according to the running result.
- each of the above steps may be performed by a detection device of malicious code in the host machine.
- the detecting device of the malicious code may instruct the virtual machine executing the program code to send the program code to the cluster killing device, and the detecting device such as the malicious code may pass the virtual machine to the virtual machine.
- the killing agent sends a notification message to instruct the virtual machine to send the program code to the cluster killing device; the detecting device of the malicious code can also obtain the program code from the virtual machine, and send the obtained program code
- the cluster killing device such as the malicious code detecting device, may send the request message to the killing agent in the virtual machine, and obtain the program code from the received corresponding response message.
- the comparison is performed, and the second comparison is performed with the execution features in the blacklist when the comparison result does not match; or the execution characteristics of the program code in parallel with the execution characteristics of the known malicious code in the blacklist, respectively The execution characteristics of the known normal code in the list are compared, etc., and are no longer listed here.
- the whitelist may not be stored in the local database or may not be compared with the whitelist. If the comparison result does not match in step 301, step 302 may be skipped and the process directly proceeds to step 303a or step 303b. In this way, the storage space occupied by the local database can be reduced, but there may be more exchange messages between the host and the cluster killing device. In practical applications, it can be flexibly selected according to factors such as the storage resources of the host and network transmission resources.
- the execution feature or the program code is sent to the cluster killing device for determination, and Receive the judgment result returned by the cluster killing device.
- the cluster By using the cluster to kill the performance advantages of the distributed computing system of the device, it is confirmed whether the program code sent by the host is malicious code according to the extended database or the sandbox, thereby improving the detection accuracy.
- the distributed behavior feature comparison method of the steps 303a, 304a is compared with the sandbox determination mode of steps 303b, 304b.
- the former has higher processing efficiency, but cannot identify new malicious ones that have not appeared before.
- the code the latter can identify new malicious code that has not appeared before, but the processing efficiency is low.
- the processing efficiency of the program code is pre-stored with the high-efficiency and the new malicious code. Knowing the execution characteristics of the malicious code is compared, and determining whether the program code is a malicious code method according to the comparison result, and the specific process is as shown in FIG. 4a.
- step 401 is similar to step 301 of Figure 3, and step 402 is similar to step 302 of Figure 3.
- the execution characteristics of the known malicious code in the first comparison if the comparison results are consistent, then determine the The program code is malicious code, otherwise it proceeds to step 402; the specific comparison manner in this embodiment refers to the first embodiment.
- Step 402 If the first comparison result does not match, perform the second comparison between the obtained execution feature and the execution characteristic of the known normal code in the local database whitelist.
- Step 403 The host sends the obtained execution feature to the cluster killing device.
- Step 404 the host receives the determination result that the program code returned by the cluster killing device is malicious code or non-malicious code, or an identifier for indicating that the program code is unrecognizable, if the host receives the program code for indicating Unrecognized identification, proceeds to step 405;
- the cluster killing device determines that the received execution feature matches the execution characteristic of the known malicious code in the extended database blacklist, and can determine that the program code is a malicious code, return the program code to The result of the malicious code;
- the cluster killing device determines that the received execution feature matches the execution characteristic of the known normal code in the extended database whitelist, and can determine that the program code is a non-malicious code, return the program code to be non- The result of the malicious code;
- the cluster killing device determines that the received execution feature does not match the execution characteristic of the known malicious code in the extended database blacklist and the execution characteristics of the known normal code in the extended database whitelist, then returns to indicate The identifier that the program code does not recognize.
- Step 405 The host sends the program code to the cluster killing device.
- Step 406 The host machine receives a determination result of whether the program code returned by the cluster killing device is a malicious code, and the determining result is that the cluster killing device executes the program code by using sandbox technology, according to the execution The result is determined. Steps 403 to 406 in FIG. 4a are replaced by steps 410 to 411;
- Step 410 The host sends the program code and the obtained execution feature to the cluster killing device.
- the cluster killing device may first compare the received execution feature with the execution characteristic of the known malicious code in the extended database blacklist. If the comparison result is consistent, it can be determined that the program code is malicious code, and then directly returns to the The program code is a determination result of the malicious code; if the comparison result does not match, the program code is further executed in the sandbox, and it is determined whether the program code is malicious code according to the execution result.
- Step 411 The host receives the determination result returned by the cluster killing device.
- the method further includes: preventing the execution of the read/write request of the program code Righteous instruction
- the instruction to escape the read and write request of the program code may be isolated, or the user may be prompted to delete the program code.
- the method further includes: continuing to execute the instruction of the read/write request escaping of the program code.
- the host machine after detecting the malicious code, the host machine can block the execution of the read/write request escaping instruction initiated by the malicious code, thereby solving the problem of malicious code propagation between the plurality of virtual machines on the host, and improving security.
- Embodiment 5 After detecting the malicious code, the host machine can block the execution of the read/write request escaping instruction initiated by the malicious code, thereby solving the problem of malicious code propagation between the plurality of virtual machines on the host, and improving security.
- the method further includes:
- Step 501 Record an identifier of the program code, and then count the number of times the identifier of the program code is detected in the set time period, where the set time period may be based on a historical record of the frequency of detection of the previous malicious code, or a host machine. The performance and other factors to determine;
- Step 502 periodically or irregularly, the recorded program code is identified and set in the time period.
- the number of times the code of the sequence code is recorded is sent to the cluster killing device;
- Step 503 Receive a database content returned by the cluster killing device, where the received database content is determined by the cluster killing device according to the identifier of the program code sent by the host machine and the number of times;
- Step 504 Replace the content of the local database according to the received database content, thereby updating the local database.
- the received database content is sent by the cluster killing device according to a setting geographical area, or a network area (for example, a local area network, a university network, or a city network)
- a network area for example, a local area network, a university network, or a city network
- the local database of the host machine can be updated in time, on the one hand, the accuracy of detecting the malicious code in the first embodiment can be improved; on the other hand, the execution characteristics of the program code that the host machine will obtain and the local database can be improved.
- the execution characteristics of the malicious code in the blacklist are compared, and the probability that the program code is malicious code is determined, thereby reducing the execution feature of the program code or the program code frequently sent by the host in the second embodiment and the third embodiment.
- the network transmission resources consumed by the cluster to kill the device improve the detection efficiency.
- the local database of the host machine can be used to detect whether the program code in each virtual machine is malicious code, not only the utilization rate of the data in the local database is high, but also the update and upgrade scheme is relatively convenient, and the prior art is avoided.
- the problem of updating and maintaining the anti-virus software installed on each virtual machine is complicated.
- the embodiment of the present invention describes a method for detecting malicious code from the perspective of a cluster killing device.
- Step 601 The cluster killing device receives the program code sent by the host machine, or the execution feature of the program code. If the program code is received, the process proceeds to step 602. If the execution feature of the program code is received, the process proceeds to the step. 605;
- Step 602 the cluster killing device performs the described by sandbox technology or other sandbox-like technologies.
- Program code obtain the execution result, proceeds to step 603;
- Step 603 The clustering and killing device determines, according to the parameter value of the preset parameter in the execution result, and the preset set of the discriminating rule, whether the program code is a malicious code, and the determining rule includes at least one of the preset parameters. Threshold judgment range;
- the preset parameter may be an environmental parameter of a sandbox (such as some parameters in a registry), or a predetermined range (for example, a folder under a predetermined path), a file size, a file link, and a file link.
- the operation performed during the execution of the code is to modify the contents of the file, or to modify the link of the file, which is malicious code.
- Executing the result hit rule R1 after executing the program code in the sandbox indicates that the program code is malicious code;
- the preset rule is obtained according to an execution result of a known malicious code.
- Step 604 the cluster killing device sends the determination result of step 603 to the host machine;
- Step 605 The cluster killing device compares the execution feature sent by the host with the execution characteristic of the known malicious code in the extended database blacklist. If it matches the execution characteristic of the known malicious code in the blacklist, the process proceeds to step 606. If not, proceed to step 607;
- Step 606 The cluster killing device returns a determination result that the program code is a malicious code.
- the execution characteristics of the normal code are known to be compared. If the execution characteristic of the normal code is consistent with the whitelist, the process proceeds to step 608. If not, go to step 609;
- Step 608 The cluster killing device returns a determination result that the program code is a non-malicious code
- Step 601, step 602, step 603, and step 604 are generally used to determine whether the program code in the host machine is malicious code by using sandbox technology, and usually consists of step 601 and steps 605 to 609.
- the way to query the extended database to determine whether the program code in the host is malicious code can be implemented independently without interdependence.
- the above detection method provided in FIG. 6a of the embodiment of the present invention may also be adjusted as follows.
- Step 610 The cluster killing device receives the program code sent by the host machine, and execution characteristics of the program code.
- Step 611 The cluster killing device compares the received execution feature with the execution feature of the known malicious code in the extended database blacklist. If it matches the execution characteristic of the known malicious code in the blacklist, the process proceeds to step 612. Otherwise, Go to step 613;
- Step 612 The program code returned by the cluster killing device is a determination result of the malicious code.
- step 614 It is known that the execution characteristics of the normal code are compared, if it matches the execution characteristic of the known normal code in the white list, then proceeds to step 614, if not, then proceeds to step 615;
- Step 614 The cluster killing device returns a determination result that the program code is a non-malicious code.
- Step 615 the cluster killing device uses the sandbox technology to execute the program code, and obtains the execution result, and proceeds to step 616;
- Step 616 The clustering and killing device determines, according to the parameter value of the preset parameter in the execution result, and the preset set of the discriminating rules, whether the program code is a malicious code, and the determining rule includes at least one of the preset parameters.
- the parameter value range is; Step 617, the cluster killing device sends the determination result of step 616 to the host.
- the amount of data transmitted by the host and the cluster killing device in a single transmission is small, but the number of interactions is large; the solution provided in FIG. 6b, the single transmission of the host and the cluster killing device The amount of data is large, but the number of interactions can be reduced. It can be flexibly selected according to the actual network conditions during implementation.
- the cluster killing device executes the program code by using sandbox technology, and the specific manner of obtaining the execution result includes but is not limited to the following manner or manner. Combination:
- Manner 1 The program code is executed in a pre-built first sandbox for simulating a virtual machine monitor environment, and the obtained execution result is a security status report of the first sandbox after the execution ends. According to the first method, the behavior of the virtual machine using the host machine to spread malicious code can be found.
- Manner 2 executing the program code in a second sandbox pre-built to simulate a virtual machine environment, and the obtained execution result is a security status report of the second sandbox after the execution ends.
- the malicious code can be obtained in the virtual machine or the virtual hardware device corresponding to the virtual machine.
- the method for detecting malicious code provided by the embodiment of the present invention can utilize the performance advantages of the distributed computing system of the cluster killing device, and compare the execution characteristics of the program code sent by the host machine with the execution characteristics of the known malicious code in the extended database. Determining whether the program code is malicious code; or, using the sandbox technology to virtually execute the program code sent by the host machine, and confirming whether the program code sent by the host machine is malicious code according to the execution result, thereby improving the detection. accuracy.
- Step 701 Determine, according to the execution result of the sandbox technology, whether the program code sent by the host machine is a malicious code, and update the database in the cluster killing device according to the determination result;
- the cluster killing device determines that the program code is malicious code, the identifier of the program code and the corresponding execution feature are added to the blacklist of the database;
- the cluster killing device determines that the program code is a non-malicious code
- the identifier of the program code and the corresponding execution feature are added to the white list of the database.
- Step 702 Receive an identifier of a program code sent by the host machine and a number of times the identifier of the program code is detected within a set time period;
- Step 703 Filter out part of the content from the database according to a predetermined screening rule, and the identifier and the number of times the program code is received, where the screening rule includes a statistical indicator determining threshold, and the value of the statistical indicator And determining, according to the identifier of the program code and the number of times the program code is detected within a set time period;
- Step 704 Send the content of the filtered database to the host, so that the host updates the local database.
- the embodiment of the present invention further provides a specific architecture of a database in a cluster killing device, as shown in FIG. 8.
- the database in the cluster killing device includes an update rule base, an extended database, and a basic database, wherein at least one update rule is stored in the update rule base.
- the process of forming the extended database and the basic database is as shown in FIG. After determining whether the program code is malicious code according to the execution result (for the specific implementation manner of executing the program code by using the sandbox and determining whether it is malicious code according to the execution result, refer to the content in the sixth embodiment), and updating the extension according to the determination result.
- database After determining whether the program code is malicious code according to the execution result (for the specific implementation manner of executing the program code by using the sandbox and determining whether it is malicious code according to the execution result, refer to the content in the sixth embodiment), and updating the extension according to the determination result.
- the cluster killing device adds the identifier of the program code and the corresponding execution feature to the blacklist of the extended database;
- the cluster killing device adds the identifier of the program code and the corresponding execution feature to the whitelist of the extended database when the result of the determination is that the program code is non-malicious code.
- Step 902 Receive an identifier of a program code that is periodically or irregularly sent by the host, and a number of times that the identifier of the program code is detected within the set time period;
- the cluster killing device may further obtain additional information such as the identifier of the host, the sending time, and the like from the header of the data packet carrying the program code sent by the host and the detected number of times.
- Step 903 The cluster killing device calculates a predetermined statistical indicator value of each program code in the extended database according to the identifier of the program code sent by the host machine and the corresponding number of times;
- the statistical indicator includes: the total number of times the malicious code is detected by each host (also can be understood as the total number of times the malicious code infects the virtual machine), or the speed at which the malicious code is detected by each host (also It is understood as the speed at which malicious code infects a virtual machine.)
- the situation in which malicious code is detected by different hosts can also be understood as the universality of malicious code infecting virtual machines, that is, the breadth of propagation), and malicious code is detected by each virtual machine.
- Time the time when malicious code was first measured by the first host, etc. (can also be understood as the time when malicious code first infected the virtual machine).
- the screening rules are illustrated below:
- a screening rule R12 based on the speed at which the malicious code is detected by each host: if the malicious code is detected more than 500 times per day, the identification and execution characteristics of the malicious code are updated to the basic database; Filtering rules, cluster killing devices can filter out malicious code that spreads fast.
- Filter rule R14 based on the time when the malicious code is first detected by the host: If the time when the malicious code was first detected is more than one month (that is, the time of continuing to infect the host machine exceeds 1 month), then update The identification and execution characteristics of the malicious code to the basic database; through such filtering rules, the cluster killing device can filter out malicious code that has been infected for a long time.
- Step 905 The cluster killing device sends the content of the basic database to each host, so that the host updates the local database.
- the method further includes:
- Step 906 Delete an identifier of the program code that meets the update rule and an execution feature of the program code from the basic database according to a predetermined update rule, where the update rule includes at least one of the statistical indicator determination thresholds.
- Update rule R21 based on the strength of the malicious code recently infected with the virtual machine: If the malicious code infects the virtual machine within the most recently set time period is less than the set number of times (such as 10 times or 100 times), then from the basic database The identifier of the malicious code and the corresponding execution feature are removed from the blacklist; 2.
- Update rule R22 based on the breadth of malicious code recently infected with the virtual machine: If the malicious code infects different virtual machines within the most recently set time period less than the set number of times (such as 10 or 100), then from the basic The identifier of the malicious code and the corresponding execution feature are removed from the database blacklist.
- the number of infections of the different virtual machines by the malicious code during the most recent set period of time may be determined based on the time at which the host transmits the program code and the number of times, and the identity of the host.
- Update rule R23 according to the time of the malicious code in the inactive state: If the malicious code never appears again in all virtual machines within the most recently set time period (such as 3 months or 1 year), then The identifier of the malicious code and the corresponding execution feature are removed from the basic database blacklist.
- the update solution provided by the embodiment of the present invention can filter the database content with high detection rate from the database of the cluster killing device, update the local database of the host according to the filtered database content, the probability of malicious code, and reduce the program code or
- the execution feature of the program code is sent to the cluster to check the number of times the device performs the determination, thereby reducing the transmission bandwidth between the occupied host and the cluster killing device, shortening the determination time, and improving the determination efficiency.
- an embodiment of the present invention provides a host device 101, including a virtual machine monitor 102 and at least one virtual machine 103, and a malicious code detecting device 104, wherein: the malicious code detecting device 104, for monitoring the execution of the instruction in the virtual machine monitor 102 of the host 101, the instruction is that the read/write request generated when the program code is executed in the virtual machine 103 of the host is sent to the virtual machine monitor Obtaining an execution feature of the program code according to an execution condition of the instruction; comparing the execution feature obtained by the acquisition unit with a pre-stored execution characteristic of a known malicious code, and The program code is determined to be malicious code when the comparison result matches.
- the embodiment of the present invention further provides a device for detecting malicious code, and a schematic structural diagram thereof is shown in FIG. 11.
- the device includes a monitoring unit 1041, an obtaining unit 1042, and a determining unit 1043, as follows:
- the monitoring unit 1041 is configured to monitor, in the virtual machine monitor of the host, the execution of the instruction, where the read/write request generated when the program code is executed in the virtual machine of the host is sent to the virtual machine monitor , escaped generated;
- the obtaining unit 1042 is configured to obtain an execution feature of the program code according to the execution status of the instruction monitored by the monitoring unit 1041; perform an alignment of the execution features of the known malicious code, and determine the manner when the comparison result matches The program code is malicious code.
- the detecting device of the malicious code further includes:
- the first sending unit 1046 is configured to: when the comparison result of the determining unit 1043 does not match, send the obtained execution feature to the cluster killing device, or send the program code to the cluster killing device;
- the first receiving unit 1047 is configured to receive, by the cluster killing device, according to the execution feature sent by the first sending unit 1046, whether the returned program code is a malicious code, and the determining result is the cluster
- the killing device compares the feature with an execution characteristic of a known malicious code in the cluster killing device database; or
- the determining unit 1043 in FIG. 11 specifically includes:
- a first determining subunit 1044 configured to compare the obtained execution feature with an execution feature of a known malicious code in a local database blacklist, and if the comparison result is consistent, determining that the program code is a malicious code
- a second determining subunit 1045 configured to perform the second comparison between the obtained execution feature and the execution characteristic of the known normal code in the local database whitelist when the comparison result of the first determining subunit 1044 does not match If the second comparison result is consistent, determining that the program code is a non-malicious code; the first sending unit 1046 is further configured to: if the second determining sub-unit 1045 compares the second result If not, the obtained execution feature is sent to the cluster killing device, or the program code is sent to the cluster killing device.
- the apparatus for detecting malicious code in FIG. 11 further includes: a record statistic unit 1048, configured to record the program code after the determining unit 1043 determines that the program code is a malicious code. The identification of the code, and counting the number of times the program code is detected within the set time period according to the recorded result;
- the second sending unit 1049 is configured to send the identifier of the program code obtained by the record statistic unit 1048 and the number of times to the cluster killing device;
- the second receiving unit 1040 is configured to receive the database content returned by the cluster killing device, and replace the content of the local database according to the received database content, where the received database content is an execution feature that includes the known malicious code.
- the first sending unit 1046 specifically includes: the notification subunit is configured to instruct the virtual machine to send the program code to the cluster killing device by sending a notification message to the killing proxy in the virtual machine;
- the first sending unit 1046 specifically includes: a first sending subunit, a first receiving subunit, and a second sending subunit, where:
- a first sending subunit configured to send a request message to a killing proxy in the virtual machine
- a first receiving subunit configured to receive a response message returned by the killing proxy in the virtual machine according to the request message
- a second sending subunit configured to obtain the program code from the response message, and send the obtained program code to the cluster killing device.
- the device for detecting malicious code provided by the embodiment of the present invention may be integrated in a virtual machine monitor of a host machine, or may be implemented by an independent hardware or software module.
- Embodiments of the present invention provide a host device and a device for detecting malicious code in a host.
- the device monitors the generated instructions in the virtual machine monitor of the host machine, and obtains execution characteristics of the program code according to the instructions; and obtains the executed features and the previously stored known evils
- the execution characteristics of the intended code are compared, and it is determined whether the program code is malicious code based on the comparison result.
- the detection efficiency is improved, the storage resources of the host occupied by the anti-virus software are repeatedly installed on all virtual machines, and Each virtual machine runs the processing resources of the host occupied by the antivirus software.
- an embodiment of the present invention provides a device for detecting malicious code.
- the device for detecting malicious code may be a cluster killing device, and the device includes a first receiving unit 131, an executing unit 132, a determining unit 133, and The first sending unit 134, wherein:
- the first receiving unit 131 is configured to receive a program code sent by the host machine
- the executing unit 132 is configured to execute the program code received by the first receiving unit 131 by using a sandbox technology to obtain an execution result;
- the determining unit 133 is configured to determine, according to the parameter value of the preset parameter in the execution result, and the preset set of the discriminating rules, whether the program code is a malicious code, and the determining rule includes at least one of the presets The threshold judgment range of the parameter;
- the first transmitting unit 134 is configured to send the determination result of the determining unit 133 to the host.
- the executing unit 132 is specifically configured to execute the program code in a pre-built first sandbox for simulating a virtual machine monitor environment, and the obtained execution result is the first sandbox after the execution ends.
- the cluster killing device further includes:
- the database 130, the blacklist in the database 130 is used to store the identifier of the known malicious code and the corresponding execution feature.
- the whitelist in the database 130 is used to save the identifier of the known normal code and the corresponding execution feature. .
- the first updating unit 135 is configured to: when the determining unit 133 determines that the program code is a malicious code, add the identifier of the program code and the corresponding execution feature to a blacklist of the database;
- the second updating unit 136 may be further configured to: when the determining unit 133 determines that the program code is non-malicious code, add the identifier of the program code and the corresponding execution feature to the database. In the white list.
- the cluster killing device further includes:
- the second receiving unit 137 is configured to receive the identifier of the program code sent by the host and the number of times the identifier of the program code is detected within the set time period;
- the filtering unit 138 is configured to filter part of the content from the database 130 according to the identifier of the program code received by the second receiving unit 137, the number of times, and a predetermined screening rule in the cluster killing device.
- the screening rule includes a statistical indicator determining threshold, and the value of the statistical indicator is determined according to the identifier of the program code and the number of times; so that the host machine updates the local database.
- the cluster killing device provided by the embodiment of the present invention can utilize the performance advantages of the distributed computing system, compare the execution characteristics of the program code sent by the host machine with the execution characteristics of the known malicious code in the extended database, and determine the program. Whether the code is malicious code; or, or use the sandbox technology to execute the program code sent by the host virtual machine, and confirm whether the program code sent by the host machine is malicious code according to the execution result, thereby improving the detection accuracy.
- an embodiment of the present invention provides a detection system for malicious code, which includes at least one host device 101 given in Embodiment 8, wherein each of the hosts is used in the host machine.
- the instruction is captured in the virtual machine monitor, and the execution instruction is generated by escaping when the read/write request generated when the program code is executed in the virtual machine of the host machine is sent to the virtual machine monitor; Execution feature of the program code; comparing the obtained execution feature with a pre-stored execution characteristic of a known malicious code, and determining that the program code is malicious code when the comparison result is met.
- the detection system of the malicious code further includes at least one cluster killing device 100: the host machine 101 is further configured to perform the obtained execution feature and the execution characteristic of the known malicious code in the local database blacklist. Comparing, if the comparison result does not match, sending the program code or execution feature to the cluster killing device 100, and receiving a determination result of whether the program code returned by the cluster killing device is a malicious code; The result of the determination is that the cluster killing device compares the feature with an execution characteristic of a known malicious code in the cluster killing device database, or executes the program code by using sandbox technology, according to the execution The result is determined.
- the host machine may perform the second comparison between the obtained execution feature and the execution characteristic of the known normal code in the local database whitelist when the comparison result does not match, if the second comparison result matches And determining that the program code is a non-malicious code; if the second comparison result does not match, sending the program code or execution feature to the cluster killing device 100, or
- the host machine may directly send the program code or execution feature to the cluster killing device 100 when the first comparison result does not match.
- the cluster killing device 100 is configured to receive program code sent by the host computer 101, execute the program code by using sandbox technology, and obtain an execution result; according to the parameter value of the preset parameter in the execution result, and a preset a set of discriminating rules, determining whether the program code is a malicious code, the discriminating rule includes at least one parameter value range of the preset parameter; and transmitting the determination result to the host 101.
- the cluster killing device 100 executes the program code by using the sandbox technology. For the process of obtaining the execution result, refer to the description in the sixth embodiment and the ninth embodiment.
- the detection system of the malicious code provided by the embodiment of the invention utilizes the performance advantages of the cluster computing device to calculate the accuracy of the malicious code detection in the host.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Virology (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Debugging And Monitoring (AREA)
- Storage Device Security (AREA)
Abstract
本发明公开了一种恶意代码的检测方法、系统及相关装置,用以解决现有技术中检测效率低、占用资源较多的问题。该方法包括:在宿主机的虚拟机监视器中监控指令的执行情况,所述指令是该宿主机的虚拟机中执行程序代码时产生的读写请求被下发至虚拟机监视器时,转义生成的;根据所述指令的执行情况,获得所述程序代码的执行特征;将获得的所述执行特征与预先存储的已知恶意代码的执行特征进行比对,在比对结果相符时确定所述程序代码为恶意代码。提高了检测效率,节约了在各虚拟机中重复安装杀毒软件所占用的宿主机的存储资源、以及各虚拟机分别运行杀毒软件所占用的宿主机的处理资源。
Description
恶意代码的检测方法、 系统及相关装置 本申请要求于 2011 年 8 月 9 日提交中国专利局、 申请号为 201110226659.5、 发明名称为 "恶意代码的检测方法、 系统及相关装置" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及计算机安全技术领域, 尤其涉及一种恶意代码的检测方法、 一种宿主机、 一种恶意代码的检测装置和一种恶意代码的检测系统。 背景技术
硬件虚拟化技术被广泛应用于软件测试、 并行计算等领域。 硬件虚拟化 技术在一台物理主机上虚拟出一台或多台虚拟机, 从而使得几个甚至几十个 虚拟机可以共用一个物理主机的硬件资源, 该物理主机也被称为宿主机。
云计算将各个终端设备的数据处理任务集中交给网络来执行, 以便由网 络向使用多种不同终端设备的用户提供数据服务, 从而克服终端设备的差异 性。 云计算中网络侧的分布式计算成为硬件虚拟化技术的一个新的重要应用 场景。 由于同一宿主机上的各个虚拟机之间可以不通过网络设备, 而是仅通 过公共的宿主机产生数据交互, 因此采用硬件虚拟化技术实现云计算时, 一 个感染病毒的虚拟机很容易通过宿主机感染其他与其同在一个宿主机上的虚 拟机。 因此云计算容易成为计算机病毒和网络攻击的对象。
针对如何在以上场景中检测包括病毒在内的恶意代码(Malware ), 现有 技术提出: 在同一个宿主机的各个虚拟机上分别安装杀毒软件, 利用每个虚 拟机上所安装的杀毒软件对该虚拟机上的恶意代码进行查杀。
发明人在实现本发明的过程中, 发现现有技术存在以下缺陷: 恶意代码 执行时实际发生作用的场所是宿主机的内存、 CPU等物理硬件, 并不是逻辑 上的虚拟机中。 但现有方案要求在同一宿主机上的所有虚拟机上都分别安装
杀毒软件, 并在虚拟机上执行恶意代码检测, 因此使用该方案检测恶意代码 存在效率低下、 占用宿主机较多存储资源和处理资源的问题。 发明内容
本发明实施例提供一种恶意代码的检测方法,用以解决现有技术中检测效 率低、 占用资源较多的问题。
对应地,本发明实施例还提供了一种宿主机、一种恶意代码的检测装置和 一种恶意代码的检测系统。
本发明实施例提供的技术方案如下:
一种恶意代码的检测方法, 包括:
在宿主机的虚拟机监视器中监控指令的执行情况, 所述指令是该宿主机 的虚拟机中执行程序代码时产生的读写请求被下发至虚拟机监视器时, 转义 生成的;
根据所述指令的执行情况, 获得所述程序代码的执行特征;
将获得的所述执行特征与预先存储的已知恶意代码的执行特征进行比 对, 在比对结果相符时确定所述程序代码为恶意代码。
一种恶意代码的检测方法, 包括:
接收宿主机发来的程序代码, 在预先构建的用于模拟虚拟机监视器环境 的第一沙箱中执行所述程序代码, 获得执行结束后所述第一沙箱的安全状态 报告; 和 /或在预先构建的用于模拟虚拟机环境的第二沙箱中执行所述程序代 码, 获得执行结束后所述第二沙箱的安全状态报告;
根据所述安全状态报告中预设参数的参数值、 以及预设的判别规则的集 合, 判定所述程序代码是否为恶意代码, 所述判别规则中包含至少一个所述 预设参数的阈值判断范围;
将判定结果发送给所述宿主机。
一种宿主机, 包括虚拟机监视器和至少一个虚拟机, 还包括恶意代码的 检测装置, 其中:
所述恶意代码的检测装置, 用于在宿主机的虚拟机监视器中监控指令的 执行情况, 所述指令是该宿主机的虚拟机中执行程序代码时产生的读写请求 被下发至虚拟机监视器时, 转义生成的; 根据所述指令的执行情况, 获得所 恶意代码的执行特征进行比对, 并在比对结果相符时确定所述程序代码为恶 意代码。
一种恶意代码的检测装置, 包括:
监控单元, 用于在宿主机的虚拟机监视器中监控指令的执行情况, 所述 指令是该宿主机的虚拟机中执行程序代码时产生的读写请求被下发至虚拟机 监视器时, 转义生成的;
获取单元, 用于根据所述指令的执行情况, 获得所述程序代码的执行特 征; 代码的执行特征进行比对, 并在比对结果相符时确定所述程序代码为恶意代 码。
一种恶意代码的检测装置, 包括:
第一接收单元, 用于接收宿主机发来的程序代码;
执行单元, 用于在预先构建的用于模拟虚拟机监视器环境的第一沙箱中 执行所述程序代码, 获得执行结束后所述第一沙箱的安全状态报告; 和 /或在 预先构建的用于模拟虚拟机环境的第二沙箱中执行所述程序代码, 获得执行 结束后所述第二沙箱的安全状态报告; 的判别规则的集合, 判定所述程序代码是否为恶意代码, 所述判别规则中包 含至少一个所述预设参数的阈值判断范围;
第一发送单元, 用于将判定单元的判定结果发送给所述宿主机。
一种恶意代码的检测系统, 包括至少一个宿主机和至少一个集群查杀设 备, 其中:
所述宿主机, 用于在该宿主机的虚拟机监视器中捕获指令, 所述执行指 令是该宿主机的虚拟机中执行程序代码时产生的读写请求被下发至虚拟机监 视器时, 转义生成的; 根据所述指令获得所述程序代码的执行特征; 将获得 的所述执行特征与本地数据库黑名单中的已知恶意代码的执行特征进行比 对, 若比对结果相符, 则确定所述程序代码为恶意代码; 若比对结果不相符, 则将所述程序代码发送给集群查杀设备, 并接收所述集群查杀设备返回的所 述程序代码是否为恶意代码的判定结果;
所述集群查杀设备, 用于接收宿主机发来的程序代码, 在预先构建的用 于模拟虚拟机监视器环境的第一沙箱中执行所述程序代码, 获得执行结束后 所述第一沙箱的安全状态报告; 和 /或在预先构建的用于模拟虚拟机环境的第 二沙箱中执行所述程序代码, 获得执行结束后所述第二沙箱的安全状态报告; 根据所述安全状态报告中预设参数的参数值、 以及预设的判别规则的集合, 判定所述程序代码是否为恶意代码, 所述判别规则中包含至少一个所述预设 参数的参数值范围; 将判定结果发送给所述宿主机。
本发明实施例提供的恶意代码的检测方法在宿主机的虚拟机监视器中监 控转义生成的指令, 并根据指令获得所述程序代码的执行特征; 将获得的执 行特征与预先存储的已知恶意代码的执行特征进行比对, 并根据比对结果确 定所述程序代码是否为恶意代码。 提高了检测效率, 节约了在各虚拟机中重 复安装杀毒软件所占用的宿主机的存储资源、 以及各虚拟机分别运行杀毒软 件所占用的宿主机的处理资源。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一筒单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本实施例中硬件虚拟化场景下的宿主机的结构原理示意图;
图 2a为本发明实施例一提供的恶意代码的检测方法的流程图; 图 2b为本发明实施例一中获得程序代码执行特征的实例的示意图; 图 3为本发明实施例二提供的恶意代码判定方法的流程图;
图 4a为本发明实施例三提供的恶意代码判定方法的流程图;
图 4b为本发明实施例三提供的另一种恶意代码判定方法的流程图; 图 6a为本发明实施例六提供的恶意代码的检测方法的流程图; 图 6b为本发明实施例六提供的另一种恶意代码的检测方法的流程图; 图 7 为本发明实施例七提供的集群查杀设备上数据库的更新方法的流程 图;
图 8为本发明实施例七提供的集群查杀设备中数据库的架构示意图; 图 9 为本发明实施例七提供的集群查杀设备上数据库的更新方法的详细 流程图;
图 10为本发明实施例八提供的宿主机设备的结构示意图;
图 11为本发明实施例八提供的恶意代码的检测装置的结构示意图; 图 12 为本发明实施例八提供的另一种恶意代码的检测装置的结构示意 图;
图 13为本发明实施例九提供的一种集群查杀设备的结构示意图; 图 14为本发明实施例十提供的一种恶意代码的检测系统的结构示意图。 具体实施方式
由于恶意代码在虚拟机上的执行时, 无论是恶意代码读写宿主机存储器 的操作、 还是访问 CPU的操作都由虚拟化平台转发给宿主机的物理硬件, 所 以恶意代码执行时实际发生作用的场所是宿主机的物理硬件, 并不是逻辑上 的虚拟机。 而现有虚拟机恶意代码检测方案要求在同一宿主机上的所有虚拟 机上都分别安装杀毒软件执行恶意代码检测, 因此现有技术存在着检测效率 低下、 占用宿主机资源较多的问题。
另外, 在升级杀毒软件时要保证同步升级所有虚拟机上的杀毒软件, 否 则杀毒软件版本较低的虚拟机仍然可能被感染恶意代码, 因此现有技术还存 在着管理更新维护较为复杂的问题。
本发明实施例一至实施例五从宿主机的角度对恶意代码的检测方法进行 介绍。 实施例六、 实施例七从集群查杀设备的角度对恶意代码的检测方法进 行介绍。
下面结合各个附图对本发明实施例技术方案的主要实现原理、 具体实施 方式及其对应能够达到的有益效果进行详细的阐述。
实施例一
附图 1 为本实施例中硬件虚拟化场景下的宿主机的结构原理示意图。 为 了便于描述, 这里将宿主机抽象为三层逻辑架构, 分别为上层的各个虚拟机 VM!~VMn, 中间层的虚拟机监视器(hypervisor )和底层硬件。 底层硬件包括 中央处理器(CPU, Center Processing Unit )、 内存、 网络适配器、 磁盘等等。
请参照附图 2a, 对本发明实施例提供的恶意代码的检测方法的流程进行 详细描述:
步骤 201 , 在宿主机的虚拟机监视器中监控指令的执行情况;
具体地, 当虚拟机上执行程序代码时, 对各种物理硬件设备的读写访问 请求被发送到虚拟机监视器时, 会被转义为所述虚拟机所在的宿主机虚拟机 监视器中的执行指令, 并通过虚拟机监视器来真正地访问物理硬件设备。
其中, 转义操作是现有虚拟机监视器本身的功能, 转义操作将虚拟机对 虚拟硬件设备的访问转换成虚拟机监视器对真正物理硬件设备的访问, 是虚 拟机中的程序代码在执行过程中不可缺少的一个环节, 其详细的技术细节在 这里不再赘述。
需要说明的是, 本发明实施例在宿主机的虚拟机监视器中所监控的指令 的执行情况, 是指虚拟机监视器转义后的指令的执行情况, 而并非转义前虚 拟机中程序代码的执行情况。
步骤 202, 根据所述指令的执行情况, 获得所述程序代码的执行特征;
其中, 程序代码的执行特征包括: 执行该程序代码时产生的读写访问请 求转义生成的指令的内容、 所述指令在所述虚拟机监视器中的行为特征、 或 所述指令访问物理硬件设备的行为特征。
其中, 所述指令在虚拟机监视器中的行为特征包括: 该指令所要修改的 该虚拟机监视器中的系统文件的内容、 存储位置、 或者文件参数信息等, 文 件参数信息包括系统文件的名称标识、 生成时间、 版本号、 访问权限等等。
所述指令访问物理硬件设备的行为特征, 包括: 访问内存、 硬盘、 闪存 等存储设备的存储空间超过第一设定阈值的情况所持续时间、 占用 CPU比例 超过第二设定阈值的持续时间、 是否读写设定范围的输入输出接口等等。 可 选地, 所述第一设定阈值可以为预先根据已知恶意代码转义后的指令访问存 储设备的情况统计得出的, 所述第二设定阈值可以为预先根据已知恶意代码 转义后的指令执行时占用 CPU的情况统计得出的。
下面将结合附图 2b所示的实例, 对获得所述程序代码的执行特征的具体 过程进行介绍。
虚拟机中的程序代码 al.exe在执行时所产生的读写访问请求集被转义后 的指令集为 al ', 其中包含 cmd0~cmd9总共 10个指令;
通过读取监控到的指令的内容, 可以获得执行所述程序代码时产生的读 写请求所转义生成的指令的内容(如表 1所示), 可选地, 可以只读取其中部 分指令的内容, 例如读取 cmdl 的内容为 "0xl95fd3" , 读取 cmd6的内容为 "0xl3457e'O
表 1
指令标识 指令内容
cmdO 0xl9256d
cmdl 0xl95fd3
cmd2 0x193546
cmd3 0x45678f
cmd4
cmd5
cmd6 0xl3457e
cmd7
cmd8
cmd9 可选地, 通过以下方式可以获得转义生成的指令在所述虚拟机监视器中 的行为特征或所述指令访问物理硬件设备的行为特征:
监控虚拟机监视器中预定应用程序编程接口 ( API , Application Programming Interface ), 例如文件系统 API、 Input/Output操作 API等等, 是 否被转义生成的指令所调用, 若被转义生成的指令 cmdl~cmdlO所调用, 则 根据指令调用所述 API时传入的参数, 获得转义生成的指令在所述虚拟机监 视器中的行为特征或所述指令访问物理硬件设备的行为特征。 所述传入的参 数包括文件路径、 文件标识等文件参数信息, 或者所要读取或写入的接口的 标识、 读取或写入文件或接口的数据等等。 例如根据 cmd2调用文件系统 API 时传入的参数可以得到, cmd2要修改路径 boot/下的名称为 xen.gz的系统文 件的内容。
此外, 也可以通过监控预定的 API获知所述指令执行过程中, 宿主机上 存储资源或处理资源使用情况, 从而进一步获得所述指令访问硬件的行为特 征, 如存储设备的存储空间的大小、 及占用 CPU的比例。
步骤 203 ,将获得的所述执行特征与预先存储的已知恶意代码的执行特征 进行比对, 并根据比对结果确定所述程序代码是否为恶意代码。
其中, 在设置具体的比对方式时可以根据安全等级的需求、 宿主机的处 理性能等因素综合考虑, 例如, 如果对安全等级的需求较高, 可以设置只要 获得的执行特征中存在至少一个执行特征与已知恶意代码的执行特征一致, 就说明比对结果相符, 判定所述程序代码为恶意代码, 如只要程序代码的标 识与已知恶意代码的标识一致, 就判定所述程序代码为恶意代码; 或者如果
宿主机的处理性能较低, 则可以只比对部分容易获得的执行特征是否一致, 若一致则说明比对结果相符, 否则比对结果不相符。 如只比对程序代码的标 识、 数字签名、 发布者标识, 省略比对相对获取难度较大的执行特征, 如上 述访问物理硬件设备的行为特征等。 在这里不再——列举。
其中, 比对流程包括但不限于:
流程一: 宿主机的本地数据库中存储黑名单, 黑名单中包含已知恶意代 码的执行特征。 意代码的执行特征进行比对; 若比对结果相符, 确定所述程序代码为恶意代 码, 否则确定所述程序代码为非恶意代码。
例如, 黑名单中包含已知恶意代码 malwarel .exe、 malware2.exe 和 malware3.exe的执行特征, 宿主机将上述获得的程序代码 al.exe的执行特征 与黑名单中 3个恶意代码的执行特征逐一进行比对, 以程序代码 al.exe的执 行特征与 malwarel.exe的比对为例:
已知恶意代码 malwarel.exe的执行特征包括:
( 1 )转义生成的指令集 malwarel'中 cmdl的内容为 "0xl95fd3" , cmd6 的内容为 "0xl3457e" ,
( 2 ) 转义生成的指令在虚拟机监视器中的行为特征为 "修改路径 boot/ 下的名称为 xen.gz的系统文件的内容"。
将程序代码 al.exe执行时转义生成的指令集 al,中 cmdl、 cmd6的内容与 指令集 malwarel '中 cmdl、 cmd6的内容进行比对、 并将指令集 al,中的指令 在所述虚拟机监视器中的行为特征与 malwarel'中的指令在所述虚拟机监视器 中的行为特征进行比对; 比对结果为 cmdl、 cmd6的内容一致, 且指令集 al, 中的指令在所述虚拟机监视器中的行为特征与 mall '中的指令在所述虚拟机 监视器中的行为特征均为 "修改路径 boot/下的名称为 xen.gz的系统文件的内 容"。 故比对结果为程序代码 al.exe与恶意代码 mall.exe的执行特征相符, 说 明程序代码 al.exe为恶意代码。
可选地, 所述本地数据库可以定时更新。
可选地, 在比对结果不相符时, 还可以提醒用户是否运行所述程序代码。 可选地, 上述步骤 201~步骤 203可以是宿主机中的恶意代码的检测装置 来执行的。
本发明实施例提供的恶意代码的检测方法在宿主机的虚拟机监视器中监 控转义生成的指令, 并根据指令获得所述程序代码的执行特征; 将获得的执 行特征与预先存储的已知恶意代码的执行特征进行比对, 并根据比对结果确 定所述程序代码是否为恶意代码。 无需在每个虚拟机中都安装杀毒软件, 从 而提高了检测效率, 减少了重复安装杀毒软件所占用的宿主机的存储资源、 以及各虚拟机分别运行杀毒软件所占用的宿主机的处理资源。 实施例二
为了提高恶意代码检测的准确性, 本实施例提供了实施例一中步骤 203 的另一种确定所述程序代码是否为恶意代码的流程, 宿主机的本地数据库中 还存储有白名单, 宿主机根据黑白名单的比对结果来确定所述程序代码是否 为恶意代码, 并在根据本地数据库比对结果无法确定所述程序代码是否为恶 意代码时, 将执行特征或者程序代码发送给集群查杀设备进行判定, 并接收 集群查杀设备返回的判定结果, 具体如附图 3所示。
在宿主机的本地数据库中不仅存储黑名单, 还存储白名单, 白名单中包 含已知正常代码的执行特征。 中的已知恶意代码的执行特征进行第一次比对, 若比对结果相符, 则确定所 述程序代码为恶意代码, 否则进入步骤 302;
本实施例中的具体的比对方式参照实施例一。
步骤 302, 若第一次比对结果不相符, 将获得的所述执行特征与本地数据 库白名单中的已知正常代码的执行特征进行第二次比对;
若第二次比对结果相符, 则确定所述程序代码为非恶意代码;
若第二次比对结果不相符, 则进入步骤 303a或步骤 303b;
步骤 303a, 宿主机将获得的所述执行特征发送给集群查杀设备, 进入 304a。
步骤 304a, 宿主机接收所述集群查杀设备返回的所述程序代码是否为恶 意代码的判定结果, 所述判定结果是所述集群查杀设备将所述特征与该集群 查杀设备扩展数据库中已知恶意代码的执行特征进行比对确定出的。
与宿主机相比, 集群查杀设备可以利用分布式计算技术的计算性能优势、 或分布式存储的存储容量优势, 将宿主机发来的执行特征与扩展数据库黑名 单中已知恶意代码的执行特征进行比对, 从而得到判定结果, 具体比对的方 式与宿主机相类似, 在这里不再重复介绍。
步骤 303b,宿主机将所述程序代码发送给集群查杀设备,进入步骤 304b。 步骤 304b, 宿主机接收所述集群查杀设备返回的所述程序代码是否为恶 意代码的判定结果, 所述判定结果是所述集群查杀设备利用沙箱技术或者其 他类似沙箱的技术执行所述程序代码后, 根据执行结果确定出的。
沙箱 (或称沙盘)技术是一种现有虚拟化安全隔离技术, 该技术按照安 全策略限制程序行为的执行环境, 在沙箱中运行的代码不能够修改或查看用 户系统。 集群查杀设备采用沙箱技术模拟运行可疑代码, 根据运行结果给出 可疑代码是否为恶意代码的判定结果。
可选地, 上述各个步骤可以是宿主机中的恶意代码的检测装置来执行的。 进一步地, 在步骤 303a、 步骤 303b中, 恶意代码的检测装置可以指示执 行所示程序代码的虚拟机将所述程序代码发送给集群查杀设备, 如恶意代码 的检测装置可以通过向虚拟机中的查杀代理发送通知消息, 来指示虚拟机将 所述程序代码发送给集群查杀设备; 恶意代码的检测装置也可以从虚拟机中 获得所述程序代码, 并将获得的所述程序代码发送给集群查杀设备, 如恶意 代码的检测装置可以通过向虚拟机中的查杀代理发送请求消息, 并从接收到 的对应的响应消息中获得所述程序代码。
除了实施例一和本实施例中提供的宿主机中的比对方案, 还可以有其他
征进行比对, 在比对结果不相符时再与黑名单中的执行特征进行第二次比对; 或者并行地将程序代码的执行特征分别与黑名单中已知恶意代码的执行特 征、 白名单中已知正常代码的执行特征进行比对等等, 在这里不再——列举。
另外, 在本发明实施例中本地数据库中也可以不存储白名单或者不与白 名单进行比对, 在步骤 301比对结果不相符时, 可以跳过步骤 302, 直接进入 步骤 303a或步骤 303b。 这样, 可以减少本地数据库占用的存储空间, 但是可 能会造成宿主机与集群查杀设备之间的交换消息较多。 实际应用中可以根据 宿主机的存储资源、 网络传输资源等因素灵活选择。
在本发明实施例提供的恶意代码的检测方法中, 宿主机根据本地数据库 比对结果无法确定所述程序代码是否为恶意代码时, 将执行特征或者程序代 码发送给集群查杀设备进行判定, 并接收集群查杀设备返回的判定结果。 利 用集群查杀设备分布式计算系统的性能优势, 根据扩展数据库或者沙箱来确 认宿主机发来的程序代码是否为恶意代码, 从而提高了检测的准确性。 实施例三
在实施例二中, 步骤 303a、 304a的分布式行为特征比对判定方式与步骤 303b, 304b的沙箱判定方式相比, 前者处理效率较高、 但无法识别出之前未 出现过的新的恶意代码; 后者能够识别出之前未出现过的新的恶意代码, 但 处理效率较低。 为了能够结合这两种判定方式的优势, 既具有较高的处理效 率, 同时也能识别出新的恶意代码, 本实施例又提供了一种将所述程序代码 的执行特征与预先存储的已知恶意代码的执行特征进行比对, 并根据比对结 果确定所述程序代码是否为恶意代码方法, 具体流程如附图 4a所示。
在附图 4a中, 步骤 401与附图 3中步骤 301类似、 步骤 402与附图 3中 步骤 302类似。 中的已知恶意代码的执行特征进行第一次比对, 若比对结果相符, 则确定所
述程序代码为恶意代码, 否则进入步骤 402; 本实施例中的具体的比对方式参 照实施例一。
步骤 402, 若第一次比对结果不相符, 将获得的所述执行特征与本地数据 库白名单中的已知正常代码的执行特征进行第二次比对;
若第二次比对结果相符, 则确定所述程序代码为非恶意代码;
若第二次比对结果不相符, 则进入步骤 403;
步骤 403 , 宿主机将获得的所述执行特征发送给集群查杀设备;
步骤 404,宿主机接收所述集群查杀设备返回的所述程序代码为恶意代码 或非恶意代码的判定结果、 或者用于表明程序代码无法识别的标识, 若宿主 机接收到用于表明程序代码无法识别的标识, 则进入步骤 405;
其中, 若所述集群查杀设备确定接收到的所述执行特征和扩展数据库黑 名单中已知恶意代码的执行特征符合, 则能够判定所述程序代码为恶意代码, 则返回所述程序代码为恶意代码的判定结果;
若所述集群查杀设备确定接收到的所述执行特征和扩展数据库白名单中 已知正常代码的执行特征符合, 则能够判定所述程序代码为非恶意代码, 则 返回所述程序代码为非恶意代码的判定结果;
若所述集群查杀设备确定接收到的所述执行特征与扩展数据库黑名单中 已知恶意代码的执行特征、 扩展数据库白名单中已知正常代码的执行特征均 不符合, 则返回用于表明程序代码无法识别的标识。
步骤 405 , 宿主机将所述程序代码发送给集群查杀设备;
步骤 406,宿主机接收所述集群查杀设备返回的所述程序代码是否为恶意 代码的判定结果, 所述判定结果是所述集群查杀设备利用沙箱技术执行所述 程序代码后, 根据执行结果确定出的。 用步骤 410~步骤 411替换附图 4a中的步骤 403~步骤 406;
步骤 410, 宿主机将所述程序代码、 以及获得的所述执行特征发送给集群 查杀设备;
集群查杀设备可以首先将接收到的执行特征与扩展数据库黑名单中已知 恶意代码的执行特征进行比对, 若比对结果相符, 能够确定出所述程序代码 为恶意代码, 则直接返回所述程序代码为恶意代码的判定结果; 若比对结果 不相符, 则进一步在沙箱中执行所述程序代码, 根据执行结果判定所述程序 代码是否为恶意代码。
步骤 411 , 宿主机接收集群查杀设备返回的判定结果。 实施例四
在实施例一至实施例三中, 当宿主机根据本地数据库、 或者集群查杀设 备返回的判定结果确定出所述程序代码为恶意代码后, 还包括: 阻止执行所 述程序代码的读写请求转义的指令;
可选地, 还可以隔离所述程序代码的读写请求转义的指令, 或者提示用 户删除所述程序代码。
当确定出所述程序代码为非恶意代码时, 还包括: 继续执行所述程序代 码的读写请求转义的指令。
本发明实施例宿主机在检测出恶意代码后, 可以阻止执行恶意代码发起 的读写请求转义的指令, 从而解决宿主机上多个虚拟机之间的恶意代码传播 问题, 提高安全性。 实施例五
请参照附图 5 , 在实施例一至实施例四中, 若宿主机根据本地数据库、 或 者根据集群查杀设备返回的判定结果确定出所述程序代码为恶意代码后, 还 包括:
步骤 501 , 记录该程序代码的标识, 继而统计设定时间段内该程序代码的 标识被检测出的次数, 所述设定时间段可以根据此前恶意代码被检测频度的 历史记录、 或者宿主机的性能等因素来确定;
步骤 502,定期或不定期地将记录的程序代码的标识及设定时间段内该程
序代码的标识被记录的次数发送给集群查杀设备;
步骤 503 ,接收集群查杀设备返回的数据库内容, 所述接收到的数据库内 容是所述集群查杀设备根据宿主机发送所述程序代码的标识及所述次数确定 出的;
步骤 504, 根据接收到数据库内容替换本地数据库的内容, 从而更新本地 数据库。
可选地, 所述接收到的数据库内容是所述集群查杀设备根据设定地理区 域、 或者网络区域(例如某一局域网、 某大学的网络、 或某城市的网络) 中 各宿主机发送的程序代码的标识及对应被记录的次数更新的。
通过上述方案, 使得宿主机的本地数据库能够被及时更新, 一方面可以 提高实施例一中检测恶意代码的准确率; 另一方面可以提高宿主机将获得的 所述程序代码的执行特征与本地数据库黑名单中恶意代码的执行特征进行比 对, 即可判定出所述程序代码为恶意代码的几率, 从而减少实施例二、 实施 例三中宿主机频繁将程序代码、 或程序代码的执行特征发送给集群查杀设备 所耗费的网络传输资源, 提高了检测效率。
本发明实施例中宿主机的本地数据库可以用以检测各虚拟机中的程序代 码是否为恶意代码, 不但本地数据库中数据的利用率高, 并且更新升级方案 较为筒便, 避免了现有技术在每个虚拟机上分别安装杀毒软件所带来的更新 维护较为复杂的问题。 实施例六
请参照附图 6a, 本发明实施例从集群查杀设备的角度, 对恶意代码的检 测方法进行描述。
步骤 601 , 集群查杀设备接收宿主机发来的程序代码、或程序代码的执行 特征, 若接收到得是程序代码, 则进入步骤 602; 若接收到得是程序代码的执 行特征, 则进入步骤 605;
步骤 602,集群查杀设备利用沙箱技术或者其他类似沙箱的技术执行所述
程序代码, 获得执行结果, 进入步骤 603;
步骤 603 , 集群查杀设备根据执行结果中预设参数的参数值、 以及预设的 判别规则的集合, 判定所述程序代码是否为恶意代码, 所述判别规则中包含 至少一个所述预设参数的阈值判断范围;
具体地,所述预设参数可以是沙箱的环境参数(如注册表中的某些参数), 或者预定范围 (例如预定路径下的文件夹) 内文件的数量、 文件大小、 文件 的链接、 文件的读写权限等等。 如, 其中的一个预设规则: Rl= ( if path = boot/xen.gz, operation = writing or changing link, then Malware ), 即 "若路径 /boot/下名称为 xen.gz的文件、 在程序代码的执行过程中被执行的操作是修改 文件内容、 或修改文件的链接, 则为恶意代码"。 在沙箱中执行所述程序代码 后执行结果命中规则 R1 , 则说明所述程序代码为恶意代码;
可选地, 所述预设规则是根据已知恶意代码的执行结果分析得到的。 步骤 604, 集群查杀设备将步骤 603的判定结果发送给宿主机;
步骤 605 ,集群查杀设备将宿主机发来的执行特征与扩展数据库黑名单中 已知恶意代码的执行特征进行比对, 若与黑名单中已知恶意代码的执行特征 相符, 则进入步骤 606, 若不相符, 则进入步骤 607;
步骤 606, 集群查杀设备返回所述程序代码为恶意代码的判定结果; 已知正常代码的执行特征进行比对, 若与白名单中已知正常代码的执行特征 相符, 则进入步骤 608 , 若不相符, 则进入步骤 609;
步骤 608, 集群查杀设备返回所述程序代码为非恶意代码的判定结果; 识。
这里需要特别说明的是: 步骤 601、 步骤 602、 步骤 603和步骤 604组成 的利用沙箱技术判定宿主机中的程序代码是否为恶意代码的方案、 与步骤 601、步骤 605~步骤 609组成的通常查询扩展数据库的方式判定宿主机中的程 序代码是否为恶意代码的方案可以独立实施, 并无相互依赖关系。
请参照附图 6b,本发明实施例附图 6a中提供的上述检测方法也可以进行 如下调整。
步骤 610, 集群查杀设备接收宿主机发来的程序代码、 以及该程序代码的 执行特征;
步骤 611 ,集群查杀设备将接收到的执行特征与扩展数据库黑名单中已知 恶意代码的执行特征进行比对, 若与黑名单中已知恶意代码的执行特征相符, 则进入步骤 612, 否则进入步骤 613;
步骤 612, 集群查杀设备返回的所述程序代码为恶意代码的判定结果。
已知正常代码的执行特征进行比对, 若与白名单中已知正常代码的执行特征 相符, 则进入步骤 614, 若不相符, 则进入步骤 615;
步骤 614, 集群查杀设备返回所述程序代码为非恶意代码的判定结果。 步骤 615 ,集群查杀设备利用沙箱技术执行所述程序代码,获得执行结果, 进入步骤 616;
步骤 616, 集群查杀设备根据执行结果中预设参数的参数值、 以及预设的 判别规则的集合, 判定所述程序代码是否为恶意代码, 所述判别规则中包含 至少一个所述预设参数的参数值范围; 步骤 617, 集群查杀设备将步骤 616的判定结果发送给宿主机。
附图 6a所提供的方案, 宿主机与集群查杀设备单次传输的数据量较小, 但交互的次数较多; 附图 6b所提供的方案, 宿主机与集群查杀设备单次传输 的数据量较大, 但可以减少交互次数。 在实施时可以根据实际网络情况灵活 选择。
可选地, 在附图 6a的步骤 602、 或附图 6b的步骤 615中, 集群查杀设备 利用沙箱技术执行所述程序代码, 获得执行结果的具体方式包括但不限于以 下方式或者方式的组合:
方式一: 在预先构建的用于模拟虚拟机监视器环境的第一沙箱中执行所 述程序代码, 获得的执行结果为执行结束后所述第一沙箱的安全状态报告。
依据方式一, 可以发现虚拟机利用宿主机传播恶意代码的行为。
方式二: 在预先构建的用于模拟虚拟机环境的第二沙箱中执行所述程序 代码, 获得的执行结果为执行结束后所述第二沙箱的安全状态报告。 依据方 式二, 可以获得恶意代码在虚拟机、 或虚拟机对应的虚拟硬件设备中的运行 情况。
本发明实施例提供的恶意代码的检测方法能够利用集群查杀设备分布式 计算系统的性能优势, 将宿主机发来的程序代码的执行特征和扩展数据库中 已知恶意代码的执行特征进行比对, 判定所述程序代码是否为恶意代码; 或 者, 或者利用沙箱技术虚拟执行宿主机发来的程序代码, 根据执行结果来确 认宿主机发来的程序代码是否为恶意代码, 从而提高了检测的准确性。 实施例七
本发明实施例提供的集群查杀设备中数据库的更新方式如附图 7所示。 步骤 701 , 根据沙箱技术的执行结果, 判定宿主机发来的程序代码是否为 恶意代码后, 根据所述判定结果更新集群查杀设备中的数据库;
集群查杀设备若判定所述程序代码为恶意代码, 则将该程序代码的标识 和对应的执行特征添加到数据库的黑名单中;
可选地, 集群查杀设备若判定所述程序代码为非恶意代码, 将该程序代 码的标识和对应的执行特征添加到数据库的白名单中。
步骤 702,接收宿主机发来的程序代码的标识和设定时间段内该程序代码 的标识被检测到的次数;
步骤 703 , 根据预定的筛选规则、 以及接收到得所述程序代码的标识和所 述次数, 从所述数据库中筛选出部分内容, 所述筛选规则包括统计指标判断 阈值, 所述统计指标的值可以根据所述程序代码的标识和设定时间段内该程 序代码被检测到的次数确定出;
步骤 704, 将筛选出的数据库的内容发送给宿主机, 以便宿主机更新本地 数据库。
本发明实施例还提供了一种集群查杀设备中数据库的具体架构,如附图 8 所示。 集群查杀设备中数据库包括更新规则库、 扩展数据库和基本数据库, 其中更新规则库中存储有至少一个更新规则。 扩展数据库和基本数据库的形 成流程如附图 9所示。 据执行结果判定所述程序代码是否为恶意代码后 (利用沙箱执行程序代码并 根据执行结果判定是否为恶意代码的具体实现方式请参照实施例六中的内 容), 根据所述判定结果更新扩展数据库;
可选地, 集群查杀设备在判定结果为所述程序代码为恶意代码时, 将该 程序代码的标识和对应的执行特征添加到扩展数据库的黑名单中;
可选地, 集群查杀设备在判定结果为所述程序代码为非恶意代码时, 将 该程序代码的标识和对应的执行特征添加到扩展数据库的白名单中。
步骤 902,接收宿主机定期或不定期发来的程序代码的标识、 以及设定时 间段内该程序代码的标识被检测出的次数;
可选地, 集群查杀设备还可以从宿主机发来的承载有程序代码的标识和 被检测出的次数的数据包的包头中获取宿主机的标识、 发送时间等附加信息。
步骤 903 , 集群查杀设备根据宿主机发来的程序代码的标识和对应的次 数, 计算扩展数据库中各程序代码的预定统计指标值;
可选地, 所述统计指标包括: 恶意代码被各宿主机检测出的总次数(也 可以理解为恶意代码感染虚拟机的总次数)、 或者恶意代码被各宿主机检测出 的速度(也可以理解为恶意代码感染虚拟机的速度)、 恶意代码被不同宿主机 检测出的情况(也可以理解为恶意代码感染虚拟机的普遍性,即传播的广度)、 恶意代码被各个虚拟机检测出的时间、 恶意代码被第一个宿主才 1全测出的时 间等等(也可以理解为恶意代码首次感染虚拟机的时间)。 述筛选规则的恶意代码的标识、 及对应的执行特征, 更新到基本数据库中, 所述筛选规则包括至少一个所述统计指标判断阈值;
下面将对筛选规则进行举例说明:
1、 根据恶意代码被各宿主机检测出的总数设定的筛选规则 R11: 若恶意 代码被检测出的总次数超过 1000次, 则更新该恶意代码的标识和执行特征到 基本数据库。
2、 根据恶意代码被各宿主机检测出的速度设定的筛选规则 R12: 若恶意 代码被检测出的速度超过每天 500次, 则更新该恶意代码的标识和执行特征 到基本数据库; 通过该类筛选规则, 集群查杀设备可以筛选出传播速度快的 恶意代码。
3、 根据恶意代码被不同宿主才 全测出的情况设定的筛选规则 R13: 若恶 意代码被超过 80%的宿主机检测到, 则更新该恶意代码的标识和执行特征到 基本数据库; 通过该类筛选规则, 集群查杀设备可以筛选出传播范围广的恶 意代码。
4、 根据恶意代码被宿主机首次检测出的时间设定的筛选规则 R14: 若恶 意代码被首次检测到的时间至今超过 1个月(即持续感染宿主机的时间超过 1 个月 ), 则更新该恶意代码的标识和执行特征到基本数据库; 通过此类筛选规 则, 集群查杀设备可以筛选出感染时间长的恶意代码。
步骤 905, 集群查杀设备将所述基本数据库的内容发送给各宿主机, 以便 宿主机更新本地数据库。
可选地, 为了有效控制各宿主机本地数据库的容量, 节约各宿主机的存 储资源, 在步骤 904之前, 还包括:
步骤 906, 根据预定的更新规则, 从基本数据库中删除符合所述更新规则 的程序代码的标识、 及该程序代码的执行特征, 所述更新规则包括至少一个 所述统计指标判断阈值。
下面也对更新规则进行举例说明:
1、 根据恶意代码近期感染虚拟机的强度设定的更新规则 R21: 若恶意代 码在最近设定时间段内感染虚拟机的次数小于设定次数(如 10次或 100次 ), 则从基本数据库黑名单中剔除该恶意代码的标识及对应的执行特征;
2、 根据恶意代码近期感染虚拟机的广度设定的更新规则 R22: 若恶意代 码在最近设定时间段内感染不同虚拟机的数量小于设定次数(如 10个或 100 个), 则从基本数据库黑名单中剔除该恶意代码的标识及对应的执行特征。
所述恶意代码在最近设定时间段内感染不同虚拟机的数量可以根据接收 到宿主机发送程序代码和次数的时间、 以及宿主机的标识来确定。
3、 根据恶意代码的处于非激活状态的时间设定的更新规则 R23: 若恶意 代码在最近设定时间段内 (如 3个月或 1年)在所有虚拟机中从未再次出现, 则从基本数据库黑名单中剔除该恶意代码的标识及对应的执行特征。
本发明实施例提供的更新方案能够从集群查杀设备的数据库中筛选出检 测率较高的数据库内容, 根据筛选出的数据库内容更新宿主机的本地数据库, 恶意代码的几率, 减少将程序代码或程序代码的执行特征发送给集群查杀设 备进行判定的次数, 从而降低所占用的宿主机与集群查杀设备之间的传输带 宽, 缩短判定时间, 提高判定效率。 实施例八
请参照附图 10, 本发明实施例提供了一种宿主机设备 101 , 包括虚拟机 监视器 102和至少一个虚拟机 103, 还包括恶意代码的检测装置 104, 其中: 所述恶意代码的检测装置 104,用于在宿主机 101的虚拟机监视器 102中 监控指令的执行情况, 所述指令是该宿主机的虚拟机 103 中执行程序代码时 产生的读写请求被下发至虚拟机监视器时, 转义生成的; 根据所述指令的执 行情况, 获得所述程序代码的执行特征; 将获取单元获得的所述执行特征与 预先存储的已知恶意代码的执行特征进行比对, 并在比对结果相符时确定所 述程序代码为恶意代码。
相应地, 本发明实施例还提供了一种恶意代码的检测装置, 其结构示意 图如图 11所示,该装置包括监控单元 1041、获取单元 1042和确定单元 1043, 具体如下:
监控单元 1041 , 用于在宿主机的虚拟机监视器中监控指令的执行情况, 所述指令是该宿主机的虚拟机中执行程序代码时产生的读写请求被下发至虚 拟机监视器时, 转义生成的;
获取单元 1042,用于根据监控单元 1041监控得到的所述指令的执行情况, 获得所述程序代码的执行特征; 已知恶意代码的执行特征进行比对, 并在比对结果相符时确定所述程序代码 为恶意代码。
进一步地, 所述恶意代码的检测装置还包括:
第一发送单元 1046, 用于在确定单元 1043的比对结果不相符时, 将获得 的所述执行特征发送给集群查杀设备, 或者将所述程序代码发送给集群查杀 设备;
第一接收单元 1047, 用于接收所述集群查杀设备根据第一发送单元 1046 发送的所述执行特征, 返回的所述程序代码是否为恶意代码的判定结果, 所 述判定结果是所述集群查杀设备将所述特征与该集群查杀设备数据库中已知 恶意代码的执行特征进行比对确定出的; 或者
接收所述集群查杀设备根据第一发送单元 1046发送的程序代码, 返回的 所述程序代码是否为恶意代码的判定结果, 所述判定结果是所述集群查杀设 备利用沙箱技术执行所述程序代码后, 根据执行结果确定出的。
可选地, 附图 11中的确定单元 1043具体包括:
第一确定子单元 1044, 用于将获得的所述执行特征与本地数据库黑名单 中的已知恶意代码的执行特征进行比对, 若比对结果相符, 则确定所述程序 代码为恶意代码;
第二确定子单元 1045 ,用于在第一确定子单元 1044的比对结果不相符时, 将获得的所述执行特征与本地数据库白名单中的已知正常代码的执行特征进 行第二次比对, 若第二次比对结果相符, 则确定所述程序代码为非恶意代码; 所述第一发送单元 1046还用于若第二确定子单元 1045第二次比对结果
不相符, 则将获得的所述执行特征发送给集群查杀设备, 或者将所述程序代 码发送给集群查杀设备。
可选地, 请参照附图 12, 附图 11中的所述恶意代码的检测装置还包括: 记录统计单元 1048,用于在确定单元 1043确定出所述程序代码为恶意代 码后, 记录该程序代码的标识, 并根据记录结果统计设定时间段内该程序代 码被检测到的次数;
第二发送单元 1049,用于将记录统计单元 1048得到的所述程序代码的标 识及所述次数发送给集群查杀设备;
第二接收单元 1040, 用于接收集群查杀设备返回的数据库内容, 并根据 接收到数据库内容替换本地数据库的内容, 所述接收到的数据库内容是所述 容包含已知恶意代码的执行特征。
可选地, 第一发送单元 1046具体包括: 通知子单元用于通过向虚拟机中 的查杀代理发送通知消息, 来指示虚拟机将所述程序代码发送给集群查杀设 备;
或者第一发送单元 1046具体包括: 第一发送子单元、 第一接收子单元和 第二发送子单元, 其中:
第一发送子单元, 用于向虚拟机中的查杀代理发送请求消息;
第一接收子单元, 用于接收虚拟机中的查杀代理根据所述请求消息, 返 回的响应消息;
第二发送子单元, 用于从所述响应消息中获得程序代码, 并将获得的程 序代码发送给集群查杀设备。
本发明实施例提供的恶意代码的检测装置可以集成在宿主机的虚拟机监 视器中, 也可以由独立的硬件或软件模块来实现。
本发明实施例提供了一种宿主机设备、 以及一种宿主机中的恶意代码的 检测装置。 该装置在宿主机的虚拟机监视器中监控转义生成的指令, 并根据 指令获得所述程序代码的执行特征; 将获得的执行特征与预先存储的已知恶
意代码的执行特征进行比对, 并根据比对结果确定所述程序代码是否为恶意 代码。 与现有的在每个虚拟机中都安装杀毒软件来实现恶意代码检测的方案 相比, 提高了检测效率, 减少了在所有虚拟机上重复安装杀毒软件所占用的 宿主机的存储资源、 以及各虚拟机分别运行杀毒软件所占用的宿主机的处理 资源。
实施例九
请参照附图 13 , 本发明实施例提供了一种恶意代码的检测装置, 该恶意 代码的检测装置可以为集群查杀设备, 该装置包括第一接收单元 131、执行单 元 132、 判定单元 133和第一发送单元 134, 其中:
第一接收单元 131 , 用于接收宿主机发来的程序代码;
执行单元 132,用于利用沙箱技术执行第一接收单元 131接收的所述程序 代码, 获得执行结果;
判定单元 133 , 用于根据所述执行结果中预设参数的参数值、 以及预设的 判别规则的集合, 判定所述程序代码是否为恶意代码, 所述判别规则中包含 至少一个所述预设参数的阈值判断范围;
第一发送单元 134, 用于将判定单元 133的判定结果发送给所述宿主机。 可选地, 所述执行单元 132具体用于在预先构建的用于模拟虚拟机监视 器环境的第一沙箱中执行所述程序代码, 获得的执行结果为执行结束后所述 第一沙箱的安全状态报告; 和 /或, 在预先构建的用于模拟虚拟机环境的第二 沙箱中执行所述程序代码, 获得的执行结果为执行结束后所述第二沙箱的安 全状态报告。
可选地, 所述集群查杀设备还包括:
数据库 130,该数据库 130中的黑名单用于保存已知恶意代码的标识及对 应的执行特征, 可选地, 该数据库 130 中的白名单用于保存已知正常代码的 标识及对应的执行特征。
第一更新单元 135 ,用于在判定单元 133判定所述程序代码为恶意代码时, 则将该程序代码的标识和对应的执行特征添加到数据库的黑名单中;
可选地, 为了提高检测效果, 还可以包括第二更新单元 136, 用于在判定 单元 133 判定所述程序代码为非恶意代码时, 将该程序代码的标识和对应的 执行特征添加到数据库的白名单中。
进一步地, 为了能够及时更新宿主机的本地数据库, 所述集群查杀设备 还包括:
第二接收单元 137,用于接收宿主机发来的程序代码的标识和设定时间段 内该程序代码的标识被检测到的次数;
筛选单元 138, 用于根据第二接收单元 137接收的所述程序代码的标识、 所述次数、 以及所述集群查杀设备中预定的筛选规则, 从所述数据库 130 中 筛选出部分内容, 所述筛选规则包括统计指标判断阈值, 所述统计指标的值 根据所述程序代码的标识和所述次数确定出; 以便宿主机更新本地数据库。
本发明实施例提供的集群查杀设备能够利用分布式计算系统的性能优 势, 将宿主机发来的程序代码的执行特征和扩展数据库中已知恶意代码的执 行特征进行比对, 判定所述程序代码是否为恶意代码; 或者, 或者利用沙箱 技术虚拟执行宿主机发来的程序代码, 根据执行结果来确认宿主机发来的程 序代码是否为恶意代码, 从而提高了检测的准确性。 实施例十
请参照附图 14, 本发明实施例提供了一种恶意代码的检测系统, 其中包 括至少一个实施例八中所给出的宿主机 101 ,其中的每个所述宿主机用于在该 宿主机的虚拟机监视器中捕获指令, 所述执行指令是该宿主机的虚拟机中执 行程序代码时产生的读写请求被下发至虚拟机监视器时, 转义生成的; 根据 所述指令获得所述程序代码的执行特征; 将获得的所述执行特征与预先存储 的已知恶意代码的执行特征进行比对, 并在比对结果相符时确定所述程序代 码为恶意代码。
进一步, 所述恶意代码的检测系统还包括至少一个集群查杀设备 100: 所述宿主机 101 ,还用于将获得的所述执行特征与本地数据库黑名单中的 已知恶意代码的执行特征进行比对, 若比对结果不相符, 则将所述程序代码 或执行特征发送给集群查杀设备 100,并接收所述集群查杀设备返回的所述程 序代码是否为恶意代码的判定结果; 所述判定结果是所述集群查杀设备将所 述特征与该集群查杀设备数据库中已知恶意代码的执行特征进行比对确定出 的, 或者利用沙箱技术执行所述程序代码后, 根据执行结果确定出的。
具体地, 宿主机可以在比对结果不相符时, 将获得的所述执行特征与本 地数据库白名单中的已知正常代码的执行特征进行第二次比对, 若第二次比 对结果相符, 则确定所述程序代码为非恶意代码; 若第二次比对结果不相符, 则将所述程序代码或执行特征发送给集群查杀设备 100, 或者,
宿主机可以在第一次比对结果不相符时, 直接将所述程序代码或执行特 征发送给集群查杀设备 100。
所述集群查杀设备 100, 用于接收宿主机 101发来的程序代码, 利用沙箱 技术执行所述程序代码, 获得执行结果; 根据所述执行结果中预设参数的参 数值、 以及预设的判别规则的集合, 判定所述程序代码是否为恶意代码, 所 述判别规则中包含至少一个所述预设参数的参数值范围; 将判定结果发送给 所述宿主机 101。
所述集群查杀设备 100利用沙箱技术执行所述程序代码, 获得执行结果 的过程请参照实施例六、 实施例九中的描述。
本发明实施例提供的恶意代码的检测系统, 利用集群查杀设备分布式计 算系统的性能优势, 提高宿主机中恶意代码检测的准确性。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件来完成, 该程序可以存储于一计算机可读 取存储介质中, 如: ROM/RAM、 磁碟、 光盘等。 发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权利要
求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。
Claims
1、 一种恶意代码的检测方法, 其特征在于, 包括:
在宿主机的虚拟机监视器中监控指令的执行情况, 所述指令是该宿主机 的虚拟机中执行程序代码时产生的读写请求被下发至虚拟机监视器时, 转义 生成的;
根据所述指令的执行情况, 获得所述程序代码的执行特征;
将获得的所述执行特征与预先存储的已知恶意代码的执行特征进行比 对, 在比对结果相符时确定所述程序代码为恶意代码。
2、 如权利要求 1所述的方法, 其特征在于, 所述执行特征包括以下任意 一个、 或多个的组合: 执行该程序代码时产生的读写访问请求转义生成的指 令的内容、 所述指令在所述虚拟机监视器中的行为特征、 或所述指令访问硬 件的行为特征;
当所述执行特征包括转义生成的指令的内容时, 所述根据所述指令的执 行情况, 获得所述程序代码的执行特征, 具体为: 通过读取监控到的指令的 内容, 获得转义生成的指令的内容;
当所述执行特征包括所述指令在所述虚拟机监视器中的行为特征时, 所 述根据所述指令的执行情况, 获得所述程序代码的执行特征, 具体为: 通过 监控虚拟机监视器中预定应用程序编程接口 API被所述指令调用时传入的参 数, 获得所述指令在所述虚拟机监视器中的行为特征;
当所述执行特征包括所述指令访问硬件的行为特征时, 所述根据所述指 令的执行情况, 获得所述程序代码的执行特征, 具体为: 通过监控虚拟机监 视器中预定 API被所述指令调用时传入的参数、 或者监控所述指令执行过程 中宿主机上存储资源或处理资源使用情况, 获得所述指令访问硬件的行为特 征。
3、 如权利要求 2所述的方法, 其特征在于, 所述指令在所述虚拟机监视 器中的行为特征包括以下任意一个、 或多个的组合: 修改所述虚拟机监视器 中的系统文件的内容、 位置或参数信息;
所述指令访问硬件的行为特征包括以下任意一个、 或多个的组合: 访问 存储空间超过第一设定阈值的持续时间、 占用 CPU比例超过第二设定阈值的 持续时间、 或是否读写设定范围的输入输出接口。
4、 如权利要求 1至 3任一所述的方法, 其特征在于, 所述将获得的所述 执行特征与预先存储的已知恶意代码的执行特征进行比对, 比对结果不相符 之后, 还包括:
将获得的所述执行特征发送给集群查杀设备, 并接收所述集群查杀设备 返回的所述程序代码是否为恶意代码的判定结果, 所述判定结果是所述集群 查杀设备将所述特征与该集群查杀设备数据库中已知恶意代码的执行特征进 行比对确定出的, 或者
将所述程序代码发送给集群查杀设备, 并接收所述集群查杀设备返回的 所述程序代码是否为恶意代码的判定结果, 所述判定结果是所述集群查杀设 备利用沙箱技术执行所述程序代码后, 根据执行结果确定出的。
5、 如权利要求 1至 3任一所述的方法, 其特征在于, 所述将获得的所述 执行特征与预先存储的已知恶意代码的执行特征进行比对, 比对结果不相符 之后, 还包括:
将获得的所述执行特征发送给集群查杀设备, 并接收所述集群查杀设备 返回的所述程序代码是否为恶意代码的判定结果、 或者用于表明程序代码无 法识别的标识, 所述判定结果、 或者用于表明程序代码无法识别的标识是所 述集群查杀设备将所述特征与该集群查杀设备数据库中已知恶意代码, 和 /或 已知正常代码的执行特征进行比对确定出的;
若接收到用于表明程序代码无法识别的标识, 则将所述程序代码发送给 集群查杀设备, 接收所述集群查杀设备返回的所述程序代码是否为恶意代码 的判定结果, 所述判定结果是所述集群查杀设备利用沙箱技术执行所述程序 代码后, 根据执行结果确定出的。
6、 如权利要求 1所述的方法, 其特征在于, 在确定出所述程序代码为恶 意代码后, 还包括:
记录该程序代码的标识, 并根据记录结果统计设定时间段内该程序代码 被检测到的次数;
将所述程序代码的标识及所述次数发送给集群查杀设备;
接收集群查杀设备返回的数据库内容, 并根据接收到数据库内容替换本 地数据库的内容, 所述接收到的数据库内容是所述集群查杀设备根据所述程 序代码的标识及所述次数从所述集群查杀设备的数据库中筛选出的, 所述数 据库内容包含已知恶意代码的执行特征。
7、 如权利要求 1、 2、 3、 或 6所述的方法, 其特征在于, 当确定出所述 程序代码为恶意代码后, 还包括: 阻止执行所述程序代码的读写请求转义生 成的指令。
8、 一种恶意代码的检测方法, 其特征在于, 包括:
接收宿主机发来的程序代码, 在预先构建的用于模拟虚拟机监视器环境 的第一沙箱中执行所述程序代码, 获得执行结束后所述第一沙箱的安全状态 报告; 和 /或在预先构建的用于模拟虚拟机环境的第二沙箱中执行所述程序代 码, 获得执行结束后所述第二沙箱的安全状态报告;
根据所述安全状态报告中预设参数的参数值、 以及预设的判别规则的集 合, 判定所述程序代码是否为恶意代码, 所述判别规则中包含至少一个所述 预设参数的阈值判断范围;
将判定结果发送给所述宿主机。
9、 如权利要求 8所述的方法, 其特征在于, 当判定所述程序代码是否为 恶意代码后, 还包括:
若判定所述程序代码为恶意代码, 则将该程序代码的标识和对应的执行 特征添加到数据库的黑名单中;
所述将判断结果发送给所述宿主机之后, 还包括:
接收宿主机发来的程序代码的标识和设定时间段内该程序代码的标识被 检测到的次数; 根据预定的 选规则、 以及所述程序代码的标识和所述次数, 从所述数 据库中筛选出部分内容, 所述筛选规则包括统计指标判断阈值, 所述统计指 标的值根据所述程序代码的标识和所述次数确定出;
将筛选出的数据库的内容发送给宿主机, 以便宿主机更新本地数据库。
10、 如权利要求 9所述的方法, 其特征在于, 所述根据预定的筛选规则、 以及所述程序代码的标识和所述次数, 从所述数据库中筛选出部分内容之前, 还包括: 码的标识、 及该程序代码的执行特征, 所述更新规则包括至少一个所述统计 指标判断阈值。
11、 一种恶意代码的检测装置, 其特征在于, 包括:
监控单元, 用于在宿主机的虚拟机监视器中监控指令的执行情况, 所述 指令是该宿主机的虚拟机中执行程序代码时产生的读写请求被下发至虚拟机 监视器时, 转义生成的;
获取单元, 用于根据所述指令的执行情况, 获得所述程序代码的执行特 征; 代码的执行特征进行比对, 并在比对结果相符时确定所述程序代码为恶意代 码。
12、 如权利要求 11所述的装置, 其特征在于, 还包括:
第一发送单元, 用于在确定单元的比对结果不相符时, 将获得的所述执 行特征发送给集群查杀设备, 或者将所述程序代码发送给集群查杀设备; 第一接收单元, 用于接收所述集群查杀设备根据第一发送单元发送的所 述执行特征, 返回的所述程序代码是否为恶意代码的判定结果, 所述判定结 果是所述集群查杀设备将所述特征与该集群查杀设备数据库中已知恶意代码 的执行特征进行比对确定出的; 或者
接收所述集群查杀设备根据第一发送单元发送的程序代码, 返回的所述 程序代码是否为恶意代码的判定结果, 所述判定结果是所述集群查杀设备利 用沙箱技术执行所述程序代码后, 根据执行结果确定出的。
13、 如权利要求 11、 或 12所述的装置, 其特征在于, 还包括: 记录统计单元, 用于在确定单元确定出所述程序代码为恶意代码后, 记 录该程序代码的标识, 并根据记录结果统计设定时间段内该程序代码被检测 到的次数; 设备;
第二接收单元, 用于接收集群查杀设备返回的数据库内容, 并根据接收 到数据库内容替换本地数据库的内容, 所述接收到的数据库内容是所述集群 含已知恶意代码的执行特征。
14、 如权利要求 12所述的装置, 其特征在于, 所述第一发送单元包括: 通知子单元用于通过向虚拟机中的查杀代理发送通知消息, 来指示虚拟 机将所述程序代码发送给集群查杀设备。
15、 如权利要求 12所述的装置, 其特征在于, 所述第一发送单元包括: 第一发送子单元, 用于向虚拟机中的查杀代理发送请求消息;
第一接收子单元, 用于接收虚拟机中的查杀代理根据所述请求消息, 返 回的响应消息;
第二发送子单元, 用于从所述响应消息中获得程序代码, 并将获得的程 序代码发送给集群查杀设备。
16、 一种恶意代码的检测装置, 其特征在于, 包括:
第一接收单元, 用于接收宿主机发来的程序代码;
执行单元, 用于在预先构建的用于模拟虚拟机监视器环境的第一沙箱中 执行所述程序代码, 获得执行结束后所述第一沙箱的安全状态报告; 和 /或在 预先构建的用于模拟虚拟机环境的第二沙箱中执行所述程序代码, 获得执行 结束后所述第二沙箱的安全状态报告; 的判别规则的集合, 判定所述程序代码是否为恶意代码, 所述判别规则中包 含至少一个所述预设参数的阈值判断范围;
第一发送单元, 用于将判定单元的判定结果发送给所述宿主机。
17、 如权利要求 16所述的装置, 其特征在于, 还包括:
数据库, 用于保存已知恶意代码的标识及对应的执行特征;
第一更新单元, 用于在判定单元判定所述程序代码为恶意代码时, 则将 该程序代码的标识和对应的执行特征添加到数据库的黑名单中;
第二接收单元, 用于接收宿主机发来的程序代码的标识和设定时间段内 该程序代码的标识被检测到的次数;
筛选单元, 用于根据第二接收单元接收的所述程序代码的标识、 所述次 数、 以及所述集群查杀设备中预定的筛选规则, 从所述数据库中筛选出部分 内容, 所述 选规则包括统计指标判断阈值, 所述统计指标的值根据所述程 序代码的标识和所述次数确定出;
第二发送单元, 用于将所述筛选单元筛选出的内容发送给宿主机, 以便 宿主机更新本地数据库。
18、 一种恶意代码的检测系统, 其特征在于, 包括至少一个宿主机和至 少一个集群查杀设备, 所述宿主机中包括如权利要求 11至 15任一所述的恶 意代码的检测装置, 所述集群查杀设备中包括如权利要求 16或 17所述的恶 意代码的检测装置。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP12822506.7A EP2725510B1 (en) | 2011-08-09 | 2012-05-11 | Method, system and relevant device for detecting malicious codes |
US14/162,139 US9465941B2 (en) | 2011-08-09 | 2014-01-23 | Method, system, and apparatus for detecting malicious code |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110226659.5A CN102254120B (zh) | 2011-08-09 | 2011-08-09 | 恶意代码的检测方法、系统及相关装置 |
CN201110226659.5 | 2011-08-09 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/162,139 Continuation US9465941B2 (en) | 2011-08-09 | 2014-01-23 | Method, system, and apparatus for detecting malicious code |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2013020400A1 true WO2013020400A1 (zh) | 2013-02-14 |
Family
ID=44981380
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2012/075380 WO2013020400A1 (zh) | 2011-08-09 | 2012-05-11 | 恶意代码的检测方法、系统及相关装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US9465941B2 (zh) |
EP (1) | EP2725510B1 (zh) |
CN (1) | CN102254120B (zh) |
WO (1) | WO2013020400A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112084502A (zh) * | 2020-09-18 | 2020-12-15 | 珠海豹趣科技有限公司 | 一种软件识别方法、装置、电子设备及存储介质 |
Families Citing this family (76)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9946791B1 (en) * | 2006-11-21 | 2018-04-17 | Google Llc | Making modified content available |
CN102254120B (zh) * | 2011-08-09 | 2014-05-21 | 华为数字技术(成都)有限公司 | 恶意代码的检测方法、系统及相关装置 |
CN102521542B (zh) * | 2011-12-19 | 2015-01-07 | 北京大学 | 一种计算机软件漏洞利用的捕获方法及系统 |
CN102592080B (zh) * | 2011-12-26 | 2015-11-11 | 北京奇虎科技有限公司 | flash恶意文件检测方法及装置 |
CN103186740B (zh) * | 2011-12-27 | 2015-09-23 | 北京大学 | 一种Android恶意软件的自动化检测方法 |
CN102713860B (zh) * | 2011-12-30 | 2014-07-30 | 华为技术有限公司 | 一种用户体验指标监控方法及监控虚拟机 |
JP2013171556A (ja) * | 2012-02-23 | 2013-09-02 | Hitachi Ltd | プログラム解析システム及び方法 |
CN102779257B (zh) * | 2012-06-28 | 2015-10-07 | 北京奇虎科技有限公司 | 一种Android应用程序的安全检测方法及系统 |
CN103679019B (zh) * | 2012-09-10 | 2017-03-08 | 腾讯科技(深圳)有限公司 | 恶意文件识别方法及装置 |
US9536108B2 (en) * | 2012-10-23 | 2017-01-03 | International Business Machines Corporation | Method and apparatus for generating privacy profiles |
CN103294950B (zh) * | 2012-11-29 | 2016-07-06 | 北京安天电子设备有限公司 | 一种基于反向追踪的高威窃密恶意代码检测方法及系统 |
US9213839B2 (en) | 2013-03-14 | 2015-12-15 | Huawei Technologies Co., Ltd. | Malicious code detection technologies |
US20140281434A1 (en) * | 2013-03-15 | 2014-09-18 | Carlos Madriles | Path profiling using hardware and software combination |
US9852290B1 (en) * | 2013-07-12 | 2017-12-26 | The Boeing Company | Systems and methods of analyzing a software component |
CN104348795B (zh) * | 2013-07-30 | 2019-09-20 | 深圳市腾讯计算机系统有限公司 | 通用网关接口业务入侵防护的方法及装置 |
CN104517053A (zh) * | 2013-09-29 | 2015-04-15 | 北京金山网络科技有限公司 | 软件识别方法及装置 |
US20150278512A1 (en) * | 2014-03-28 | 2015-10-01 | Intel Corporation | Virtualization based intra-block workload isolation |
US9015814B1 (en) * | 2014-06-10 | 2015-04-21 | Kaspersky Lab Zao | System and methods for detecting harmful files of different formats |
CN104113841B (zh) * | 2014-07-11 | 2017-08-08 | 北京信息科技大学 | 一种针对移动互联网Botnet的虚拟化检测系统及检测方法 |
US9495188B1 (en) * | 2014-09-30 | 2016-11-15 | Palo Alto Networks, Inc. | Synchronizing a honey network configuration to reflect a target network environment |
US10044675B1 (en) | 2014-09-30 | 2018-08-07 | Palo Alto Networks, Inc. | Integrating a honey network with a target network to counter IP and peer-checking evasion techniques |
CN104281809A (zh) * | 2014-09-30 | 2015-01-14 | 北京奇虎科技有限公司 | 病毒查杀的方法、装置及系统 |
US9860208B1 (en) | 2014-09-30 | 2018-01-02 | Palo Alto Networks, Inc. | Bridging a virtual clone of a target device in a honey network to a suspicious device in an enterprise network |
US9882929B1 (en) | 2014-09-30 | 2018-01-30 | Palo Alto Networks, Inc. | Dynamic selection and generation of a virtual clone for detonation of suspicious content within a honey network |
CN105488385A (zh) * | 2014-12-31 | 2016-04-13 | 哈尔滨安天科技股份有限公司 | 一种用于穿戴式智能设备的模拟监测方法与系统 |
CN104702605A (zh) * | 2015-03-11 | 2015-06-10 | 国家计算机网络与信息安全管理中心 | 用于内外网之间的业务的恶意代码识别方法及识别设备 |
RU2601148C1 (ru) | 2015-06-30 | 2016-10-27 | Закрытое акционерное общество "Лаборатория Касперского" | Система и способ выявления аномалий при подключении устройств |
KR102431266B1 (ko) * | 2015-09-24 | 2022-08-11 | 삼성전자주식회사 | 통신 시스템에서 정보 보호 장치 및 방법 |
CN105320884A (zh) * | 2015-11-02 | 2016-02-10 | 南京安贤信息科技有限公司 | 虚拟机的安全防护方法及系统 |
US9967210B2 (en) * | 2015-11-17 | 2018-05-08 | Juniper Networks, Inc. | Network device data plane sandboxes for third-party controlled packet forwarding paths |
CN105608374B (zh) * | 2015-12-18 | 2019-04-19 | 北京奇虎科技有限公司 | 虚拟机逃逸的检测方法及装置 |
CN106997367B (zh) * | 2016-01-26 | 2020-05-08 | 华为技术有限公司 | 程序文件的分类方法、分类装置和分类系统 |
RU2628921C1 (ru) * | 2016-03-18 | 2017-08-22 | Акционерное общество "Лаборатория Касперского" | Система и способ выполнения антивирусной проверки файла на виртуальной машине |
US9979750B2 (en) | 2016-04-26 | 2018-05-22 | Acalvio Technologies, Inc. | Tunneling for network deceptions |
CN107317790B (zh) * | 2016-04-27 | 2020-12-01 | 阿里巴巴集团控股有限公司 | 网络行为的监控方法及装置 |
RU2628923C1 (ru) * | 2016-05-20 | 2017-08-22 | Акционерное общество "Лаборатория Касперского" | Система и способ распределения файлов между виртуальными машинами, входящими в распределённую систему виртуальных машин, для выполнения антивирусной проверки |
CN106919433A (zh) * | 2016-06-01 | 2017-07-04 | 阿里巴巴集团控股有限公司 | 重复代码片段查询方法和装置 |
CN107483386A (zh) * | 2016-06-08 | 2017-12-15 | 阿里巴巴集团控股有限公司 | 分析网络数据的方法及装置 |
CN106203091B (zh) * | 2016-06-30 | 2019-02-22 | 北京奇虎科技有限公司 | 一种虚拟机逃逸检测方法及装置 |
CN106156621A (zh) * | 2016-06-30 | 2016-11-23 | 北京奇虎科技有限公司 | 一种检测虚拟机逃逸的方法及装置 |
CN105978911B (zh) * | 2016-07-15 | 2019-05-21 | 江苏博智软件科技有限公司 | 基于虚拟执行技术的恶意代码检测方法及装置 |
WO2018039967A1 (zh) * | 2016-08-31 | 2018-03-08 | 深圳前海达闼云端智能科技有限公司 | 虚拟机切换方法、装置、电子设备和计算机程序产品 |
CN107979581B (zh) | 2016-10-25 | 2020-10-27 | 华为技术有限公司 | 僵尸特征的检测方法和装置 |
CN106341282A (zh) * | 2016-11-10 | 2017-01-18 | 广东电网有限责任公司电力科学研究院 | 一种恶意代码行为分析装置 |
US10298605B2 (en) * | 2016-11-16 | 2019-05-21 | Red Hat, Inc. | Multi-tenant cloud security threat detection |
TWI656453B (zh) * | 2016-11-22 | 2019-04-11 | 財團法人資訊工業策進會 | 檢測系統及檢測方法 |
US10360380B2 (en) * | 2017-01-19 | 2019-07-23 | Cylance Inc. | Advanced malware classification |
US10885189B2 (en) * | 2017-05-22 | 2021-01-05 | Microsoft Technology Licensing, Llc | Isolated container event monitoring |
US10623444B2 (en) * | 2017-07-17 | 2020-04-14 | General Electric Company | Apparatus and method for analysis of binary targets to generate security policy |
CN108121913A (zh) * | 2017-09-26 | 2018-06-05 | 江苏神州信源系统工程有限公司 | 一种操作管理方法及装置 |
CN107682333B (zh) * | 2017-09-30 | 2022-02-25 | 北京奇虎科技有限公司 | 基于云计算环境的虚拟化安全防御系统及方法 |
CN108038375A (zh) * | 2017-12-21 | 2018-05-15 | 北京星河星云信息技术有限公司 | 一种恶意文件检测方法及装置 |
CN109214171A (zh) * | 2018-08-29 | 2019-01-15 | 深信服科技股份有限公司 | 一种软件的检测方法、装置、设备及介质 |
CN111291368B (zh) * | 2018-12-07 | 2024-06-18 | 北京奇虎科技有限公司 | Cpu漏洞的防御方法及系统 |
CN111382440B (zh) * | 2018-12-27 | 2024-05-10 | 北京奇虎科技有限公司 | 基于虚拟机实现的cpu漏洞检测方法及系统 |
US11822666B2 (en) * | 2018-12-28 | 2023-11-21 | Varun SETH | Malware detection |
CN110012000B (zh) * | 2019-03-29 | 2021-07-06 | 深圳市腾讯计算机系统有限公司 | 命令检测方法、装置、计算机设备以及存储介质 |
US10901773B2 (en) * | 2019-04-11 | 2021-01-26 | Red Hat, Inc. | Sharing devices between virtual machines in view of power state information |
CN114096946A (zh) * | 2019-07-10 | 2022-02-25 | 三星电子株式会社 | 用于管理应用的方法和装置 |
CN110516447B (zh) * | 2019-08-21 | 2022-02-11 | 上海连尚网络科技有限公司 | 一种识别终端模拟器的方法与设备 |
CN112580031B (zh) * | 2019-09-30 | 2024-07-26 | 罗伯特·博世有限公司 | 用于防止程序代码对车辆恶意攻击的设备、系统和方法 |
US11507664B2 (en) * | 2019-12-03 | 2022-11-22 | Sonicwall Inc. | Early filtering of clean file using dynamic analysis |
CN110881049B (zh) * | 2019-12-16 | 2022-02-15 | 淮安信息职业技术学院 | 一种计算机网络安全智能控制系统 |
US11271907B2 (en) | 2019-12-19 | 2022-03-08 | Palo Alto Networks, Inc. | Smart proxy for a large scale high-interaction honeypot farm |
US11265346B2 (en) | 2019-12-19 | 2022-03-01 | Palo Alto Networks, Inc. | Large scale high-interactive honeypot farm |
CN113127853A (zh) * | 2019-12-31 | 2021-07-16 | 奇安信科技集团股份有限公司 | 对虚拟机文件的安全处理方法及装置 |
CN111459609B (zh) * | 2020-03-10 | 2024-04-19 | 奇安信科技集团股份有限公司 | 虚拟机安全防护方法、装置及电子设备 |
US11636203B2 (en) * | 2020-06-22 | 2023-04-25 | Bank Of America Corporation | System for isolated access and analysis of suspicious code in a disposable computing environment |
US11269991B2 (en) | 2020-06-22 | 2022-03-08 | Bank Of America Corporation | System for identifying suspicious code in an isolated computing environment based on code characteristics |
US11880461B2 (en) | 2020-06-22 | 2024-01-23 | Bank Of America Corporation | Application interface based system for isolated access and analysis of suspicious code in a computing environment |
US11797669B2 (en) | 2020-06-22 | 2023-10-24 | Bank Of America Corporation | System for isolated access and analysis of suspicious code in a computing environment |
US11574056B2 (en) | 2020-06-26 | 2023-02-07 | Bank Of America Corporation | System for identifying suspicious code embedded in a file in an isolated computing environment |
US11775641B2 (en) * | 2020-11-06 | 2023-10-03 | Vmware, Inc. | Systems and methods for classifying malware based on feature reuse |
CN113672918A (zh) * | 2021-08-04 | 2021-11-19 | 安天科技集团股份有限公司 | 恶意代码检测方法、装置、存储介质及电子设备 |
US11989188B2 (en) | 2021-08-25 | 2024-05-21 | Bank Of America Corporation | Aggregating access to third party data sources and intelligently managing access through request quotas |
CN114124558B (zh) * | 2021-11-30 | 2024-02-06 | 北京天融信网络安全技术有限公司 | 操作响应方法、装置、电子设备及计算机可读存储介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1961272A (zh) * | 2004-06-29 | 2007-05-09 | 英特尔公司 | 通过沙箱技术改进计算机安全性的方法 |
US20080222729A1 (en) * | 2007-03-05 | 2008-09-11 | Songqing Chen | Containment of Unknown and Polymorphic Fast Spreading Worms |
CN101373502A (zh) * | 2008-05-12 | 2009-02-25 | 公安部第三研究所 | 基于Win32平台下病毒行为的自动化分析系统 |
US7779472B1 (en) * | 2005-10-11 | 2010-08-17 | Trend Micro, Inc. | Application behavior based malware detection |
CN101866408A (zh) * | 2010-06-30 | 2010-10-20 | 华中科技大学 | 一种基于虚拟机架构的透明信任链构建系统 |
CN102254120A (zh) * | 2011-08-09 | 2011-11-23 | 成都市华为赛门铁克科技有限公司 | 恶意代码的检测方法、系统及相关装置 |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6775780B1 (en) * | 2000-03-16 | 2004-08-10 | Networks Associates Technology, Inc. | Detecting malicious software by analyzing patterns of system calls generated during emulation |
CN1356631A (zh) | 2001-12-03 | 2002-07-03 | 上海市计算机病毒防范服务中心 | 分布式病毒监测体系结构 |
WO2007076624A1 (en) * | 2005-12-30 | 2007-07-12 | Intel Corporation | Virtual machine to detect malicious code |
CN100590614C (zh) * | 2006-08-23 | 2010-02-17 | 联想(北京)有限公司 | 一种虚拟技术下硬盘数据的保护方法和保护系统 |
CN100485703C (zh) * | 2006-10-11 | 2009-05-06 | 飞塔信息科技(北京)有限公司 | 一种计算机恶意代码处理方法和系统 |
US20090007100A1 (en) * | 2007-06-28 | 2009-01-01 | Microsoft Corporation | Suspending a Running Operating System to Enable Security Scanning |
KR101493076B1 (ko) * | 2009-04-07 | 2015-02-12 | 삼성전자 주식회사 | 버퍼 오버플로우 관리를 통한 바이러스 코드 실행방지장치 및 그 방법 |
CN101827104B (zh) | 2010-04-27 | 2013-01-02 | 南京邮电大学 | 一种基于多反病毒引擎的网络病毒联合防御方法 |
CN102034050A (zh) * | 2011-01-25 | 2011-04-27 | 四川大学 | 基于虚拟机和敏感Native API调用感知的恶意软件动态检测方法 |
CN102082802A (zh) * | 2011-03-01 | 2011-06-01 | 陈彪 | 一种基于行为的移动终端的安全防护系统和方法 |
US9286471B2 (en) * | 2011-10-11 | 2016-03-15 | Citrix Systems, Inc. | Rules based detection and correction of problems on mobile devices of enterprise users |
-
2011
- 2011-08-09 CN CN201110226659.5A patent/CN102254120B/zh active Active
-
2012
- 2012-05-11 EP EP12822506.7A patent/EP2725510B1/en active Active
- 2012-05-11 WO PCT/CN2012/075380 patent/WO2013020400A1/zh active Application Filing
-
2014
- 2014-01-23 US US14/162,139 patent/US9465941B2/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1961272A (zh) * | 2004-06-29 | 2007-05-09 | 英特尔公司 | 通过沙箱技术改进计算机安全性的方法 |
US7779472B1 (en) * | 2005-10-11 | 2010-08-17 | Trend Micro, Inc. | Application behavior based malware detection |
US20080222729A1 (en) * | 2007-03-05 | 2008-09-11 | Songqing Chen | Containment of Unknown and Polymorphic Fast Spreading Worms |
CN101373502A (zh) * | 2008-05-12 | 2009-02-25 | 公安部第三研究所 | 基于Win32平台下病毒行为的自动化分析系统 |
CN101866408A (zh) * | 2010-06-30 | 2010-10-20 | 华中科技大学 | 一种基于虚拟机架构的透明信任链构建系统 |
CN102254120A (zh) * | 2011-08-09 | 2011-11-23 | 成都市华为赛门铁克科技有限公司 | 恶意代码的检测方法、系统及相关装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112084502A (zh) * | 2020-09-18 | 2020-12-15 | 珠海豹趣科技有限公司 | 一种软件识别方法、装置、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN102254120B (zh) | 2014-05-21 |
US9465941B2 (en) | 2016-10-11 |
US20140137255A1 (en) | 2014-05-15 |
EP2725510A1 (en) | 2014-04-30 |
EP2725510B1 (en) | 2016-07-13 |
EP2725510A4 (en) | 2014-10-08 |
CN102254120A (zh) | 2011-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2013020400A1 (zh) | 恶意代码的检测方法、系统及相关装置 | |
US10528726B1 (en) | Microvisor-based malware detection appliance architecture | |
CA3006003C (en) | Dual memory introspection for securing multiple network endpoints | |
RU2645268C2 (ru) | Сложное классифицирование для выявления вредоносных программ | |
US11438349B2 (en) | Systems and methods for protecting devices from malware | |
US8584242B2 (en) | Remote-assisted malware detection | |
EP2994848B1 (en) | Optimized resource allocation for virtual machines within a malware content detection system | |
US9098697B2 (en) | System and method for detecting malware using isolated environment | |
WO2016082501A1 (zh) | 一种云计算系统中云应用攻击行为处理方法、装置及系统 | |
US20130097203A1 (en) | System and method for providing threshold levels on privileged resource usage in a mobile network environment | |
US20120254993A1 (en) | System and method for virtual machine monitor based anti-malware security | |
CN113139176B (zh) | 恶意文件的检测方法、装置、设备及存储介质 | |
JP2015508540A (ja) | モバイルコンピューティングにおけるセキュリティを強化するためのシステムおよび方法 | |
EP2973175B1 (en) | Managing device driver cross ring accesses | |
EP2750069B1 (en) | Method and system for detecting malware using isolated environment | |
Bugiel et al. | mytunes: Semantically linked and user-centric fine-grained privacy control on android | |
Gu et al. | Jgre: An analysis of jni global reference exhaustion vulnerabilities in android | |
Zou et al. | A survey of android mobile platform security | |
Chouhan et al. | A preface on android malware: Taxonomy, techniques and tools | |
Sharma et al. | Malware analysis for android operating | |
CN117494110A (zh) | 一种代码检测方法及相关系统 | |
Na et al. | Mandatory access control for Android application | |
Suresh et al. | DETECTION OF ZOMBIE APPS USING ZAPDROID |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12822506 Country of ref document: EP Kind code of ref document: A1 |
|
REEP | Request for entry into the european phase |
Ref document number: 2012822506 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2012822506 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |