A security defense method and device for electronic equipment with operating system

By monitoring and controlling the executable behavior in the electronic device directory folder, using folder types and control rules to intercept virus files, the problem of insufficient detection and defense capabilities of new viruses in the existing technology is solved, and more efficient viruses are achieved defense.

CN118690357BActive Publication Date: 2024-11-01BEIJING ANTIY NETWORK SAFETY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411164926.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-01
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

The existing antivirus methods are difficult to detect and intercept new families and new variant viruses, and the virus's ability to kill is improved, resulting in insufficient defense capabilities.

Method used

By monitoring the executable behavior in the local directory folder of the electronic device, determining the folder type and controlling its behavior according to preset control rules, intercepting the execution actions of virus files.

Benefits of technology

It effectively improves the defense capabilities of viruses, prevents unknown viruses from being started and executed, and protects the security of the system and data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690357B_ABST
    Figure CN118690357B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a security defense method and device for an electronic device with an operating system, which relates to the field of electronic device security technology and is invented to effectively improve the defense capability against viruses. The method comprises: monitoring the behavior of executables in each local directory folder of the electronic device; if a first executable is monitored to have a behavior, determining the folder where the first executable is located and the folder type of the folder; according to the folder type of the folder and the correspondence between the preset folder type and the control rule, determining the target control rule corresponding to the folder type; wherein the control rule in the correspondence between the folder type and the control rule is established according to the behavior characteristics of the executable in the folder; according to the target control rule, determining whether the first executable is allowed to perform the behavior. The present application is suitable for defending against viruses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic device security technology, and in particular to a security defense method, device, electronic device and readable storage medium for an electronic device with an operating system. Background Art

[0002] With the rapid development of the Internet, while people are enjoying the convenience brought by the Internet, it also brings security risks. The existing antivirus method can detect virus files through the virus database, but the current new families and new variants of viruses appear very quickly, resulting in the virus database being unable to detect unknown types of viruses. In addition, after the virus is launched, the virus attack behavior can be captured and intercepted through active defense capabilities, but with the emergence of vulnerability exploits, identity forgery, white file exploitation and other attack methods, the virus's ability to avoid killing has also increased, and the defense capability has also exposed certain deficiencies. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a security defense method, device, electronic device and readable storage medium for an electronic device with an operating system, which can effectively improve the defense capability against viruses.

[0004] In a first aspect, an embodiment of the present application provides a security defense method for an electronic device with an operating system, comprising: monitoring the behavior of executable bodies in each local directory folder of the electronic device; if a first executable body is monitored to have a behavior, determining the folder where the first executable body is located and the folder type of the folder; determining the target control rule corresponding to the folder type according to the folder type of the folder and the correspondence between the preset folder type and the control rule; wherein the control rule in the correspondence between the folder type and the control rule is established according to the behavior characteristics of the executable body in the folder; and determining whether the first executable body is allowed to perform the behavior according to the target control rule.

[0005] According to a specific implementation method of an embodiment of the present application, the monitoring of the behavior actions of the executable bodies in each local directory folder of the electronic device includes: monitoring the startup actions of the executable bodies in each local directory folder of the electronic device, and monitoring the execution actions of the executable bodies in each local directory folder of the electronic device after startup.

[0006] According to a specific implementation method of an embodiment of the present application, determining the folder type of the folder includes: reading the environment variables of the operating system, determining the folder type of the folder based on the environment variables, keywords of the file directory where the folder is located, and predefined folder tags; or, obtaining files of the same family of folder type from the same network environment, and determining the folder type of the folder based on the files of the same family of folder type.

[0007] According to a specific implementation method of an embodiment of the present application, the control rules include multiple control items, each control item corresponds to a control baseline, and each control baseline includes the following baseline attributes: executable type, operation mode, and execution behavior.

