A method, device, electronic device and storage medium for processing malicious files

By combining static information and dynamic behavior sequence information, the comprehensive detection method solves the problem of poor scalability of malicious file detection in the existing technology, achieves effective identification of MIPS platform files and accurate detection of malicious files, and improves system security. .

CN110826064BActive Publication Date: 2024-09-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911024798.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-25
Publication Date
2024-09-10
Estimated Expiration
2040-04-29

AI Technical Summary

Technical Problem

The existing malicious file detection methods are single in terms of static detection and cannot analyze and process obfuscated or protected files. Dynamic detection is mainly based on the X86 platform and cannot analyze and process MIPS platform files, resulting in poor scalability.

Method used

Combine static information and dynamic behavior sequence information for comprehensive detection, extract file information through static analysis, and input the file into the preset behavior detection module to run, generate dynamic behavior sequence information, and use the preset Trojan rule base to determine whether the file is a malicious file.

Benefits of technology

It improves the scalability and accuracy of malicious file detection and can effectively identify malicious files in set platform files to avoid missed detection and enhance system security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110826064B
    Figure CN110826064B
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, device, electronic device and storage medium for processing malicious files. When it is determined that the file to be detected is a set platform file, the file to be detected is statically analyzed to extract static information of the file to be detected; the file to be detected is input into a preset behavior detection module for execution, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information; the file to be detected is comprehensively detected based on the static information, the dynamic behavior sequence information and a preset Trojan rule library to determine that the file to be detected is a malicious file, thereby improving scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computers, and in particular to a method, device, electronic device and storage medium for processing malicious files. Background Art

[0002] Currently, malicious files are mainly detected through static or dynamic methods. The static detection method is too simple and cannot analyze and process obfuscated or protected files. Although dynamic detection is better than static detection, it is mainly based on the development and design of X86 Linux system, so it can only analyze and process X86 platform files, but cannot analyze and process platform files of Microprocessor without interlocked piped stagesarchitecture (MIPS) processor architecture with reduced instruction set computing (RISC), resulting in poor scalability. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a method, device, electronic device and storage medium for processing malicious files, which can improve the scalability of malicious file processing.

[0004] In a first aspect, an embodiment of the present application provides a method for processing malicious files, including:

[0005] When it is determined that the file to be detected is a setting platform file, static analysis is performed on the file to be detected, and static information of the file to be detected is extracted;

[0006] Input the file to be detected into a preset behavior detection module for operation, and detect the behavior of the file to be detected to obtain dynamic behavior sequence information;

[0007] The file to be detected is comprehensively detected according to the static information, the dynamic behavior sequence information and a preset Trojan rule library to determine that the file to be detected is a malicious file.

[0008] In a second aspect, an embodiment of the present application provides a malicious file processing device, including:

[0009] A static information acquisition module, used for, when determining that the file to be detected is a set platform file, performing static analysis on the file to be detected and extracting static information of the file to be detected;

[0010] A dynamic information acquisition module, used for inputting the file to be detected into a preset behavior detection module for operation, and detecting the behavior of the file to be detected to obtain dynamic behavior sequence information;

[0011] The malicious file determination module is used to perform a comprehensive detection on the file to be detected according to the static information, the dynamic behavior sequence information and a preset Trojan rule library to determine that the file to be detected is a malicious file.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store program code, and when the electronic device is running, the processor is used to execute the program code to execute the malicious file processing method provided in any embodiment of the present application.

[0013] In a fourth aspect, a storage medium provided in an embodiment of the present application stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute a malicious file processing method provided in any embodiment of the present application.

[0014] In the embodiment of the present application, when it is determined that the file to be detected is a set platform file, a static analysis is performed on the file to be detected to extract static information of the file to be detected; the file to be detected is input into a preset behavior detection module for execution, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information; a comprehensive detection is performed on the file to be detected based on the static information, the dynamic behavior sequence information and a preset Trojan rule library to determine that the file to be detected is a malicious file; since the set platform file can be detected for malicious files, the scalability is improved; in addition, since the malicious files are identified in combination with the static information and the dynamic behavior sequence information, the accuracy of the detection is also improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 A schematic diagram of an application scenario of the method for processing malicious files provided in an embodiment of the present application.

[0017] Figure 2 It is a flowchart of the method for processing malicious files provided in Example 1 of the present application.

[0018] Figure 3 It is a flowchart of the method for processing malicious files provided in Example 2 of the present application.

[0019] Figure 4 It is a flowchart of the method for processing malicious files provided in Example 3 of the present application.

[0020] Figure 5It is a flowchart of the method for processing malicious files provided in Example 4 of the present application.

[0021] Figure 6 This is a first structural diagram of a malicious file processing device provided in an embodiment of the present application.

[0022] Figure 7 This is a second structural diagram of the malicious file processing device provided in an embodiment of the present application.

[0023] Figure 8 This is a third structural diagram of the malicious file processing device provided in the embodiment of the present application.

[0024] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] In the embodiments of the present invention, the term "module" generally refers to: hardware, a combination of hardware and software, software, etc. For example, a module can be a process running on a processor, a processor, an object, an executable application, an execution thread, a program, etc. Both the application running on the processor and the processor can be modules. One or more modules can be located in one computer and / or distributed between two or more computers.

[0027] In the embodiment of the present invention, “first”, “second”, etc. are only used to distinguish different objects and shall not constitute any limitation to the embodiment of the present invention.

[0028] Malicious file processing is an important direction in the fields of computer science and artificial intelligence. It enables people to effectively defend computers. Malicious files include malware, which refers to at least one of the following programs: viruses, worms, and Trojan horses that perform malicious tasks on computer systems. For example, artificial intelligence can be used to automatically detect malicious files on computers, so that malicious files can be discovered in a timely manner, which facilitates timely processing of malicious files and improves computer security.

