Vulnerability detection method and device, electronic equipment, storage medium and program product
By allowing users to customize writing vulnerability detection policies and running in restricted execution environments, combining regular expressions and cloud audits, the problems of high learning costs and limited use scenarios in the existing technology are solved, achieving more accurate and secure vulnerability detection.
Patent Information
- Application Number
- CN202411209769.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-15
AI Technical Summary
In the prior art, users need to learn the syntax rules provided by manufacturers to customize vulnerability detection strategies, which increases user learning costs, and due to the syntax rules, they cannot directly use some open source POCs, resulting in limited use scenarios.
Provides a vulnerability detection method that allows users to write vulnerability detection policy scripts in custom formats and languages, and runs in restricted execution environments. Ensure the legality and security of scripts through regular expressions and cloud audits, and record scanned data packets. To identify and correct misreport false alarms.
It improves the flexibility and convenience of vulnerability detection strategies, enhances the scanning performance of the scanner, ensures the security of the host system, and improves the accuracy and policy quality of vulnerability detection.
Smart Images

Figure CN118965374A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a vulnerability detection method, device, electronic device, non-volatile storage medium and computer program product. Background Art
[0002] Currently, when a host such as a server scans a product, it usually uses a scanning strategy regularly released by the manufacturer in order to enhance the scanning performance of the scanner and to discover new vulnerabilities.
[0003] In order to more accurately discover host vulnerabilities, related technologies support users to write vulnerability detection strategies according to the preset grammar rules of the products provided by the manufacturer, and integrate the written vulnerability detection strategies into the scanner. Although this method can improve the scanning performance of the scanner, it requires users to learn grammar rules, which increases the user's learning cost. In addition, due to the limitations of grammar rules, some open source POCs (Proof of Concept) cannot be used directly.
[0004] In view of this, enabling users to flexibly customize vulnerability detection strategies is a technical problem that technical personnel in this field need to solve.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The present application provides a vulnerability detection method, device, electronic device, non-volatile storage medium and computer program product, which enable users to flexibly customize vulnerability detection strategies.
[0007] In order to solve the above technical problems, this application provides the following technical solutions:
[0008] On the one hand, the present application provides a vulnerability detection method, including:
[0009] Pre-deploy scanners that automate the detection of security vulnerabilities in IT resources;
[0010] Pre-deployment of restricted execution environments for running untrusted or untrusted code;
[0011] When receiving a vulnerability detection policy script written by a user in a custom format and a custom language, verifying the legitimacy and validity of the vulnerability detection policy script;
[0012] When the vulnerability detection policy script is legal and valid, a preset policy scheduler is run in the restricted execution environment, the scanner is called based on scanning parameters to run the vulnerability detection policy script in the target policy, and the scanning data packet of the vulnerability detection policy script is recorded.
[0013] Exemplarily, the verifying the legitimacy and validity of the vulnerability detection policy script includes:
[0014] Perform matching analysis on the vulnerability detection policy script through regular expressions to determine whether the vulnerability detection policy script contains dangerous operations;
[0015] Run the vulnerability detection policy script to obtain the package information during the running of the vulnerability detection policy script; identify whether the vulnerability detection policy script has any dangerous operation according to the package information;
[0016] When the vulnerability detection policy script does not contain any dangerous operations, a scanner is called to perform an execution verification operation on the vulnerability detection policy script. Exemplarily, before the vulnerability detection policy script does not contain any dangerous operations, the method further includes:
[0017] When the vulnerability detection policy script cannot determine whether it contains dangerous operations, the vulnerability detection policy script is sent to the cloud to identify the dangerous operations of the vulnerability detection policy script in the cloud, and the vulnerability detection policy script containing the dangerous operations is corrected, and the corrected vulnerability detection policy script that does not contain dangerous operations is sent to the scanner.
[0018] Exemplarily, after recording the scanning data packet of the vulnerability detection policy script, the method further includes:
[0019] Acquire a sending data packet and a receiving data packet from the scanned data packet;
[0020] According to the sent data packet and the received data packet, identifying whether there is a phenomenon of missed reporting vulnerability or false reporting vulnerability;
[0021] If there is a phenomenon of missed vulnerability reporting or false vulnerability reporting, the vulnerability detection strategy script is corrected accordingly.
[0022] Exemplarily, after recording the scanning data packet of the vulnerability detection policy script, the method further includes:
[0023] When a repair request for the vulnerability detection policy script is received, in the restricted execution environment, the vulnerability detection policy script is repaired according to the scan data packet.
[0024] Exemplarily, the step of running a preset policy scheduler in the restricted execution environment and calling the scanner to run the vulnerability detection policy script in the target policy based on the scanning parameters includes:
[0025] When receiving a scanning task, obtain the target strategy, scanning parameters and preset strategy scheduler;
[0026] The preset policy scheduler is run in the restricted execution environment, and the vulnerability detection policy script is encapsulated; based on the scanning parameters, the scanner is called to run the encapsulated vulnerability detection policy script in the target policy, and the sending data packet and the receiving data packet are captured as the scanning data packet.
[0027] On the other hand, the present application provides a vulnerability detection device, comprising:
[0028] A pre-deployment module for pre-deploying a scanner for automated detection of security vulnerabilities in information technology resources; a pre-deployment of a restricted execution environment for running untrusted or untrusted code;
[0029] A policy verification module is used to verify the legitimacy and validity of a vulnerability detection policy script written by a user in a custom format and a custom language upon receiving the vulnerability detection policy script;
[0030] The policy running module is used to run the preset policy scheduler in the restricted execution environment when the vulnerability detection policy script is legal and valid, call the scanner to run the vulnerability detection policy script in the target policy based on the scanning parameters, and record the scanning data packet of the vulnerability detection policy script.
[0031] The present application also provides an electronic device, comprising a processor, wherein the processor is configured to implement the steps of the vulnerability detection method as described in any of the preceding items when executing a computer program stored in a memory.
[0032] The present application also provides a non-volatile storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vulnerability detection method as described in any of the preceding items are implemented.
[0033] Finally, the present application also provides a computer program product, including a computer program / instruction, which implements the steps of the vulnerability detection method as described in any of the preceding items when executed by a processor.
[0034] The advantage of the technical solution provided by this application is that it allows vulnerability detection policies in various formats and languages. Users can use the programming language they are familiar with to write policy scripts, which improves the flexibility and convenience of policy writing, provides better user experience, and is also conducive to the integration of open source POCs, making it more practical. In addition, the scanning performance of the scanner can be enhanced by policy scripts in multiple languages without limiting the format, which is conducive to more accurate discovery of host vulnerabilities; in order to ensure the security of the user-defined vulnerability detection policy script, the vulnerability detection policy script is placed in a restricted execution environment for operation, and the script is checked at the same time to ensure that it will not cause harm to the target, which is conducive to ensuring the security of the host system; further, the performance of the vulnerability detection policy script can be detected according to the recorded scanning data packet, and it is conducive to timely adjustment of the vulnerability detection policy script, improving the quality of the vulnerability detection policy script, and further improving the accuracy of host vulnerability detection.
[0035] In addition, the present application also provides corresponding implementation devices, electronic devices, non-volatile storage media and computer program products for the vulnerability detection method, which further makes the method more practical, and the devices, electronic devices, non-volatile storage media and computer program products have corresponding advantages.
[0036] The technical features mentioned above, the technical features to be mentioned below, and the technical features shown separately in the drawings can be combined with each other arbitrarily, as long as the combined technical features are not contradictory. All feasible feature combinations are technical contents clearly recorded in this application. Any of the multiple sub-features contained in the same sentence can be applied independently, and does not have to be applied together with other sub-features.
[0037] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. 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 any creative work.
[0039] FIG1 is a schematic diagram of a flow chart of a vulnerability detection method provided by the present application;
[0040] FIG2 is a flow chart of another vulnerability detection method provided by the present application;
[0041] FIG3 is a structural diagram of a specific implementation of the vulnerability detection device provided by the present application;
[0042] FIG. 4 is a structural diagram of a specific implementation of the electronic device provided in this application. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, the terms "first", "second", "third", "fourth", etc. in the specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations of the two are intended to cover non-exclusive inclusions. The term "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described here as "exemplary" is not necessarily interpreted as being superior or better than other embodiments.
[0044] In order to improve the detection accuracy of new vulnerabilities on servers and other hosts, manufacturers will provide users with grammatical rules that can be used to customize vulnerability detection policies. Users can write custom policies based on the corresponding grammatical rules. Related technologies allow the integration of vulnerability detection policies written by users through manufacturer-defined rules to improve the scanning performance of host scanners. However, users need to learn the manufacturer's grammatical rules, which increases the user's learning cost. Since custom-written policies are still limited by manufacturer rules, users' ability to express themselves is limited and their usage scenarios are limited. For example, some open POCs cannot be used directly.
[0045] In view of this, the present invention supports users to write their own strategies for asset identification and vulnerability detection in various languages and formats according to their own needs, and run customized vulnerability detection strategies in a restricted execution environment, so as to enable users to flexibly customize vulnerability detection strategies and ensure system security. After introducing the technical solution of the present application, various non-limiting implementation methods of the present application are described in detail below. In order to better illustrate the present application, numerous specific details are given in the specific implementation methods below. Those skilled in the art should understand that the present application can also be implemented without these specific details. In other examples, methods, means, components and circuits well known to technicians in the relevant field are not described in detail in order to highlight the main purpose of the present application.
[0046] First, refer to FIG. 1 , which is a flow chart of a vulnerability detection method provided by the present application. The present application may include the following contents:
[0047] S101: Pre-deploy a scanner that is used to automatically detect security vulnerabilities in information technology resources.
[0048] Among them, scanners are tools used to automatically detect security vulnerabilities in IT (Information Technology) resources such as computer systems, network equipment, and applications. IT resources include but are not limited to hardware resources, software resources, network resources, data resources, and other modern IT resources, such as cloud services, mobile devices, security, and identity management. Among them, hardware resources include but are not limited to hardware devices such as various servers, workstations, desktop computers / notebooks, printers, and scanners. Software resources include but are not limited to operating systems, middleware, application software, distributed environment software, tool software, and documents. Network resources include but are not limited to communication lines, network servers, network transmission media interconnection equipment, and network software. Data resources are all files, materials, and data involved in the production and management process of an enterprise.
[0049] S102: Pre-deploy a restricted execution environment for running untrusted or untrusted code.
[0050] In this step, the restricted execution environment is used to run untrusted or untrusted code to prevent the untrusted or untrusted code from causing harm to the system. In the present invention, the restricted execution environment runs the vulnerability detection strategy customized by the user, thereby preventing the system from suffering security risks, such as deleting the scanner background code, illegally accessing the scanner background, etc. The restricted execution environment can be, for example, a sandbox or a security sandbox.
[0051] S103: When receiving the vulnerability detection policy script written by the user in the custom format and custom language, the legality and validity of the vulnerability detection policy script are verified.
[0052] Among them, the vulnerability detection policy script of this step is used for asset identification and vulnerability detection rules and scripts. The user writes the strategy for asset identification and vulnerability detection according to his own needs. The strategy is also a plug-in, that is, a vulnerability detection policy script. The vulnerability detection policy script uploaded by the user is not restricted to any format, and can be written in any language. It can also be a binary executable program. Of course, the vulnerability detection policy script can also include its dependent packages, thereby providing users with a more convenient plug-in writing method. The legitimacy and validity verification of this step is to ensure that the plug-in script is safe for users. A legitimacy and validity verification method can be adopted, which does not affect the implementation of the present invention.
[0053] S104: When the vulnerability detection policy script is legal and valid, a preset policy scheduler is run in a restricted execution environment, a scanner is called based on scanning parameters to run the vulnerability detection policy script in a target policy, and a scanning data packet of the vulnerability detection policy script is recorded.
[0054] In order to ensure the security of the entire host system and avoid introducing system security issues due to the introduction of external files, the detection behavior of the user-defined vulnerability detection policy script may cause certain harm to the target, so it is necessary to ensure that the vulnerability detection policy script has no destructive behavior. Based on this, in order to ensure the security of the uploaded vulnerability detection policy script, this step will run the vulnerability detection policy script in a restricted execution environment, and at the same time, some mechanisms, namely the target policy of this step, will be used to check the script to ensure that it will not cause harm to the target. The system will capture packets, that is, scan data packets, for subsequent users to confirm whether there are missed reports or false alarms, and to correct the vulnerability detection policy script.
[0055] In the technical solution provided in this application, vulnerability detection policies in various formats and languages are allowed. Users can use the programming language they are familiar with to write policy scripts, which improves the flexibility and convenience of policy writing, provides better user experience, and is also conducive to the integration of open source POCs, making them more practical. In addition, the scanning performance of the scanner can be enhanced by policy scripts in multiple languages without limiting the format, which is conducive to more accurate discovery of host vulnerabilities; in order to ensure the security of the user-defined vulnerability detection policy script, the vulnerability detection policy script is placed in a restricted execution environment for operation, and the script is checked at the same time to ensure that it does not cause harm to the target, which is conducive to ensuring the security of the host system; further, the performance of the vulnerability detection policy script can be detected according to the recorded scanning data packet, and it is conducive to timely adjustment of the vulnerability detection policy script, improving the quality of the vulnerability detection policy script, and further improving the accuracy of host vulnerability detection.
[0056] In the above embodiment, there is no limitation on how to verify the legitimacy and validity of the vulnerability detection policy script. The present invention also provides an exemplary implementation method for verifying the legitimacy and validity of the vulnerability detection policy script, which may include the following contents:
[0057] The vulnerability detection policy script is matched and analyzed through regular expressions to determine whether there are dangerous operations in the vulnerability detection policy script; the vulnerability detection policy script is run to obtain the package information during the running of the vulnerability detection policy script; according to the package information, it is identified whether there are dangerous operations in the vulnerability detection policy script; when there are no dangerous operations in the vulnerability detection policy script, the scanner is called to perform execution verification operations on the vulnerability detection policy script. In this embodiment, regular matching can be used to analyze whether there are dangerous operations, and the legitimacy of the vulnerability detection policy script can be verified by running the script to analyze whether there are dangerous operations in the package. The validity of the vulnerability detection policy script is verified using the validity verification function of the scanner. If the above method still cannot determine whether there are dangerous operations in the vulnerability detection policy script, the script that is difficult to assess the harmfulness can be uploaded to the cloud for review by manual or artificial intelligence algorithms or big data algorithms, where the cloud refers to services that are internally accessible and placed on the public network. That is, when the vulnerability detection policy script cannot determine whether it contains dangerous operations, the vulnerability detection policy script will be sent to the cloud to identify the dangerous operations of the vulnerability detection policy script in the cloud, and the vulnerability detection policy script containing dangerous operations will be corrected, and the corrected vulnerability detection policy script that does not contain dangerous operations will be sent to the scanner.
[0058] As can be seen from the above, this embodiment can effectively detect whether the vulnerability detection policy script has dangerous operations and ensure the security of the host by performing regular matching analysis on the vulnerability detection policy script and cooperating with cloud audit.
[0059] In order to further improve the accuracy of the vulnerability detection policy script, based on the above embodiment, the present invention also provides an implementation method for adjusting the vulnerability detection policy script, which may include the following contents:
[0060] Obtain the sending data packet and the receiving data packet from the scanned data packet; identify whether there is a phenomenon of missed report vulnerability or false alarm vulnerability according to the sending data packet and the receiving data packet; if there is a phenomenon of missed report vulnerability or false alarm vulnerability, perform corresponding correction processing on the vulnerability detection policy script.
[0061] In this embodiment, the scanning data packet at least includes the sending data packet and receiving data packet during the operation process, and the sending data packet and the receiving data packet are used to determine whether there are any missed reports or false alarms. If so, automatic corrections are performed based on the missed reports or false alarms. Of course, the system will feed back the scanning data packet, that is, the result of each detection, to the user. The user can determine whether there are any missed reports or false alarms by checking the sent and received data packets, and then correct the vulnerability detection policy script. Furthermore, the data packet can also be used as a test after the policy is repaired, that is, when a repair request for the vulnerability detection policy script is received, the vulnerability detection policy script is repaired in a restricted execution environment according to the scanning data packet.
[0062] It can be seen from the above that the present invention can effectively improve the accuracy of the vulnerability detection policy script by correcting and repairing the vulnerability detection policy script, which is beneficial to improving the accuracy of host vulnerability detection.
[0063] The above embodiment does not limit how to run the vulnerability detection policy script in a restricted execution environment. Based on the above embodiment, the present invention also provides an exemplary implementation method, which may include the following content:
[0064] When a scanning task is received, the target policy, scanning parameters and preset policy scheduler are obtained; the preset policy scheduler is run in a restricted execution environment, and the vulnerability detection policy script is encapsulated; based on the scanning parameters, the scanner is called to run the encapsulated vulnerability detection policy script in the target policy, and the sending data packets and the receiving data packets are captured as scanning data packets.
[0065] After confirming the validity of the vulnerability detection policy script, you can issue a host scanning task, which includes scanning parameters. The scanning parameters include but are not limited to IP addresses, port information, protocol information, and services. The user specifies the target policy and policy scheduler. Based on the asset results, it communicates with the engine in the restricted execution environment. The restricted execution environment runs the policy scheduler. After receiving the scanning parameters, the host scanning policy can be called. The script will be encapsulated inside the restricted execution environment, and the sent and received data packets will be captured and stored.
[0066] In order to make the technical solution of the present invention more clearly understood by those skilled in the art, the present invention further provides an exemplary embodiment. The restricted execution environment of this embodiment is a sandbox, which may include the following contents:
[0067] Import a custom vulnerability detection policy script in any language or format into the scanner. Check the legitimacy of the vulnerability detection policy script. If the security of the vulnerability detection policy script cannot be effectively evaluated, the user can choose to upload it to the cloud. After the vulnerability detection policy script is uploaded to the cloud, it can be evaluated using the large model inside the cloud, or it can be further evaluated manually. After verifying the legitimacy of the vulnerability detection policy script, the user can execute and verify the vulnerability detection policy script on the scanner to confirm the validity of the vulnerability detection policy script. After the user confirms the validity of the vulnerability detection policy script, the host scanning task can be issued, and the scanning can be performed after specifying the selected policy. The policy scheduler runs in the sandbox, and the host scanning policy can be called after receiving the scanning parameters. The sandbox will encapsulate the script, capture the sent and received data packets, store the data packets, and clearly inform the user so that the user can correct and repair the vulnerability detection policy script.
[0068] As can be seen from the above, this embodiment uses the extensive development environment integrated in the sandbox to allow users to write policy scripts in their own familiar programming languages, and can also easily integrate open source policy scripts. By accurately recording and displaying the sending and receiving data packets of the custom policy, the user can perform a secondary confirmation, which provides the user with feedback on the effectiveness of the policy from a mechanism perspective, and can effectively improve the quality of the custom policy, thereby achieving flexibility and security in the writing of vulnerability detection policy scripts.
[0069] It should be noted that there is no strict order of execution between the steps in the present application. As long as they conform to the logical order, these steps can be executed simultaneously or in a preset order. Figures 1 and 2 are only a schematic diagram and do not mean that this is the only execution order.
[0070] The present application also provides a corresponding device for the vulnerability detection method, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware. The vulnerability detection device provided by the present application is introduced below. The device is used to implement the vulnerability detection method provided by the present application. In this embodiment, the vulnerability detection device may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete the vulnerability detection method disclosed in Example 1. The program module referred to in this application refers to a series of computer program instruction segments that can perform specific functions, which is more suitable for describing the execution process of the vulnerability detection device in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The vulnerability detection device described below and the vulnerability detection method described above can be referenced to each other.
[0071] From the perspective of functional modules, see FIG3 , which is a structural diagram of a vulnerability detection device provided by the present application in a specific implementation manner. The device may include:
[0072] The pre-deployment module 301 is used to pre-deploy a scanner used as an automated detection tool for information technology resource security vulnerabilities; and to pre-deploy a restricted execution environment for running untrusted or untrusted code.
[0073] The policy verification module 302 is used to verify the legality and validity of the vulnerability detection policy script when receiving the vulnerability detection policy script written by the user in a custom format and a custom language.
[0074] The policy running module 303 is used to run the preset policy scheduler in a restricted execution environment when the vulnerability detection policy script is legal and valid, call the scanner to run the vulnerability detection policy script in the target policy based on the scanning parameters, and record the scanning data packet of the vulnerability detection policy script.
[0075] Optionally, in some implementations of the present embodiment, the above-mentioned policy verification module 302 can also be further used for: matching and analyzing the vulnerability detection policy script through regular expressions to determine whether the vulnerability detection policy script contains dangerous operations; running the vulnerability detection policy script to obtain the package information during the running of the vulnerability detection policy script; identifying whether the vulnerability detection policy script contains dangerous operations based on the package information; when the vulnerability detection policy script does not contain dangerous operations, calling the scanner to perform execution verification operations on the vulnerability detection policy script. As an exemplary implementation of the above-mentioned embodiment, the above-mentioned policy verification module 302 can also be further used for: when the vulnerability detection policy script cannot determine whether it contains dangerous operations, the vulnerability detection policy script is sent to the cloud to identify the dangerous operations of the vulnerability detection policy script in the cloud, and the vulnerability detection policy script containing dangerous operations is corrected, and the corrected vulnerability detection policy script that does not contain dangerous operations is sent to the scanner.
[0076] Optionally, in some other implementations of the present embodiment, the above-mentioned device may also include a policy correction module, which is further used to: obtain sending data packets and receiving data packets from scanning data packets; identify whether there is a phenomenon of missed vulnerability or false alarm vulnerability based on the sending data packets and the receiving data packets; if there is a phenomenon of missed vulnerability or false alarm vulnerability, perform corresponding correction processing on the vulnerability detection policy script.
[0077] Optionally, in some other implementations of this embodiment, the above-mentioned device may also include a policy correction module, which is further used to: when a repair request for a vulnerability detection policy script is received, repair the vulnerability detection policy script according to the scan data packet in a restricted execution environment.
[0078] Optionally, in some other implementations of this embodiment, the above-mentioned policy execution module 303 can be further used to: when a scanning task is received, obtain the target policy, scanning parameters and preset policy scheduler; run the preset policy scheduler in a restricted execution environment, and encapsulate the vulnerability detection policy script; call the scanner based on the scanning parameters to run the encapsulated vulnerability detection policy script in the target policy, and capture the sent data packets and the received data packets as scanning data packets.
[0079] The functions of each functional module of the vulnerability detection device of the present application can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0080] It can be seen from the above that this embodiment can effectively improve the flexibility and security of vulnerability detection policy script writing.
[0081] The vulnerability detection device mentioned above is described from the perspective of functional modules. Furthermore, the present application also provides an electronic device, which is described from the perspective of hardware. FIG4 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application under one implementation. As shown in FIG4 , the electronic device includes a memory 40 for storing a computer program; a processor 41 for implementing the steps of the vulnerability detection method mentioned in any of the above embodiments when executing the computer program.
[0082] Among them, the processor 41 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 41 may also be a controller, a microcontroller, a microprocessor or other data processing chip. The processor 41 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 41 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 41 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 41 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0083] The memory 40 may include one or more computer-readable storage media, which may be non-transitory. The memory 40 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the memory 40 may be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 40 may also be an external storage device of an electronic device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. Further, the memory 40 may also include both an internal storage unit of an electronic device and an external storage device. The memory 40 may not only be used to store application software and various types of data installed in the electronic device, such as: the code of the program in the process of executing the vulnerability detection method, etc., but also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 40 is at least used to store the following computer program 401, wherein, after the computer program is loaded and executed by the processor 41, the relevant steps of the vulnerability detection method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 40 may also include an operating system 402 and data 403, and the storage method may be temporary storage or permanent storage. The operating system 402 may include Windows, Unix, Linux, etc. The data 403 may include, but is not limited to, data corresponding to the vulnerability detection result.
[0084] In some embodiments, the electronic device may further include a display screen 42, an input / output interface 43, a communication interface 44 or a network interface, a power supply 45 and a communication bus 46. Among them, the display screen 42 and the input / output interface 43, such as a keyboard, belong to the user interface, and the optional user interface may also include a standard wired interface, a wireless interface, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 44 may optionally include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, etc., which is generally used to establish a communication connection between the electronic device and other electronic devices. The communication bus 46 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG4 shows only one thick line, but this does not mean that there is only one bus or one type of bus.
[0085] Those skilled in the art will appreciate that the structure shown in FIG. 4 does not limit the electronic device and may include more or fewer components than shown in the figure, for example, may also include a sensor 47 for implementing various functions.
[0086] It is understandable that if the vulnerability detection method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes but is not limited to: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes. Based on this, the present invention also provides a non-volatile storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of vulnerability detection recorded in any of the above embodiments are performed.
[0087] It is understandable that if the vulnerability detection method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, the computer software product does not need to be stored in a physical storage medium. For example, it can be directly transmitted to a computer or other device with information processing capabilities through a wired network or a wireless network to perform all or part of the steps of the methods of each embodiment of the present invention. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product. Based on this, the present invention also provides a computer program product that stores a computer program. When the computer program is executed by a processor, the vulnerability detection steps recorded in any of the above embodiments are performed.
[0088] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the hardware disclosed in the embodiments, including devices and electronic devices, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.
[0089] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0090] The above is a detailed introduction to a vulnerability detection method, device, electronic device, non-volatile storage medium and computer program product provided by the present application. This article uses specific examples 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. It should be pointed out that based on the embodiments in the present application, for ordinary technicians in this technical field, all other embodiments obtained without creative work are within the scope of protection of the present application. Without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A vulnerability detection method, characterized in that: include: Pre-deploy scanners that automate the detection of security vulnerabilities in IT resources; Pre-deployment of restricted execution environments for running untrusted or untrusted code; When receiving a vulnerability detection policy script written by a user in a custom format and a custom language, verifying the legitimacy and validity of the vulnerability detection policy script; When the vulnerability detection policy script is legal and valid, a preset policy scheduler is run in the restricted execution environment, the scanner is called based on scanning parameters to run the vulnerability detection policy script in the target policy, and the scanning data packet of the vulnerability detection policy script is recorded.
2. The vulnerability detection method according to claim 1, characterized in that: The verification of the legitimacy and validity of the vulnerability detection strategy script includes: Perform matching analysis on the vulnerability detection policy script through regular expressions to determine whether the vulnerability detection policy script contains dangerous operations; Run the vulnerability detection policy script to obtain the package sending information during the running of the vulnerability detection policy script; Identify whether the vulnerability detection policy script has any dangerous operation according to the package sending information; When there is no dangerous operation in the vulnerability detection policy script, the scanner is called to perform an execution verification operation on the vulnerability detection policy script.
3. The vulnerability detection method according to claim 2, characterized in that: Before the vulnerability detection policy script does not have any dangerous operations, it also includes: When the vulnerability detection policy script cannot determine whether it contains dangerous operations, the vulnerability detection policy script is sent to the cloud to identify the dangerous operations of the vulnerability detection policy script in the cloud, and the vulnerability detection policy script containing the dangerous operations is corrected, and the corrected vulnerability detection policy script that does not contain dangerous operations is sent to the scanner.
4. The vulnerability detection method according to claim 1, characterized in that: After recording the scanning data packet of the vulnerability detection strategy script, it also includes: Acquire a sending data packet and a receiving data packet from the scanned data packet; According to the sent data packet and the received data packet, identifying whether there is a phenomenon of missed reporting vulnerability or false reporting vulnerability; If there is a phenomenon of missed vulnerability reporting or false vulnerability reporting, the vulnerability detection strategy script is corrected accordingly.
5. The vulnerability detection method according to claim 1, characterized in that: After recording the scanning data packet of the vulnerability detection strategy script, it also includes: When a repair request for the vulnerability detection policy script is received, in the restricted execution environment, the vulnerability detection policy script is repaired according to the scan data packet.
6. The vulnerability detection method according to any one of claims 1 to 5, characterized in that: The step of running a preset policy scheduler in the restricted execution environment and calling the scanner to run the vulnerability detection policy script in the target policy based on the scanning parameters includes: When receiving a scanning task, obtain the target strategy, scanning parameters and preset strategy scheduler; The preset policy scheduler is run in the restricted execution environment, and the vulnerability detection policy script is encapsulated; based on the scanning parameters, the scanner is called to run the encapsulated vulnerability detection policy script in the target policy, and the sending data packet and the receiving data packet are captured as the scanning data packet.
7. A vulnerability detection device, characterized in that: include: A pre-deployment module for pre-deploying a scanner for automated detection tools of security vulnerabilities of information technology resources; Pre-deployment of restricted execution environments for running untrusted or untrusted code; A policy verification module is used to verify the legitimacy and validity of a vulnerability detection policy script written by a user in a custom format and a custom language upon receiving the vulnerability detection policy script; The policy running module is used to run the preset policy scheduler in the restricted execution environment when the vulnerability detection policy script is legal and valid, call the scanner to run the vulnerability detection policy script in the target policy based on the scanning parameters, and record the scanning data packet of the vulnerability detection policy script.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor is used to implement the steps of the vulnerability detection method according to any one of claims 1 to 6 when executing a computer program stored in the memory.
9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the vulnerability detection method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the vulnerability detection method described in any one of claims 1 to 6 are implemented.