[0008] According to a specific implementation method of the embodiment of the present application, in the case where it is monitored that the first executable has a behavioral action, determining whether the first executable is allowed to perform the behavioral action according to the target control rule includes: judging whether the type of the first executable is an executable type allowed to run in the control baseline; if the type of the first executable is not an executable allowed to run in the control baseline, prohibiting the first executable from running; if the type of the first executable is an executable allowed to run in the control baseline, judging whether the running mode of the first executable is an running mode allowed in the control baseline; if the running mode of the first executable is an running mode allowed in the control baseline, allowing the first executable to run, and judging whether the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, otherwise prohibiting the first executable from running; if the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, allowing the first executable to execute the execution behavior, otherwise prohibiting the first executable from executing the execution behavior.

[0009] According to a specific implementation method of an embodiment of the present application, the folder types include at least one of the following: an operating system folder, an application software installation folder, a desktop folder, an installation folder, a document storage folder, a multimedia storage folder, a project file storage folder, a green tool storage folder, a sample storage folder and an undefined folder.

[0010] In a second aspect, an embodiment of the present application provides a security defense device for an electronic device with an operating system, comprising: a monitoring module, for monitoring the behavioral actions of executable bodies in each local directory folder of the electronic device; a first determination module, for determining the folder where the first executable body is located and the folder type of the folder if a behavioral action of the first executable body is monitored; a second determination module, for determining the target control rule corresponding to the folder type according to the folder type of the folder and the correspondence between the preset folder type and the control rule; wherein the control rule in the correspondence between the folder type and the control rule is established according to the behavioral characteristics of the executable body in the folder; and a third determination module, for determining whether the first executable body is allowed to perform the behavioral action according to the target control rule.

[0011] According to a specific implementation method of an embodiment of the present application, the monitoring module is specifically used to: monitor the startup actions of executable bodies in each local directory folder of the electronic device, and monitor the execution actions of executable bodies in each local directory folder of the electronic device after startup.

[0012] According to a specific implementation method of an embodiment of the present application, the first determination module is specifically used to: determine the folder type of the folder by reading the environment variables of the operating system based on the environment variables, the keywords of the file directory where the folder is located, and the predefined folder tags; or, obtain files of the same family of the folder type from the same network environment, and determine the folder type of the folder based on the files of the same family of the folder type.

[0013] According to a specific implementation method of an embodiment of the present application, the control rules include multiple control items, each control item corresponds to a control baseline, and each control baseline includes the following baseline attributes: executable type, operation mode, and execution behavior.

[0014] According to a specific implementation method of the embodiment of the present application, the third determination module is specifically used to: when the monitoring module monitors that the first executable has a behavioral action, determine whether the type of the first executable is an executable type allowed to run in the control baseline; if the type of the first executable is not an executable allowed to run in the control baseline, prohibit the first executable from running; if the type of the first executable is an executable allowed to run in the control baseline, determine whether the running mode of the first executable is the running mode allowed in the control baseline; if the running mode of the first executable is the running mode allowed in the control baseline, allow the first executable to run, and determine whether the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, otherwise prohibit the first executable from running; if the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, allow the first executable to execute the execution behavior, otherwise prohibit the first executable from executing the execution behavior.

[0015] According to a specific implementation method of an embodiment of the present application, the folder types include at least one of the following: an operating system folder, an application software installation folder, a desktop folder, an installation folder, a document storage folder, a multimedia storage folder, a project file storage folder, a green tool storage folder, a sample storage folder and an undefined folder.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; a power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the security defense method for an electronic device with an operating system described in any of the aforementioned implementation methods.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the security defense method for an electronic device with an operating system as described in any of the aforementioned implementation methods.

[0018] The security defense method, device, electronic device and readable storage medium of the electronic device with an operating system of the present embodiment, if the first executable body is monitored to have a behavioral action, the folder where the first executable body is located and the folder type of the folder are determined, and the target control rule corresponding to the folder type is determined according to the folder type of the folder and the correspondence between the preset folder type and the control rule. The control rule in the correspondence between the folder type and the control rule is established according to the behavioral characteristics of the executable body in the folder. Finally, according to the target control rule, it is determined whether the first executable body is allowed to execute the behavioral action. The behavioral action of the first executable body is controlled through the target control rule, which is convenient for intercepting the behavioral action executed by the virus file and effectively improving the defense capability against viruses. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of a security defense method for an electronic device with an operating system provided in one embodiment of the present application;