[0029] The solution provided by the embodiment of the present invention relates to a malicious file processing technology of artificial intelligence, which is specifically described by the following embodiments:

[0030] An embodiment of the present invention provides a malicious file processing system, including any malicious file processing device provided by the embodiments of the present invention. The malicious file processing device can be specifically integrated in a server.

[0031] For example, refer to Figure 1 , the malicious file processing system includes a terminal and a server, and the terminal and the server are linked through a network. Among them, the network includes network entities such as routers and gateways. The network is a medium used to provide a communication link between the terminal device and the server. The network can include various connection types, such as wired, wireless communication links or optical fiber cables, etc. Users can use the terminal to interact with the server through the network to receive or send messages, etc. The terminal may include: a mobile phone, a tablet computer, a laptop or a personal computer (PC, Personal Computer), etc. Various client applications can be installed on the terminal device, such as virus detection engines, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0032] The terminal may be any electronic device having a display screen and supporting the operation of a virus detection engine, including but not limited to a smart phone, a tablet computer, a portable computer, a desktop computer, and the like.

[0033] The server may be a server that provides various services, for example, a server that provides cloud data support and cloud processing for a virus detection engine installed on a terminal. The server may analyze and process the received files to be detected.

[0034] Among them, when the server determines that the file to be detected is a set platform file, the server performs static analysis on the file to be detected and extracts static information of the file to be detected; the server inputs the file to be detected into a preset behavior detection module for operation, and detects the behavior of the file to be detected to obtain dynamic behavior sequence information; thereafter, the server performs comprehensive detection on the file to be detected based on the static information, dynamic behavior sequence information and a preset Trojan rule library to determine that the file to be detected is a malicious file.

[0035] The server may also extract the detection file from the terminal via a network link.

[0036] Above Figure 1 The example is only an example of a system architecture for implementing the embodiment of the present invention. The embodiment of the present invention is not limited to the above Figure 1 The system structure shown is based on which various embodiments of the present invention are proposed.

[0037] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0038] This embodiment will be described from the perspective of a malicious file processing device, which may be specifically integrated in a server.

[0039] like Figure 2 As shown, a method for processing malicious files is provided, which can be executed by a processor in a server. The specific process of the method for processing malicious files is as follows:

[0040] S101, when it is determined that the file to be detected is a setting platform file, static analysis is performed on the file to be detected to extract static information of the file to be detected;

[0041] The setting platform file is a platform file of a processor architecture (Microprocessor without interlocked piped stages architecture, MIPS) that adopts a reduced instruction set computing (RISC) architecture.

[0042] The static information includes at least one of a string, a function name, a symbol table, and set format information. The set format information is Executable and Linking Format (ELF) information, which is a standard file format for executable files, target files, shared libraries, and core dumps. The set format information is, for example, ELF structure information.

[0043] In one embodiment, suspicious sample files may be collected through intelligence collection or trapping through a pre-established honeypot network to obtain the files to be detected. The intelligence collection method may be to obtain the latest popular file samples under the MIPS platform through an open source intelligence library. Since the format of the collected sample files is relatively messy, it is necessary to filter the above files and only retain the set platform files.

[0044] For example, a static analysis tool can be used to analyze the file to be detected to obtain static information such as structure information, strings, and import functions of the file to be detected. The file to be detected can be an unpacked file, or an uncompressed file. The packed file is a file compressed using a specific algorithm.

[0045] In one embodiment, the step of determining that the file to be detected is a platform setting file may include:

[0046] (1) When the file header information of the file to be detected is consistent with the preset file header, the file to be detected is parsed according to the preset format, and the format information of the file to be detected is obtained;

[0047] (2) When the format information is the same as the preset format, the file to be detected is determined to be a set platform file.

[0048] The preset file header is, for example, a file header of an ELF file under a Linux platform.

[0049] The format information is used to indicate which platform file the to-be-detected file is, such as a Linux platform file or a MIPS platform file.

[0050] In one embodiment, the preset format may be an ELF format. When the file header information of the file to be detected is consistent with the file header of the ELF file under the Linux platform, the file to be detected is parsed according to the ELF format and the format information of the file to be detected is obtained. When the parsed format information is the same as the ELF format, the file to be detected is determined to be a set platform file.

[0051] S102, inputting the file to be detected into a preset behavior detection module for execution, and detecting the behavior of the file to be detected to obtain dynamic behavior sequence information;

[0052] For example, the preset behavior detection module is a MIPS behavior sandbox, and the MIPS behavior sandbox has a built-in behavior detection tool. In one embodiment, the file to be detected is input into the MIPS behavior sandbox for execution and the detection program in the MIPS behavior sandbox detects the file to be detected, obtains the execution flow, function call, network connection, process call and other information of the file to be detected, and generates dynamic behavior sequence information based on the above information.

[0053] The MIPS behavior sandbox includes two modes: user mode and full mode. The user mode uses QEMU to simulate the execution of the MIPS instruction set on the X86 platform, and has good performance. QEMU is a set of simulated processors written by Fabrice Bellard and distributed with source code under the GPL license. Network tools such as behavioral networks are deployed in the virtual environment of QEMU. Behavioral network tools include strace, tcpdump, and MIPS virtual machine detection points. The full mode uses the QEMU system mode to completely simulate the MIPS system, and the performance is relatively poor. The preset behavior detection module includes a first preset detection mode and a second preset detection mode. The first preset detection mode is, for example, the user mode, and the second preset detection mode is, for example, the full mode.

[0054] In one embodiment, in order to further improve the accuracy of detection, the step of inputting the file to be detected into a preset behavior detection module for execution may include:

[0055] (1) running the file to be tested in the first preset detection mode;

[0056] (2) If an abnormality occurs, the file to be detected is run in the second preset detection mode.

[0057] For example, the file to be detected is run in user mode and the behavior of the file to be detected is detected. If an exception occurs, such as a crash, the file to be detected is run in full mode and the behavior of the file to be detected is detected.

[0058] S103: Perform a comprehensive detection on the file to be detected according to the static information, the dynamic behavior sequence information and the preset Trojan rule library to determine that the file to be detected is a malicious file.

[0059] Among them, the preset Trojan rule library may include at least one of static rules, dynamic rules and X86 popular Trojan rules; the static rules may include Yara rules.

[0060] X86 popular Trojan rules, also known as the X86 platform popular malware behavior sequence library, are generated by obtaining the behavior sequence library of popular malware categories in the X86 platform sandbox. Specifically, the popular sequence library is generated by learning the behavior of popular Linux malware under the x86 platform. Since the same family of malware codes are cross-compiled to generate X86 platform files and MIPS platform files, although the two files belong to different platforms, they have the same source, so their malicious behaviors are also consistent. Therefore, the X86 platform popular malware behavior sequence library can also be applied to detect malicious files on the MIPS platform.

[0061] YARA rule is a malicious file identification rule, which is a static rule. It mainly detects based on the static information of the file, such as strings, function names, symbols, etc.

[0062] Malicious files include malware, which refers to at least one of a virus, a worm, and a Trojan horse that performs malicious tasks on a computer system.

[0063] In one embodiment, when the static information and / or the dynamic behavior sequence information matches the characteristic information of a Trojan rule in the preset Trojan rule library, it is determined that the file to be detected is a malicious file;

[0064] When the static information and / or the dynamic behavior sequence information do not match the characteristic information of any Trojan rule in the preset Trojan rule library, it is determined that the file to be detected is not a malicious file.

[0065] It can be understood that the malicious file processing method of this embodiment can determine whether the unpacked file to be detected is a malicious file.

[0066] From the above, it can be seen that when the embodiment of the present invention determines that the file to be detected is a set platform file, the file to be detected is statically analyzed to extract the static information of the file to be detected; the file to be detected is input into the preset behavior detection module for execution, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information; the file to be detected is comprehensively detected according to the static information, the dynamic behavior sequence information and the preset Trojan rule library to determine that the file to be detected is a malicious file; since the set platform file can be detected for malicious files, the scalability is improved; in addition, since the malicious files are identified by combining the static information and the dynamic behavior sequence information, the accuracy of the detection is also improved.

[0067] According to the method described in the previous embodiment, the following will be further described in detail by taking the example of the malicious file processing device being specifically integrated in the server.

[0068] refer to Figure 3 The specific process of the method for processing malicious files in the embodiment of the present invention is as follows:

[0069] S201, when it is determined that the file to be detected is a set platform file, and the file to be detected is a shelled file, obtaining a shelling rule corresponding to the shelled file;

[0070] The setting platform file is a platform file of a processor architecture (Microprocessor without interlocked piped stages architecture, MIPS) that adopts a reduced instruction set computing (RISC) architecture.

[0071] In one embodiment, suspicious sample files may be collected through intelligence collection or trapping through a pre-established honeypot network to obtain the files to be detected. The intelligence collection method may be to obtain the latest popular file samples under the MIPS platform through an open source intelligence library. Since the format of the collected sample files is relatively messy, it is necessary to filter the above files and only retain the set platform files.

[0072] In one embodiment, the step of determining that the file to be detected is a platform setting file may include:

[0073] (1) When the file header information of the file to be detected is consistent with the preset file header, the file to be detected is parsed according to the preset format, and the format information of the file to be detected is obtained;

[0074] (2) When the format information is the same as the preset format, the file to be detected is determined to be a set platform file.

[0075] The preset file header is, for example, a file header of an ELF file under a Linux platform.

[0076] The format information is used to indicate which platform file the to-be-detected file is, such as a Linux platform file or a MIPS platform file.

[0077] In one embodiment, the preset format is an ELF format, and when the file header information of the file to be detected is consistent with the file header of the ELF file under the Linux platform, the file to be detected is parsed according to the ELF format, and the format information of the file to be detected is obtained, and when the format information after parsing is the same as the ELF format, it is determined that the file to be detected is a set platform file. The set format information is, for example, ELF structure information.

[0078] The shell file compresses the file using a specific algorithm. This specific algorithm is also called a shell rule. Each shell file corresponds to a shell rule. The shell rule may include at least one of Aspack, Pecompact and UPX.

[0079] In one embodiment, whether the file to be detected is a packed file can be determined by the following method:

[0080] When the attribute information of the file to be detected is consistent with the preset attribute, it is determined that the file to be detected is a packed file;

[0081] When the attribute information is inconsistent with the preset attribute, obtaining the information entropy of the file to be detected;

[0082] When the information entropy is greater than a preset threshold, it is determined that the file to be detected is a packed file.

[0083] The attribute information includes character strings, section names, and entry point features.

[0084] The information entropy is the amount of information of the file to be detected. The information entropy can be calculated using existing methods.

[0085] For example, multiple types of shelled files are pre-stored with character strings, section names, and entry point features, i.e., preset attributes. When the character string, section name, and entry point features of the file to be detected are consistent with the preset attributes, the file to be detected is determined to be a shelled file; when the attribute information is inconsistent with the preset attributes, the information entropy of the file to be detected is obtained; when the information entropy is greater than a preset threshold, the file to be detected is determined to be a shelled file, otherwise the file to be detected is determined to be a non-shelled file. The preset threshold can be set according to an empirical value.