[0021] Figure 2 A schematic diagram of the structure of a security defense device for an electronic device with an operating system provided in a specific embodiment of the present application;

[0022] Figure 3 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0023] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings. It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] In order to enable those skilled in the art to better understand the technical concept, implementation plan and beneficial effects of the embodiments of the present application, specific embodiments are described in detail below.

[0025] This application identifies the folder type and controls the behavior of executables in different types of folders based on the folder type and corresponding business requirements (such as the type of executable, the way the executable runs, and the execution behavior after startup), so that viruses cannot easily get the opportunity to execute. Even if the virus database and active defense capabilities cannot effectively defend against unknown viruses, the technical solution of this application can prevent the virus from starting or running, so that the virus cannot achieve its attack purpose and protect system and data security.

[0026] Figure 1 A flowchart of a security defense method for an electronic device with an operating system provided in an embodiment of the present application is shown in FIG. Figure 1 shown.

[0027] An operating system is a type of system software that manages a computer's hardware and software resources and provides a unified, systematic operating environment for computer programs.

[0028] Some electronic devices are equipped with operating systems, such as smart phones, computers, tablets, servers and other more complex electronic devices, which need to handle multiple tasks, manage multiple hardware resources, provide user interfaces, etc., so they are equipped with operating systems. These operating systems can manage the hardware resources of the device, provide a platform for programs to run, and allow users to interact with the device through a graphical interface or command line interface.

[0029] The security defense method of the electronic device with an operating system of this embodiment may include:

[0030] S101: Monitor the behavior of executable files in local directory folders of the electronic device.

[0031] A directory folder, also known as a directory or a folder, is a special file in a computer's file system that is used to store and organize other files and subfolders.

[0032] An executable file is a computer program that can be run directly by the operating system. An executable file has a specific file extension, such as ".exe" in Windows, and may have a more diverse extension in UNIX and Linux.

[0033] Behavioral actions may include a start action and an action performed after the start, namely an execution action.

[0034] S102: If it is monitored that the first executable has a behavior action, determine the folder where the first executable is located and the folder type of the folder.

[0035] One or more executable files are stored in a folder.

[0036] The folders include folders for storing operating system files, folders for storing application software installation files, folders for storing documents, etc. Correspondingly, the folder types are operating system file types, application software installation file types, and document file types.

[0037] S103. Determine a target control rule corresponding to the folder type according to the folder type of the folder and the correspondence between the preset folder type and the control rule.

[0038] In this embodiment, the control rules in the correspondence between the folder type and the control rules are established according to the behavior characteristics of the executables in the folder.

[0039] After a virus file enters a computer, it needs to store its own file in a local disk. When storing, it must be stored in a certain folder. Only after storage can it be run in the memory to achieve the attack target. Usually, the folders in the computer are divided into different types according to the different files stored or responsible for different businesses, and the files stored and executable in a folder have similar behavior actions. Therefore, in this embodiment, a control rule is established based on the behavior characteristics (behavior actions) of the executable body in the folder, and the control rule corresponding to the folder type where the first executable body is located is used to control the behavior actions executed by the first executable body, so as to facilitate interception of the behavior actions executed by the virus file, thereby improving the virus defense capability.

[0040] There are many ways to obtain the control rules, such as establishing them locally on the electronic device, downloading them from a server, or obtaining them from electronic devices in network neighbors on the same local area network.

[0041] S104: Determine whether to allow the first executable to execute the behavior action according to the target control rule.

[0042] If the first executable body is a virus, the behavior of the executable body can be intercepted through control rules.

[0043] In this embodiment, if it is monitored that the first executable has a behavioral action, the folder where the first executable is located and the folder type of the folder are determined, and the target control rule corresponding to the folder type is determined based on the folder type of the folder and the correspondence between the preset folder type and the control rule. The control rule in the correspondence between the folder type and the control rule is established based on the behavioral characteristics of the executable in the folder. Finally, based on the target control rule, it is determined whether the first executable is allowed to execute the behavioral action. Through the target control rule, the behavioral action of the first executable is controlled, which is convenient for intercepting the behavioral actions executed by virus files and effectively improving the defense capability against viruses.

[0044] In some examples, monitoring the behavior of executables in local directory folders of the electronic device in step S101 may include:

[0045] The startup action of the executable body in each local directory folder of the electronic device is monitored, and the execution action after the startup of the executable body in each local directory folder of the electronic device is monitored.

[0046] In some examples, determining the folder type of the folder in the above embodiment may include:

[0047] The folder type of the folder is determined by reading the environment variables of the operating system based on the environment variables, keywords of the file directory where the folder is located, and predefined folder tags.

[0048] The environment variable of the operating system is the location of a file, and the folder at the location is used to store specific files. For example, the environment variable of the operating system is a location on disk C, and the folder at the location stores operating system files. Therefore, the type of the folder at the location can be determined as the operating system folder type through the environment variable of the operating system.

[0049] The keyword of the file directory where the folder is located. For example, in Windows system, the file directory of the folder where the system files are located is C:\Windows, and the keyword is Windows. Through the keyword Windows, the type of the folder is determined to be an operating system folder type.

[0050] In the electronic device, each folder is pre-set with a folder label, for example, a folder storing green tools is labeled as a tool, a folder storing samples is labeled as a sample, and so on.

[0051] In this embodiment, the folder type can be determined comprehensively through environment variables, keywords of the file directory where the folder is located, and predefined folder tags. Even if one of the environment variables, keywords of the file directory where the folder is located, and predefined folder tags is tampered with, the folder type can be determined through the other two, so that the result can be more accurate.

[0052] In a specific example, based on determining the folder type of the folder through the environment variable, the folder type determined through the environment variable is further determined through the keywords of the file directory where the folder is located and the predefined folder tag.

[0053] In another specific example, the folder type of the folder is determined by the keyword of the file directory where the folder is located. On this basis, the folder type determined by the keyword is further determined by environment variables and predefined folder tags.

[0054] In some other examples, the folder type of a folder is determined by predefined folder tags, and on this basis, the folder type determined by the predefined folder tags is further determined by environment variables and keywords of the file directory where the folder is located.

[0055] It is understandable that the folder type can be determined by one or two of an environment variable, a keyword of the file directory where the folder is located, and a predefined folder tag.

[0056] In some examples, determining the folder type of the folder in the above embodiment may include:

[0057] A folder type family file is obtained from the same network environment, and a folder type of the folder is determined according to the folder type family file.

[0058] In this embodiment, the operating system, application software, etc. of the computer device in the same network environment as the electronic device are basically the same, so a folder type family file can be constructed in the same network environment, and the folder type of the folder can be determined through the folder type family file. In this way, the process of determining the folder type is faster and the result is more accurate.

[0059] The network environment may be a local area network. For example, the folder type of the folder where the first executable body is located in this embodiment is determined according to the file types of folders with the same name on other electronic devices in the same local area network.

[0060] In some examples, the folder types include at least one of the following: an operating system folder, an application software installation folder, a desktop folder, an installation folder, a document storage folder, a multimedia storage folder, a project file storage folder, a green tool storage folder, a sample storage folder, and an undefined folder.

[0061] In a specific example, the folder type, folder description, and file type determination criteria are shown in Table 1.

[0062]

[0063] For a custom directory folder, keywords are included in the custom directory settings, and the folder type can be determined by the keywords.

[0064] Table 1 gives examples of common folder types. This solution has the ability to customize folder types, and end users can customize folder name features and environment variable features.

[0065] The control rules include multiple control items, each of which corresponds to a control baseline. Each control baseline includes the following baseline attributes: executable type, operation mode, and executable behavior.

[0066] In some examples, the executable type includes at least one of the following: operating system files, hardware driver files, trusted software vendor driver files, files without valid signatures, non-system files, installed software program files, files belonging to non-installed software, files of any type, files in the format of an installation package and containing a legal signature, files other than files in the format of an installation package and containing a legal signature, and trusted tool files.

[0067] The running mode includes at least one of the following: call execution, manual run, execution in any mode, prohibition of any execution mode, execution by explore program, call through CMD or PowerShell, call execution by trusted program, and call execution by untrusted program.