[0086] S202, when the shelling rule is consistent with the preset rule, the shelling rule corresponding to the preset rule is used to perform shelling processing on the file to be detected;

[0087] For example, the preset rule is also a pre-stored packing rule, which may include at least one of Aspack, Pecompact, and UPX. For example, when the packing rule of the file to be detected is consistent with UPX, the unpacking rule corresponding to UPX is used to decompress the file to be detected.

[0088] S203, performing static analysis on the unpacked file to be detected to extract static information of the file to be detected;

[0089] The static information includes at least one of a string, a function name, a symbol table, and set format information. The set format information is Executable and Linking Format (ELF) information, which is a standard file format for executable files, object files, shared libraries, and core dumps.

[0090] In one implementation, the decompressed file to be detected may be analyzed by a static analysis tool to obtain static information such as structural information, character strings, and imported functions of the file to be detected.

[0091] S204, inputting the unpacked file to be detected into a preset behavior detection module for execution, and detecting the behavior of the file to be detected to obtain dynamic behavior sequence information;

[0092] For example, the preset behavior detection module is a MIPS behavior sandbox, and the MIPS behavior sandbox has a built-in behavior detection tool.

[0093] In one embodiment, the decompressed file to be detected is input into the MIPS behavioral sandbox for execution, and the file to be detected is detected by the detection program in the MIPS behavioral sandbox to obtain the execution flow, function call, network connection, process call and other information of the file to be detected, and dynamic behavior sequence information is generated based on the above information.

[0094] The MIPS behavior sandbox includes two modes: user mode and full mode. The user mode uses QEMU to simulate the execution of the MIPS instruction set on the X86 platform, and has good performance. QEMU is a set of simulated processors written by Fabrice Bellard and distributed with source code under the GPL license. Network tools such as behavioral networks are deployed in the virtual environment of QEMU. Behavioral network tools include strace, tcpdump, and MIPS virtual machine detection points. The full mode uses the QEMU system mode to completely simulate the MIPS system, and the performance is relatively poor. The preset behavior detection module includes a first preset detection mode and a second preset detection mode. The first preset detection mode is, for example, the user mode, and the second preset detection mode is, for example, the full mode.

[0095] In one embodiment, in order to further improve the accuracy of detection, the step of inputting the unpacked file to be detected into a preset behavior detection module for execution includes:

[0096] (1) running the unpacked file to be detected in the first preset detection mode;

[0097] (2) If an abnormality occurs, run the unpacked file to be detected in the second preset detection mode;

[0098] For example, the decompressed file to be detected is run in user mode, and the behavior of the decompressed file to be detected is detected. If an exception occurs, such as a crash, the decompressed file to be detected is run in full mode, and the behavior of the file to be detected is detected.

[0099] S205: Perform a comprehensive detection on the file to be detected based on the static information, the dynamic behavior sequence information and the preset Trojan rule library to determine that the file to be detected is a malicious file.

[0100] Among them, the preset Trojan rule library may include at least one of static rules, dynamic rules and X86 popular Trojan rules; the static rules may include Yara rules.

[0101] X86 popular Trojan rules, also known as the X86 platform popular malware behavior sequence library, are generated by obtaining the behavior sequence library of popular malware categories in the X86 platform sandbox. Specifically, the popular sequence library is generated by learning the behavior of popular Linux malware under the x86 platform. Since the same family of malware codes are cross-compiled to generate X86 platform files and MIPS platform files, although the two files belong to different platforms, they have the same source, so their malicious behaviors are also consistent. Therefore, the X86 platform popular malware behavior sequence library can also be applied to detect malicious files on the MIPS platform.

[0102] YARA rule is a malicious file identification rule, which is a static rule. It mainly detects based on the static information of the file, such as strings, function names, symbols, etc.

[0103] Malicious files include malware, which refers to at least one of a virus, a worm, and a Trojan horse that performs malicious tasks on a computer system.

[0104] In one embodiment, when the static information and / or the dynamic behavior sequence information matches the characteristic information of a Trojan rule in the preset Trojan rule library, it is determined that the file to be detected is a malicious file;

[0105] When the static information and / or the dynamic behavior sequence information do not match the characteristic information of any Trojan rule in the preset Trojan rule library, it is determined that the file to be detected is not a malicious file.

[0106] For example, when the static information matches the characteristic information of the YARA rule, it is determined that the file to be detected is a malicious file.

[0107] In one embodiment, the above method may further include:

[0108] S206, generating identification information of the file to be detected;

[0109] For example, when the file to be detected is a malicious file, identification information is generated, and the identification information is used to indicate that the file to be detected is a malicious file.

[0110] S207: Associating the identification information with the malicious file and storing them.

[0111] For example, the identification information is associated with the malicious file and stored in the server, so that when the file to be detected appears again later, the file to be detected can be determined to be a malicious file directly based on the identification information, thereby improving processing efficiency.

[0112] As can be seen from the above, when the embodiment of the present invention determines that the file to be detected is a set platform file and the file to be detected is a shelled file, the shelling rule corresponding to the shelled file is obtained; when the shelling rule is consistent with the preset rule, the shelling rule corresponding to the preset rule is used to unshell the file to be detected; static analysis is performed on the unshelled file to extract static information of the file to be detected; and the unshelled file to be detected is input into a preset behavior detection module for operation, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information; the file to be detected is comprehensively detected according to the static information, the dynamic behavior sequence information and the preset Trojan rule library to determine that the file to be detected is a malicious file; since the shelled file can be maliciously identified, the completeness rate of malicious files is improved, missed detection is avoided, the accuracy of detection is further improved, and the security of the system is also improved.

[0113] According to the method described in the previous embodiment, the following will take the setting file as a MIPS platform file as an example for further detailed description.

[0114] refer to Figure 4 The specific process of the method for processing malicious files in the embodiment of the present invention is as follows:

[0115] S301, when it is determined that the file to be detected is a MIPS platform file, determining whether the file to be detected is a shelled file;

[0116] In this embodiment, for example, the server can collect suspicious sample files through intelligence collection or through a pre-established honeypot network to obtain the file to be detected; then when it is determined that the file header information of the file to be detected is the file header of the ELF file under the Linux platform, the file to be detected is parsed according to the ELF format, and when the format information of the parsed file to be detected is the same as the ELF format, it is determined that the file to be detected is a MIPS platform file.

[0117] The server pre-stores character strings, section names, and entry point features of various types of shelled files, i.e., preset attributes. When the character string, section name, and entry point features of the file to be detected are consistent with the preset attributes, the file to be detected is determined to be a shelled file; when the attribute information is inconsistent with the preset attributes, the information entropy of the file to be detected is obtained; when the information entropy is greater than a preset threshold, the file to be detected is determined to be a shelled file, otherwise the file to be detected is determined to be a non-shelled file. The preset threshold can be set according to an empirical value. The shelled file compresses the file using a specific algorithm. This specific algorithm is also the shelling rule.

[0118] When the file to be detected is not a packed file, step S306 is executed; when the file to be detected is a packed file, step S302 is executed.

[0119] S302: When the file to be detected is a shelled file, obtaining a shelling rule corresponding to the shelled file, and determining whether the shelling rule is consistent with the preset rule;

[0120] For example, each shell file corresponds to a shell rule. The shell rule may include at least one of Aspack, Pecompact and UPX. When the file to be detected is a shell file, the shell rule corresponding to the shell file is obtained, and it is determined whether the shell rule is consistent with one of Aspack, Pecompact and UPX;

[0121] When the shelling rule is consistent with the preset rule, step S303 is executed; otherwise, step S306 is executed.

[0122] S303, when the shelling rule is consistent with the preset rule, the shelling rule corresponding to the preset rule is used to perform shelling processing on the file to be detected;

[0123] For example, when the shelling rule of the file to be detected is consistent with UPX, the shelling rule corresponding to UPX is used to decompress the file to be detected. The other shelled files are similar to this.

[0124] S304, performing static analysis on the unpacked file to be detected to extract static information of the file to be detected;

[0125] For example, a static analysis tool is used to analyze the decompressed file to be detected, so as to obtain at least one of a character string, a function name, a symbol table, and a setting format information of the file to be detected.

[0126] S305, inputting the unpacked file to be detected into a preset behavior detection module for execution, and detecting the behavior of the file to be detected to obtain dynamic behavior sequence information;

[0127] For example, the decompressed file to be tested is input into the MIPS behavioral sandbox for operation, wherein the MIPS behavioral sandbox includes two modes: user mode and full mode. The user mode is to use QEMU to simulate the execution of the MIPS instruction set on the X86 platform, and the performance is good. QEMU is a set of simulated processors written by Fabrice Bellard and the source code is distributed under the GPL license. Network tools such as behavioral networks are deployed in the virtual environment of QEMU. Behavioral network tools include strace, tcpdump and MIPS virtual machine detection points (MIPS behavioral sandbox). The full mode is to use the QEMU system mode to completely simulate the MIPS system, and the performance is relatively poor.

[0128] For example, the decompressed file to be detected is run in user mode, and the behavior of the decompressed file to be detected is detected to obtain dynamic behavior sequence information; if an exception occurs, the file to be detected is run in full mode, and the behavior of the decompressed file to be detected is detected to obtain dynamic behavior sequence information. Step S304 and step S305 are executed in no particular order.

[0129] S306: When the shelling rule is inconsistent with the preset rule or the file to be detected is not a shelled file, static analysis is performed on the file to be detected to extract static information of the file to be detected;

[0130] For example, when it is detected that the file to be detected is not packed or an unknown packer is detected, the file to be detected is directly analyzed using a static analysis tool to obtain at least one of the character string, function name, symbol table and set format information of the file to be detected.

[0131] The unknown packer is a packer rule that does not belong to Aspack, Pecompact, and UPX, or a packer rule that cannot be recognized.

[0132] S307, inputting the file to be detected into a preset behavior detection module for execution, and detecting the behavior of the file to be detected to obtain dynamic behavior sequence information;

[0133] For example, when the shelling rule is inconsistent with the preset rule or the file to be detected is not a shelled file, the file to be detected is input into the MIPS behavioral sandbox for operation, wherein the MIPS behavioral sandbox includes two modes: user mode and full mode. The user mode is to use QEMU to simulate the execution of the MIPS instruction set under the X86 platform, and the performance is better. QEMU is a set of simulated processors written by Fabrice Bellard and distributed with source code under the GPL license. Network tools such as behavioral networks are deployed in the virtual environment of QEMU, such as strace or tcpdump. The full mode is to use the QEMU system mode to completely simulate the MIPS system, and the performance is relatively poor.

[0134] For example, the file to be detected is run in user mode, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information; if an exception occurs, the file to be detected is run in full mode, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information. Step S306 and step S307 are executed in no particular order.

[0135] S308: Perform a comprehensive detection on the file to be detected based on the static information, the dynamic behavior sequence information and the preset Trojan rule library to determine that the file to be detected is a malicious file.

[0136] The preset Trojan rule library may include at least one of static rules, dynamic rules and X86 popular Trojan rules, wherein the static rules include Yara rules.

[0137] For example, a comprehensive judgment is made on the file to be detected by combining static information, dynamic behavior sequence information, X86 popular Trojan rules and Yara rules to determine whether the file to be detected is a malicious file.

[0138] For example, when the static information of the file to be detected hits the static rule, the file to be detected is determined to be a malicious file and its attribute is black;