[0068] Executable behaviors include at least one of the following: any behavior, writing files to the application installation directory folder, registry write operations, creating services and scheduled tasks, downloading files from the network, running other executable bodies in non-application folders, operating existing files in other folders, allowing trusted programs to operate, video files only allow trusted programs to operate, project files only allow trusted programs to operate, only allow operations on the user's own files and files within the trusted scope, access to the Internet requires manual confirmation, write operations to other directory folders, and execute executable bodies other than itself.

[0069] In a specific example, after the folder type is identified, management rules can be set for the executable type, operation mode, and executable behavior under each folder type to form a baseline for the folder type. Common folder types and baselines are shown in Table 2.

[0070]

[0071]

[0072]

[0073] Taking the folder type in Table 2 as an operating system folder as an example, the corresponding executable types in the control baseline include operating system files, hardware drivers, trusted software vendor driver files, files without valid signatures, and non-system files; the corresponding running modes include call execution, manual operation, and untrusted program operation, and the corresponding executable behaviors include arbitrary behaviors.

[0074] The control baseline, i.e., the control rules, corresponding to the operating system folder are to allow only operating system files, hardware drivers, and files determined by trusted software vendors. The running of files without valid signatures or non-system files, as well as the calling and execution of system files and trusted files are prohibited. Manual running and the running of untrusted programs are prohibited. For executables that are already running, any behavior of the executable is allowed.

[0075] The control scope of the defense method of this embodiment can cover all file types on the local disk, and can also control startup methods such as manual operation, startup item execution, other program calls, and startup using vulnerabilities, thereby effectively improving defense capabilities.

[0076] The control rules can be updated periodically, for example, all electronic devices in the same local area network are updated periodically. For example, when the control rules of an electronic device (such as electronic device A) in the same local area network are newer than the control rules of other electronic devices, the control rules of electronic device A are used to update the control rules of other electronic devices in the same local area network.

[0077] In some examples, step S104 includes: when it is monitored that the first executable has a behavior action, determining whether to allow the first executable to perform the behavior action according to the target control rule includes:

[0078] S104a. Determine whether the type of the first executable is an executable type that is allowed to run in the control baseline.

[0079] The control baseline in this embodiment is the control baseline in the target control rule, which specifies the types of executables that are allowed to run and the types of executables that are not allowed in the control baseline. Based on this, it can be determined whether the type of the first executable is the type of executable that is allowed to run in the control baseline.

[0080] If the folder type where the first executable is located is an operating system folder type, the executables in this folder type allow operating system files, hardware driver files, and trusted original manufacturer driver files. For these file types, they are allowed to run, while those without valid signatures or non-system files are prohibited from running.

[0081] S104b. If the type of the first executable is not an executable that is allowed to run in the control baseline, the first executable is prohibited from running.

[0082] S104c. If the type of the first executable is an executable that is allowed to run in the control baseline, determine whether the running mode of the first executable is the running mode allowed in the control baseline.

[0083] Taking the above operating system file type as an example, in the control baseline, the allowed operation modes include system files and trusted files, and the disallowed operation modes include manual operation and untrusted program operation.

[0084] S104d. If the operation mode of the first executable is an operation mode allowed in the control baseline, the first executable is allowed to run, and it is determined whether the execution behavior after the first executable is run is an execution behavior allowed in the control baseline. Otherwise, the first executable is prohibited from running.

[0085] S104e. If the execution behavior of the first executable after running is an execution behavior allowed in the control baseline, the first executable is allowed to execute the execution behavior; otherwise, the first executable is prohibited from executing the execution behavior.

[0086] Taking the above operating system file type as an example, in the control baseline, any execution behavior is allowed.

[0087] If the control baseline includes allowed execution behaviors such as writing files, and disallowed execution behaviors such as prohibiting operations on existing files in other directory folders, if the execution behavior after the first executable body is running is writing files, the first executable body is allowed to write files; if the execution behavior after the first executable body is running is operating other directory folders, the first executable body is prohibited from operating other directory folders.

[0088] In this embodiment, the type of the first executable body, the operation mode, and the execution behavior after the operation are comprehensively judged layer by layer, making it difficult for unknown viruses to get the opportunity to start or execute. Even if they are allowed to start, it is difficult for them to execute some execution behaviors, such as making malicious operations on other files and leaking data through the network or downloading other attack payloads, so that the attack cannot be carried out, thereby improving the defense capability against unknown viruses.

[0089] In some other examples, whether the first executable body is allowed to execute the behavior action may be determined by determining one or both of the type, operation mode, and execution behavior of the first executable body.

[0090] In a specific example, in a Viper attack, a user may download an application software containing a virus through a browser (the application software is forged and has no legal signature) and execute it after downloading. Since the virus is a new type of virus, the virus database cannot detect it, and the virus uses methods such as black-and-white execution and fileless attacks to make it difficult for conventional active defenses to detect.

[0091] Through the method of the embodiment of the present application, it is possible to identify that the browser downloads files to the "download file storage directory". According to the baseline set for the folder type, it is prohibited to run executable bodies without trusted signatures under the download file storage directory, so the virus cannot start to carry out damage.

[0092] In the present application, if it is monitored that the first executable has a behavioral action, the folder where the first executable is located and the folder type of the folder are determined, and the target control rule corresponding to the folder type is determined according to the folder type of the folder and the correspondence between the preset folder type and the control rule. The control rule in the correspondence between the folder type and the control rule is established according to the behavioral characteristics of the executable in the folder. Finally, according to the target control rule, it is determined whether the first executable is allowed to execute the behavioral action. The behavioral action of the first executable is controlled through the target control rule, which is convenient for intercepting the behavioral action executed by the virus file and effectively improving the defense capability against viruses. When monitoring the behavioral action of the executable, specifically, the startup action of the executable in each local directory folder of the electronic device can be monitored, and the execution action of the executable in each local directory folder of the electronic device after startup can be monitored. row monitoring. In order to make the determined folder type more accurate, the folder type of the folder can be determined by reading the environment variables of the operating system based on the environment variables, the keywords of the file directory where the folder is located, and the predefined folder tags. Alternatively, in order to conveniently determine the folder type, the folder type family files can be obtained from the same network environment, and the folder type of the folder can be determined based on the folder type family files. In some cases, the control baseline includes multiple control items, each control item corresponds to a control baseline, and each control baseline includes the following baseline attributes: executable type, operation mode, and execution behavior. On this basis, it is determined whether the type of the first executable is an executable type allowed to run in the control baseline. If the type of the first executable is not an executable allowed to run in the control baseline, the first executable is prohibited from running. If the type of the first executable is an executable that is allowed to run in the control baseline, then determine whether the running mode of the first executable is the running mode allowed in the control baseline. If the running mode of the first executable is the running mode allowed in the control baseline, then allow the first executable to run, and determine whether the execution behavior after the first executable runs is the execution behavior allowed in the control baseline. Otherwise, prohibit the first executable from running. If the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, then allow the first executable to execute the execution behavior. Otherwise, prohibit the first executable from executing the execution behavior. That is, comprehensively determine whether to prohibit the first executable from executing the above-mentioned behavior actions, so that unknown viruses are difficult to get the opportunity to start or execute. Even if they are allowed to start, it is difficult to execute some execution behaviors, such as it is difficult to perform malicious operations on other files and it is difficult to leak data or download other attack payloads through the network, so that the attack cannot be achieved, thereby improving the defense capability against unknown viruses. In addition,The folder types in this embodiment include at least one of the following: operating system folder, application software installation folder, desktop folder, installation folder, document storage folder, multimedia storage folder, project file storage folder, green tool storage folder, sample storage folder and undefined folder, so as to more comprehensively cover the folder types included in the electronic device and the executable bodies in the folder.

[0093] Figure 2 A schematic diagram of a security protection device for an electronic device with an operating system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the security defense device of an electronic device with an operating system provided in this embodiment includes: a monitoring module 11, which is used to monitor the behavioral actions of executable bodies in each local directory folder of the electronic device; a first determination module 12, which is used to determine the folder where the first executable body is located and the folder type of the folder if it is monitored that the first executable body has a behavioral action; a second determination module 13, which is used to determine the target control rule corresponding to the folder type according to the folder type of the folder and the correspondence between the preset folder type and the control rule; wherein the control rule in the correspondence between the folder type and the control rule is established according to the behavioral characteristics of the executable body in the folder; a third determination module 14, which is used to determine whether the first executable body is allowed to perform the behavioral action according to the target control rule.