[0139] If the dynamic behavior sequence information of the file to be detected hits the dynamic rule, the file to be detected is determined to be a malicious file and its attribute is black.

[0140] If one of the dynamic behavior sequence information and the static information of the file to be detected matches the X86 popular rule, the file to be detected is determined to be a malicious file and its attribute is black;

[0141] When neither the static information nor the dynamic behavior sequence information of the file to be detected matches the above rules, the file to be detected is determined to be a non-malicious file and its attribute is gray;

[0142] When the static information and dynamic behavior sequence information of the file to be detected hit the white file rule, the file to be detected is determined to be a non-malicious file and its attribute is white.

[0143] When the file to be detected is determined to be a malicious file, a detection feature is automatically generated based on the static information, and the feature is added to the anti-virus engine. The virus library is searched for a detection tool corresponding to the detection feature, and the malicious file is detected and killed using the corresponding detection tool.

[0144] Of course, identification information can also be generated according to the attributes (black, white, gray) of the above-mentioned file to be detected, and the identification information is, for example, a hash value, and then the identification information is associated with the file to be detected and stored in the server. When the file to be detected appears on other terminals, the attributes of the file to be detected can be easily obtained by query, which improves processing efficiency and further improves security.

[0145] As can be seen from the above, when the embodiment of the present invention determines that the file to be detected is a MIPS platform file, it determines whether the file to be detected is a shelled file. When the file to be detected is a shelled file, the shelling rule corresponding to the shelled file is obtained; when the shelling rule is consistent with the preset rule, the shelling rule corresponding to the preset rule is used to perform shelling processing on the file to be detected; static analysis is performed on the file to be detected after the shelling processing; the file to be detected after the shelling processing is input into the preset behavior detection module for operation, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information; when the shelling rule is inconsistent with the preset rule or the file to be detected is not a shelled file ... obtained; When the file to be detected is not packed, static analysis is performed on the file to be detected to extract static information of the file to be detected; the file to be detected is input into a preset behavior detection module for operation, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information; the file to be detected is comprehensively detected according to the static information, the dynamic behavior sequence information and a preset Trojan rule library to determine that the file to be detected is a malicious file; since malicious identification can be performed on packed and unpacked MIPS platform files at the same time, the completeness rate of malicious files is improved, missed detection is avoided, and the accuracy of detection and the security of the system are further improved.

[0146] In a specific embodiment, if Figure 5 As shown, the specific process of the method for processing malicious files in the embodiment of the present invention is as follows:

[0147] When it is determined that the file to be detected is a MIPS platform file, the shell removal and decompression module 21 first performs shell identification 211 on the file to be detected to determine whether the file to be detected is shelled. If it is determined to be shelled, the compression format is detected 212 to determine whether the compression format is one of Aspack, Pecompact, and UPX. When the compression format is detected to be UPX, the file to be detected is decompressed 213 using the decompression method corresponding to UPX, and the decompressed file is respectively input into the static analysis module 22 and the dynamic analysis sandbox 23.

[0148] If it is determined that no shell is added or an unknown shell is detected, the file to be detected is directly input to the static analysis module 22 and the dynamic analysis sandbox 23.

[0149] The static analysis module 22 can use a static detection tool to perform static analysis on the above-mentioned decompressed file or the file to be detected, so as to obtain static information 221 of the file to be detected, and the static information 221 includes at least one of a string, a function name, a symbol table, and ELF structure information. The static analysis module 22 is also provided with a static rule base 222, and the static rule base 222 is provided with a variety of static rules, such as public intelligence rules, artificial experience rules, and automatic extraction rules.

[0150] The dynamic analysis sandbox 23 performs dynamic behavior detection 231 on the above-mentioned decompressed file or the file to be detected, for example, a MIPS virtual machine detection point can be used to detect the dynamic behavior, and the above-mentioned file can be run to obtain a dynamic behavior sequence 232. The dynamic behavior sequence 232 is generated according to the execution flow, network connection, function call, and process call information of the file to be detected. The dynamic analysis sandbox 23 is also provided with dynamic identification rules 233. The dynamic identification rules 233 include, for example, artificial experience rules.

[0151] Among them, X86 behavior rule library 24, also known as the behavior sequence library of popular malware on the X86 platform, is obtained by obtaining the behavior sequence library of popular malware categories in the X86 platform sandbox, specifically by learning the behavior of popular Linux malware under the x86 platform to generate the popular sequence library. Since the same family of malware codes are cross-compiled to generate X86 platform files and MIPS platform files, although the two files belong to different platforms, they are of the same source, so their malicious behaviors are also consistent. Therefore, the behavior sequence library of popular malware on the X86 platform can also be applied to detect malicious files on the MIPS platform.

[0152] The static information 221, dynamic behavior sequence 232, static rule base 222, dynamic identification rule 233, and X86 behavior rule base 24 are input into the summary detection unit 25 to confirm whether the above-mentioned file to be detected is a malicious file.

[0153] For example, when the static information of the file to be detected hits the static rule library, the file to be detected is determined to be a malicious file with a black attribute; when the dynamic behavior sequence of the file to be detected hits the dynamic identification rule, the file to be detected is determined to be a malicious file with a black attribute; when one of the dynamic behavior sequence and the static information of the file to be detected hits the X86 popular rule library, the file to be detected is determined to be a malicious file with a black attribute; when both the static information and the dynamic behavior sequence of the file to be detected do not hit the above rules, the file to be detected is determined to be a non-malicious file with a gray attribute; when the static information and the dynamic behavior sequence of the file to be detected hit the white file rule, the file to be detected is determined to be a non-malicious file with a white attribute.