[0094] The device of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.

[0095] The device of this embodiment, if monitoring the first executable body to have a behavioral action, determines the folder where the first executable body is located and the folder type of the folder, and determines the target control rule corresponding to the folder type according to the folder type of the folder and the preset correspondence between the folder type and the control rule. The control rule in the correspondence between the folder type and the control rule is established according to the behavioral characteristics of the executable body in the folder. Finally, according to the target control rule, it is determined whether the first executable body is allowed to execute the behavioral action. The behavioral action of the first executable body is controlled through the target control rule, which is convenient for intercepting the behavioral action executed by the virus file, and effectively improving the defense capability against viruses.

[0096] As an optional implementation, the monitoring module is specifically used to: monitor the startup action of the executable body in each local directory folder of the electronic device, and monitor the execution action of the executable body in each local directory folder of the electronic device after startup.

[0097] As an optional implementation, the first determination module is specifically used to: determine the folder type of the folder by reading the environment variables of the operating system based on the environment variables, the keywords of the file directory where the folder is located, and the predefined folder tags; or, obtain files of the same family of the folder type from the same network environment, and determine the folder type of the folder based on the files of the same family of the folder type.

[0098] As an optional implementation, the control rule includes multiple control items, each control item corresponds to a control baseline, and each control baseline includes the following baseline attributes: executable type, operation mode, and execution behavior.

[0099] As an optional implementation, the third determination module is specifically used to: when the monitoring module monitors that the first executable has a behavioral action, determine whether the type of the first executable is an executable type allowed to run in the control baseline; if the type of the first executable is not an executable allowed to run in the control baseline, prohibit the first executable from running; if the type of the first executable is an executable allowed to run in the control baseline, determine whether the running mode of the first executable is an running mode allowed in the control baseline; if the running mode of the first executable is an running mode allowed in the control baseline, allow the first executable to run, and determine whether the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, otherwise prohibit the first executable from running; if the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, allow the first executable to execute the execution behavior, otherwise prohibit the first executable from executing the execution behavior.

[0100] As an optional implementation, the folder types include at least one of the following: operating system folder, application software installation folder, desktop folder, installation folder, document storage folder, multimedia storage folder, project file storage folder, green tool storage folder, sample storage folder and undefined folder.

[0101] The device of the above embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0102] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 3As shown, it may include: a shell 61, a processor 62, a memory 63, a circuit board 64 and a power supply circuit 65, wherein the circuit board 64 is placed inside the space enclosed by the shell 61, and the processor 62 and the memory 63 are arranged on the circuit board 64; the power supply circuit 65 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 63 is used to store executable program codes; the processor 62 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 63, so as to execute any of the security defense methods provided in the aforementioned embodiments, and thus can also achieve corresponding beneficial technical effects, which have been described in detail in the previous text and will not be repeated here.

[0103] The above electronic devices exist in many forms, including but not limited to:

[0104] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, feature phones, and low-end phones.

[0105] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers and have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.

[0106] (3) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0107] (4) Other electronic devices with data interaction functions.

[0108] Correspondingly, an embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement any security defense method provided by the aforementioned embodiments, thereby also being able to achieve the corresponding technical effects, which have been described in detail above and will not be repeated here.

[0109] It should be noted that, in this article, relational terms such as target and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0110] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0111] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0112] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present application, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.

[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0114] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A security defense method for an electronic device having an operating system, It is characterized in that include: Monitor the behavior of executable files in local directories and folders of electronic devices; If it is monitored that the first executable has a behavior action, determining the folder where the first executable is located and the folder type of the folder; The determining of the folder type of the folder includes: determining the folder type of the folder based on the environment variables, the keywords of the file directory where the folder is located, and the predefined folder tag by reading the environment variables of the operating system; or obtaining files of the same family of the folder type from the same network environment, and determining the folder type of the folder according to the files of the same family of the folder type; According to the folder type of the folder and the correspondence between the preset folder type and the control rule, determine the target control rule corresponding to the folder type; wherein the control rule in the correspondence between the folder type and the control rule is established according to the behavior characteristics of the executable in the folder; wherein the control rule includes a plurality of control items, each control item corresponds to a control baseline, and each control baseline includes the following baseline attributes: executable type, operation mode, and execution behavior; Determining whether to allow the first executable to execute the behavior action according to the target control rule; In the case where it is monitored that the first executable body has a behavior action, determining whether to allow the first executable body to perform the behavior action according to the target control rule includes: Determine whether the type of the first executable is an executable type allowed to run in the control baseline; If the type of the first executable body is not an executable body allowed to run in the control baseline, prohibiting the first executable body from running; If the type of the first executable is an executable that is allowed to run in the control baseline, determining whether the running mode of the first executable is the running mode allowed in the control baseline; If the operation mode of the first executable body is an operation mode allowed in the control baseline, the first executable body is allowed to run, and it is determined whether the execution behavior after the first executable body runs is an execution behavior allowed in the control baseline; otherwise, the first executable body is prohibited from running; If the execution behavior of the first executable after running is an execution behavior allowed in the control baseline, the first executable is allowed to execute the execution behavior; otherwise, the first executable is prohibited from executing the execution behavior.

2. The security defense method according to claim 1, It is characterized in that The monitoring of the behavior of executables in local directory folders of the electronic device includes: The startup action of the executable body in each local directory folder of the electronic device is monitored, and the execution action after the startup of the executable body in each local directory folder of the electronic device is monitored.

3. The security defense method according to claim 1, It is characterized in that The folder types include at least one of the following: operating system folder, application software installation folder, desktop folder, installation folder, document storage folder, multimedia storage folder, project file storage folder, green tool storage folder, sample storage folder and undefined folder.

4. A security defense device for an electronic device having an operating system, It is characterized in that include: A monitoring module, used to monitor the behavior of executable files in local directory folders of the electronic device; The first determination module is used to determine the folder where the first executable body is located and the folder type of the folder if it is monitored that the first executable body has a behavior action; wherein the first determination module is specifically used to: determine the folder type of the folder based on the environment variables of the operating system, the keywords of the file directory where the folder is located, and the predefined folder tag; or obtain files of the same family of the folder type from the same network environment, and determine the folder type of the folder according to the files of the same family of the folder type; The second determination module is used to determine the target control rule corresponding to the folder type according to the folder type of the folder and the correspondence between the preset folder type and the control rule; wherein the control rule in the correspondence between the folder type and the control rule is established according to the behavioral characteristics of the executable in the folder; wherein the control rule includes a plurality of control items, each control item corresponds to a control baseline, and each control baseline includes the following baseline attributes: executable type, operation mode, and execution behavior A third determination module, configured to determine whether the first executable body is allowed to execute the behavior action according to the target control rule; The third determination module is specifically used for: when the monitoring module monitors that the first executable has a behavioral action, judging whether the type of the first executable is the type of executable allowed to run in the control baseline; if the type of the first executable is not the type of executable allowed to run in the control baseline, prohibiting the first executable from running; if the type of the first executable is the type of executable allowed to run in the control baseline, judging whether the running mode of the first executable is the running mode allowed in the control baseline; if the running mode of the first executable is the running mode allowed in the control baseline, allowing the first executable to run, and judging whether the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, otherwise prohibiting the first executable from running; if the execution behavior after the first executable runs is the execution behavior allowed in the control baseline, allowing the first executable to execute the execution behavior, otherwise prohibiting the first executable from executing the execution behavior.

5. The security defense device according to claim 4, It is characterized in that The monitoring module is specifically used for: The startup action of the executable body in each local directory folder of the electronic device is monitored, and the execution action after the startup of the executable body in each local directory folder of the electronic device is monitored.

6. An electronic device, It is characterized in that The electronic device comprises: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the security defense method described in any one of the preceding claims 1-3.