[0154] In order to better implement the above method, the embodiment of the present application further provides a malicious file processing device, which can be integrated in an electronic device, such as a terminal, a server, a personal computer, etc. For example, in this embodiment, the method of the embodiment of the present invention is described in detail by taking the malicious file processing device integrated in the server as an example.

[0155] For example, Figure 6 As shown, the malicious file processing device may include a static information acquisition module 31, a dynamic information acquisition module 32 and a malicious file determination module 33 as follows:

[0156] (I) The static information acquisition module 31 is used to perform static analysis on the file to be detected and extract static information of the file to be detected when it is determined that the file to be detected is a set platform file.

[0157] In one embodiment, if Figure 7 As shown, when the file to be detected is a shelled file, the malicious file processing device further includes a rule acquisition module 34 and a shell removal processing module 35.

[0158] The rule acquisition module 34 is used to acquire the shell rules corresponding to the shell file.

[0159] The shell removal processing module 35 is used to use the shell removal rule corresponding to the preset rule to perform shell removal processing on the file to be detected when the shell addition rule is consistent with the preset rule.

[0160] The static information acquisition module 31 is also used to perform static analysis on the unpacked file to be detected; when the packing rule is inconsistent with the preset rule, the step of performing static analysis on the unpacked file to be detected is executed.

[0161] In one implementation, the static information acquisition module 31 further includes: a shell determination unit 311 .

[0162] The shell determination unit 311 is used to determine that the file to be detected is a shell file when the attribute information of the file to be detected is consistent with the preset attribute; and when the attribute information is inconsistent with the preset attribute, obtain the information entropy of the file to be detected; when the information entropy is greater than a preset threshold, determine that the file to be detected is a shell file.

[0163] In one implementation, the static information acquisition module 31 further includes: a parsing unit 312 and a format determination unit 313 .

[0164] The parsing unit 312 is used to parse the file to be detected according to the preset format and obtain the format information of the file to be detected when the file header information of the file to be detected is consistent with the preset file header;

[0165] The format determination unit 313 is configured to determine that the file to be detected is a set platform file when the format information obtained by the parsing unit is the same as the preset format.

[0166] The static information may include at least one of a character string, a function name, a symbol table, and setting format information.

[0167] (ii) The dynamic information acquisition module 32 is used to input the file to be detected into a preset behavior detection module for operation, and detect the behavior of the file to be detected to obtain dynamic behavior sequence information.

[0168] In one embodiment, the dynamic information acquisition module 32 may also be used to input the unpacked file to be detected into a preset behavior detection module for execution.

[0169] In one embodiment, the preset behavior detection module includes a first preset detection mode and a second preset detection mode; the dynamic information acquisition module 32 is specifically used to: run the file to be detected in the first preset detection mode; if an abnormality occurs, run the file to be detected in the second preset detection mode.

[0170] (III) A malicious file determination module 33 is used to perform a comprehensive detection on the file to be detected based on the static information, the dynamic behavior sequence information and the preset Trojan rule library to determine that the file to be detected is a malicious file.

[0171] The malicious file determination module 33 is specifically used to determine that the file to be detected is a malicious file when the static information and / or the dynamic behavior sequence information matches the characteristic information of a Trojan rule in the preset Trojan rule library; and when the static information and / or the dynamic behavior sequence information does not match the characteristic information of any Trojan rule in the preset Trojan rule library, determine that the file to be detected is not a malicious file.

[0172] In another embodiment, if Figure 8As shown, the device may further include: an information generating module 36 and a storage module 37.

[0173] An information generating module 36 is used to generate identification information of the file to be detected;

[0174] The storage module 37 is used to associate the identification information with the malicious file and then store them.

[0175] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0176] As can be seen from the above, when the malicious file processing device of the embodiment of the present invention determines that the file to be detected is a set platform file, the static information acquisition module performs static analysis on the file to be detected and extracts the static information of the file to be detected; the dynamic information acquisition module inputs the file to be detected into the preset behavior detection module for operation, and detects the behavior of the file to be detected to obtain dynamic behavior sequence information; then the malicious file determination module performs a comprehensive detection on the file to be detected based on the static information, dynamic behavior sequence information and the preset Trojan rule library to determine that the file to be detected is a malicious file. Since the set platform file can be used to identify malicious files, the scalability is improved; in addition, since the malicious files are identified by combining static information and dynamic behavior sequence information, the accuracy of detection is also improved.

[0177] The present application also provides an electronic device, such as Fig. 9 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0178] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input module 404. Those skilled in the art will appreciate that Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0179] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the electronic device and processes data, thereby performing overall detection of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0180] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0181] The electronic device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 403 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0182] The electronic device may further include an input module 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0183] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:

[0184] When it is determined that the file to be detected is a setting platform file, static analysis is performed on the file to be detected, and static information of the file to be detected is extracted;

[0185] The file to be detected is input into a preset behavior detection module for operation, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information;

[0186] The file to be detected is comprehensively detected based on the static information, the dynamic behavior sequence information and the preset Trojan rule library to determine whether the file to be detected is a malicious file.

[0187] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.

[0188] From the above, it can be seen that when the electronic device of this embodiment determines that the file to be detected is a set platform file, it performs static analysis on the file to be detected and extracts the static information of the file to be detected; the file to be detected is input into the preset behavior detection module for execution, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information; based on the static information, the dynamic behavior sequence information and the preset Trojan rule library, the file to be detected is comprehensively detected to determine that the file to be detected is a malicious file; since malicious files can be identified for the set platform files, the scalability is improved; in addition, since malicious files are identified by combining static information and dynamic behavior sequence information, the accuracy of detection is also improved.

[0189] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0190] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any malicious file processing method provided in the embodiment of the present application. For example, the instructions can execute the following steps:

[0191] When it is determined that the file to be detected is a setting platform file, static analysis is performed on the file to be detected, and static information of the file to be detected is extracted;

[0192] The file to be detected is input into a preset behavior detection module for operation, and the behavior of the file to be detected is detected to obtain dynamic behavior sequence information;

[0193] The file to be detected is comprehensively detected according to the static information, the dynamic behavior sequence information and a preset Trojan rule library to determine that the file to be detected is a malicious file.

[0194] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0195] Since the instructions stored in the storage medium can execute the steps in any malicious file processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any malicious file processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0196] The above is a detailed introduction to a malicious file processing method, device, electronic device and storage medium provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for processing malicious files, characterized in that: include: When it is determined that the file to be detected is a MIPS platform file, static analysis is performed on the file to be detected, and static information of the file to be detected is extracted; Input the file to be detected into a preset behavior detection module for execution, and detect the file to be detected by a first preset detection mode of the detection module to obtain a first detection result, wherein the first preset detection mode is to use QEMU to simulate the execution of a MIPS instruction set on an X86 platform; In the case where the first detection result indicates an abnormality, the file to be detected is detected by using a second preset detection mode of the detection module to obtain dynamic behavior sequence information of the file to be detected, wherein the second preset detection mode is to fully simulate the MIPS system using the QEMU system mode; Comprehensively detecting the file to be detected according to the static information, the dynamic behavior sequence information and a preset Trojan rule library including static rules, dynamic rules and X86 popular Trojan rules, so as to determine that the file to be detected is a malicious file, wherein the comprehensive detecting of the file to be detected according to the static information, the dynamic behavior sequence information and the preset Trojan rule library includes: when the static information hits the static rule, the file to be detected is determined to be a malicious file; when the dynamic behavior sequence information hits the dynamic rule, the file to be detected is determined to be a malicious file; when any one of the dynamic behavior sequence information and the static information hits the X86 popular Trojan rule, the file to be detected is determined to be a malicious file; when the static information and the dynamic behavior sequence information do not hit any rule in the preset Trojan rule library, the file to be detected is determined to be a non-malicious file; Generate identification information of the file to be detected; The identification information and the malicious file are associated and stored.

2. The method for processing malicious files according to claim 1, characterized in that: When the file to be detected is a packed file, before the step of statically analyzing the file to be detected, the method further includes: Obtaining the packing rules corresponding to the packing file; When the shelling rule is consistent with the preset rule, the shelling rule corresponding to the preset rule is used to perform shelling processing on the file to be detected; The step of performing static analysis on the file to be detected includes: performing static analysis on the file to be detected after de-shelling; The step of inputting the file to be detected into the preset behavior detection module for execution includes: inputting the unpacked file to be detected into the preset behavior detection module for execution; When the packing rule is inconsistent with the preset rule, the step of performing static analysis on the file to be detected is executed.

3. The method for processing malicious files according to claim 2, characterized in that: When the attribute information of the file to be detected is consistent with the preset attribute, it is determined that the file to be detected is a packed file; When the attribute information is inconsistent with the preset attribute, obtaining the information entropy of the file to be detected; When the information entropy is greater than a preset threshold, it is determined that the file to be detected is a packed file.

4. The method for processing malicious files according to claim 1, characterized in that: The step of determining that the file to be detected is a MIPS platform file comprises: When the file header information of the file to be detected is consistent with the preset file header, the file to be detected is parsed according to the preset format, and the format information of the file to be detected is obtained; When the format information is the same as the preset format, it is determined that the file to be detected is a MIPS platform file.

5. The method for processing malicious files according to claim 1, characterized in that: When the static information and / or the dynamic behavior sequence information matches the characteristic information of a Trojan rule in the preset Trojan rule library, determining that the file to be detected is a malicious file; When the static information and / or the dynamic behavior sequence information do not match the characteristic information of any Trojan rule in the preset Trojan rule library, it is determined that the file to be detected is not a malicious file.

6. The method for processing malicious files according to claim 1, characterized in that: The static information includes at least one of a character string, a function name, a symbol table, and setting format information.

7. A malicious file processing device, characterized in that: include: A static information acquisition module, used for, when determining that the file to be detected is a MIPS platform file, performing static analysis on the file to be detected and extracting static information of the file to be detected; A dynamic information acquisition module is used to input the file to be detected into a preset behavior detection module for operation, and detect the file to be detected through a first preset detection mode of the detection module to obtain a first detection result, wherein the first preset detection mode is to use QEMU to simulate the execution of the MIPS instruction set under the X86 platform; when the first detection result indicates an abnormality, the file to be detected is detected through a second preset detection mode of the detection module to obtain dynamic behavior sequence information of the file to be detected, wherein the second preset detection mode is to use the QEMU system mode to fully simulate the MIPS system; A malicious file determination module performs a comprehensive detection on the file to be detected according to the static information, the dynamic behavior sequence information and a preset Trojan rule library including static rules, dynamic rules and X86 popular Trojan rules, wherein the comprehensive detection on the file to be detected according to the static information, the dynamic behavior sequence information and the preset Trojan rule library includes: when the static information hits the static rule, the file to be detected is determined to be a malicious file; when the dynamic behavior sequence information hits the dynamic rule, the file to be detected is determined to be a malicious file; when any one of the dynamic behavior sequence information and the static information hits the X86 popular Trojan rule, the file to be detected is determined to be a malicious file; when the static information and the dynamic behavior sequence information do not hit any rule in the preset Trojan rule library, the file to be detected is determined to be a non-malicious file; The device is also used to generate identification information of the file to be detected; and store the identification information after establishing association with the malicious file.

8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store program codes, and when the electronic device is running, the processor is used to execute the program codes to execute the malicious file processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the malicious file processing method according to any one of claims 1 to 6.