Resource library updating method, device, electronic device and storage medium
By using automatic update methods of tree-like data structures and function structures in the resource library, automated attack testing is realized, solving the problem of high cost and unstable effects of existing network security testing methods, and reducing the threshold and cost of attack testing. Improves testing efficiency.
Patent Information
- Application Number
- CN202111218545.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-10-19
AI Technical Summary
The existing network security testing methods are costly and unstable, and manual testing is high. Vulnerability scanning tools can only collect basic information and detect vulnerability, and their effects are limited.
By using tree data structures and function structures in the resource library, automatically update the data structures and function structures, update the resource library based on the output data, realize automated attack testing, and lower the threshold for attack testing.
Without preset attack paths, you can automatically obtain the output data of the function nodes, successfully attack the target object, reduce the cost and threshold of attack testing and improve the testing efficiency.
Smart Images

Figure CN113961932B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to computer security technology. More specifically, the present disclosure provides a resource library update method, device, electronic device and storage medium. Background Art
[0002] In order to detect the security of the network system, some security tests need to be performed. For example, in the related art, a security engineer can perform manual tests, or a vulnerability scanning tool can be used to perform a simple vulnerability automated scanning operation. Summary of the invention
[0003] The present disclosure provides a resource library updating method, device, electronic device and storage medium.
[0004] According to a first aspect, a resource library update method is provided, the method comprising: in response to a resource library update, determining input data of a function node in a function structure according to a data structure, the resource library comprising a data structure and a function structure, the function structure comprising a plurality of function nodes; obtaining output data of the function node according to the input data of the function node; in response to the presence of new data in the output data of the function node that is different from data of any data node in the data structure, updating the data structure according to the new data to obtain an updated resource library.
[0005] According to a second aspect, a resource library updating device is provided, the device comprising: a determining module for determining input data of a function node in a function structure according to a data structure in response to a resource library update, the resource library comprising a data structure and a function structure, the function structure comprising a plurality of function nodes; an obtaining module for obtaining output data of the function node according to the input data of the function node; and an updating module for updating the data structure according to the new data in response to the presence of new data in the output data of the function node that is different from the data of any data node in the data structure, so as to obtain an updated resource library.
[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.
[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
[0008] According to a fifth aspect, a computer program product is provided, comprising a computer program, which implements the method provided according to the present disclosure when executed by a processor.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is a schematic diagram of an exemplary system architecture to which a resource library updating method and apparatus can be applied according to an embodiment of the present disclosure;
[0012] Figure 2 is a flowchart of a resource library update method according to an embodiment of the present disclosure;
[0013] Figure 3 is a schematic diagram of a data structure according to an embodiment of the present disclosure;
[0014] Figure 4 is a schematic diagram of a function structure according to an embodiment of the present disclosure;
[0015] Figure 5 is a flow chart of a testing method for attacks according to an embodiment of the present disclosure;
[0016] Figure 6 is a block diagram of a resource library updating device according to an embodiment of the present disclosure; and
[0017] Figure 7 The invention is a block diagram of an electronic device of a resource library updating method and apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0019] A manual testing method for attacks, where security engineers collect information, detect vulnerabilities, exploit vulnerabilities, maintain permissions, obtain information, and obtain test results. This method is costly and has unstable results.
[0020] A testing method for attacks that can use vulnerability scanning tools to obtain common network vulnerabilities or host vulnerabilities. It can only achieve basic information collection and vulnerability detection, and its effect is limited.
[0021] Figure 1 is a schematic diagram of an exemplary system architecture to which a resource library updating method and apparatus can be applied according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0022] like Figure 1 As shown, the system architecture 100 according to this embodiment may include multiple terminal devices 101, a network 102 and a server 103. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired and / or wireless communication links, etc.
[0023] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. The terminal device 101 can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, etc.
[0024] At least one of the resource library update methods provided in the embodiments of the present disclosure can generally be executed by the server 103. Accordingly, the resource library update device provided in the embodiments of the present disclosure can generally be set in the server 103. The resource library update method provided in the embodiments of the present disclosure can also be executed by a server or a server cluster that is different from the server 103 and can communicate with the terminal device 101 and / or the server 103. Accordingly, the resource library update device provided in the embodiments of the present disclosure can also be set in a server or a server cluster that is different from the server 103 and can communicate with the terminal device 101 and / or the server 103.
[0025] Figure 2 is a flowchart of a resource library updating method according to an embodiment of the present disclosure.
[0026] like Figure 2 As shown, the method 200 may include operations S210 to S240.
[0027] In operation S210 , in response to a resource library update, input data of a function node in a function structure is determined according to a data structure, the resource library includes a data structure and a function structure, and the function structure includes a plurality of function nodes.
[0028] In the embodiment of the present disclosure, the data structure may be a tree structure, that is, a data tree.
[0029] For example, a data tree may include multiple data nodes, each of which is used to store one or a type of data. In one example, a data node is used to store data of SQL (Structured Query Language) injection vulnerabilities. In one example, a data node is used to store browser fingerprints.
[0030] In the embodiment of the present disclosure, the function structure may be a tree structure, that is, a function tree.
[0031] For example, a function tree may include multiple function nodes. Each function node is used to perform related operations according to one or a group of attack functions. And each function node can use the data of one or several data nodes in the data tree as input data according to the attack function in the function node to obtain the output data of the function node. In one example, a function node is used to perform a subdomain mining operation according to a subdomain mining function. In one example, a function node is used to perform a SQL injection vulnerability acquisition operation according to a SQL injection vulnerability acquisition function.
[0032] In the embodiment of the present disclosure, the data structure may store input data required by some function nodes in the function structure.
[0033] For example, the input data of a function node in the function structure cannot be determined according to the data structure. The function node cannot be used to perform an attack operation. Afterwards, after updating the data structure once or several times, the input data of the function node can be determined according to the data structure, that is, the function node can be used to perform the relevant attack action.
[0034] In the embodiment of the present disclosure, the updated data node may be determined in response to the data structure being updated.
[0035] For example, a new data node is added to the data tree, and the data node is used to store a reflective XSS (CrossSite Scripting) vulnerability. It can be determined that the data node is an updated data node. For another example, the data of a data node in the data tree is updated. It can be determined that the data node is an updated data node.
[0036] In the embodiment of the present disclosure, at least one function node may be determined according to the updated data node and the function structure.
[0037] For example, a new data node is added to the data tree, and the data node is used to store a reflected XSS vulnerability. According to the new data node, at least one function node in the function tree that can use the reflected XSS vulnerability as an input data can be determined.
[0038] In the embodiment of the present disclosure, input data of at least one function node may be determined according to at least one function node and according to an updated data structure.
[0039] For example, the input data of the function node may be determined based on the function node, such as a reflected XSS vulnerability and data of another data node.
[0040] In an embodiment of the present disclosure, in response to a function structure update, an updated function node in the function structure is determined.
[0041] For example, a new function node is added to the function tree. The function node can be determined to be an updated function node. In one example, the updated function node is used to perform an operation of crawling web page data.
[0042] For another example, if a parameter of a function node in the function tree changes, it can be determined that the function node is an updated function node.
[0043] In the embodiment of the present disclosure, the input data of the updated function node is determined according to the data structure.
[0044] For example, according to the updated function node, it can be determined that the data of the two data nodes in the data structure are the input data of the updated function node.
[0045] In operation S220, output data of the function node is obtained according to the input data of the function node.
[0046] For example, a function node is used to execute an attack function to process the input data of the function node and obtain the output data of the function node. In one example, a function node can be used to execute a crawler function to crawl a web page corresponding to the input data of the function node and obtain a statement containing a predetermined field in the web page as the output data of the function node.
[0047] In operation S230 , in response to the presence of new data in the output data of the function node that is different from the data of any data node in the data structure, the data structure is updated according to the new data to obtain an updated resource library.
[0048] In the embodiment of the present disclosure, the output data of the function node includes at least one data.
[0049] For example, some of the function nodes are function branch nodes, and some of the function nodes are function terminal nodes. Each function branch node is connected to at least one function terminal node. In one example, the output data of the function node may be the output data of the function terminal node. In one example, the output data of the function node may be the data data of the function branch node.
[0050] For example, the output data of a function node may be one or more data. In one example, the output data of a function node for vulnerability scanning may be data of multiple vulnerabilities. In one example, the output data of a function node for vulnerability scanning may be data of one vulnerability.
[0051] For example, after obtaining the output data of the function node, the output data can be compared with the data of each data node. If there is new data in the output data that is different from the data of any data node, the data tree is updated according to the new data. In one example, the output data of the function node includes multiple statements containing predetermined fields. If one of the statements is different from the data of any data node, the data tree can be updated according to the statement.
[0052] In the embodiment of the present disclosure, a new data node may be added to the data tree according to the new data.
[0053] For example, if the new data is a statement containing a predetermined field, the statement can be used as a new data node in the data tree.
[0054] In the disclosed embodiment, data of existing data nodes in the data tree may be updated according to new data.
[0055] For example, if the new data is a statement containing predetermined fields, the statement can be added to an existing data node in the data tree.
[0056] In the embodiment of the present disclosure, the conversion parameters of the new data are determined according to the new data.
[0057] In the embodiment of the present disclosure, a first conversion operation is performed on the new data according to the conversion parameters of the new data to obtain a new character string.
[0058] In the embodiment of the present disclosure, the conversion parameters of the new character string and the new data are added to the data structure to update the data structure.
[0059] For example, the new data is a statement containing a predetermined field, and the conversion parameters of the statement are determined according to the storage form of the data in the data tree. According to the conversion parameters of the statement, a first conversion operation is performed to convert the statement into a new string. The new string and the conversion parameters are added to a data node in the data tree to update the data tree. The data in the data tree can be kept in the same form. In an example, the pickle module based on the Python programming language can be used to update the data tree according to the new data, such as inputting the new data into the pickle.dumps function to obtain a new string. The pickle.dumps function can convert the data into a string according to the conversion parameters. The conversion parameters are stored to facilitate subsequent acquisition of data from the corresponding data node.
[0060] Through the disclosed embodiments, the output data of the function node can be automatically obtained. There is no need to preset the attack path to perform attack testing, as long as the output of the function node can be obtained. The tester can add or modify a function node as needed, without having a deep understanding of the target object, and it is possible to successfully attack the target object based on the original data structure or function structure, thereby lowering the threshold for attack testing.
[0061] In some embodiments, a character string of input data and a conversion parameter of the input data are determined according to the data structure; and a second conversion operation is performed according to the conversion parameter of the input data and the character string of the input data to obtain input data of the function node.
[0062] For example, the second conversion operation may be the inverse operation of the first conversion operation.
[0063] For example, the input data of a function node includes a statement containing a predetermined field. A data node storing the above statement can be determined. From the above data node, the string of the above statement and the conversion parameters of the above statement can be determined. Then, according to the conversion parameters of the above statement, a second conversion operation is performed on the above string to obtain the above statement as the input data of the above function node. In one example, the pickle module based on the Python programming language can be used to perform the second conversion operation, such as inputting the string into the pickle.loads function to obtain the data of the data node. The pickle.loads function can load data according to the conversion parameters. .
[0064] In some embodiments, in response to the resource library update, according to the data structure, determining the input data of the function node in the function structure includes: in response to the resource library update, for M function nodes in the function structure, according to the data structure, determining the input data of each function node, to obtain the input data of the M function nodes, where M is a positive integer greater than . For example, M>1.
[0065] In the embodiment of the present disclosure, at least one function node among the M function nodes is a function branch node, and each function branch node is connected to at least one function terminal node.
[0066] In the embodiment of the present disclosure, in response to a resource library update, K function branch nodes may be determined, where K≤M.
[0067] For example, K is a positive integer not greater than M.
[0068] In an embodiment of the present disclosure, for at least one function terminal node connected to the kth function branch node, the input data of each function terminal node connected to the kth function branch node is determined according to the data structure, and the input data of at least one function terminal node connected to the kth function branch node is obtained, where k is a positive integer not greater than K, for example, k=1,...K.
[0069] For example, a function branch node may be a node for data mining, and multiple function terminal nodes connected to the function branch node include a function terminal node for subdomain mining, a function terminal node for crawlers, a function terminal node for browser fingerprint mining, and the like.
[0070] For example, in response to a resource library update, multiple function branch nodes may be determined based on the function tree. Multiple sub-function branch nodes connected to the multiple function branch nodes may also be determined. Some sub-function branch nodes connected to one function node and all sub-function branch nodes connected to another function branch node may also be determined as K function branch nodes.
[0071] This allows testers to select some function nodes as needed.
[0072] In some embodiments, obtaining output data of a function node according to input data of the function node includes: obtaining output data of the mth function node according to input data of the mth function node, where m is a positive integer not greater than M, for example, m=1,...M.
[0073] In an embodiment of the present disclosure, for at least one function terminal node connected to the kth function branch node, output data of at least one function terminal node connected to the kth function branch node is obtained based on input data of each function terminal node connected to the kth function branch node, k=1,...K.
[0074] For example, for a function branch node used for data mining, output data of a function terminal node used for subdomain mining (e.g., multiple subdomains of the main domain) is obtained based on input data of a function terminal node used for subdomain mining (e.g., the main domain). Output data of a function terminal node used for crawlers and output data of a function terminal node used for browser fingerprint mining can be obtained in a similar manner.
[0075] In some embodiments, in response to the output data of the function node being different from the data of any data node in the data structure, updating the data structure according to the output data of the function node includes: in response to the presence of new data in the output data of M function nodes that is different from the data of any data node in the data structure, updating the data structure according to the new data.
[0076] In an embodiment of the present disclosure, in response to the presence of new data in the output data of at least one function terminal node that is different from the data of any data node in the data structure, the data structure is updated according to the new data.
[0077] For example, the output data of a function branch node includes the output data of multiple function terminal nodes. In the output data of a function terminal node, there is data different from the data of any data node in the data structure, and the data can be used as new data and added to the data structure.
[0078] Figure 3 It is a schematic diagram of a data tree according to another embodiment of the present disclosure. Those skilled in the art can understand that although the data tree is used as an example of a data structure in this embodiment, the present disclosure embodiment is not limited thereto, and other types of data structures can be used as long as they have node features.
[0079] like Figure 3 As shown, the data tree includes a data root node 301, multiple data branch nodes and multiple data terminal nodes. The data root node 301 is connected to a data terminal node A 302, a data terminal node B 303, a data branch node C 304 and a data branch node D 305. The data branch node C 304 is connected to a data terminal node E 306 and a data terminal node F 307. The data branch node D 305 is connected to a data terminal node G 308.
[0080] For example, data branch node C 304 may be used to store data of the website class. Data terminal node E 306 may be used to store data of the primary domain name class, and data terminal node F 307 may be used to store data of the subdomain class. In one example, if a function node needs data of the primary domain name class in the website class data, the data of data terminal node E 306 may be used as the data of the function node.
[0081] Figure 4 It is a schematic diagram of a function tree according to an embodiment of the present disclosure. Those skilled in the art can understand that although the function tree is used as an example of a function structure in this embodiment, the present disclosure embodiment is not limited thereto, and other types of function structures can be used as long as they have a node structure.
[0082] like Figure 4 As shown, the function tree includes an attack root node 401, a function branch node C 404, and a plurality of function terminal nodes.
[0083] The attack root node 401 is connected to the function terminal node A 402, the function terminal node B 403, and the function branch node C 404. The function branch node C 404 is connected to the function terminal node D 405, the function terminal node E 406, and the function terminal node F 407.
[0084] Function terminal nodes in the function tree can be based on e.g. Figure 3 The data tree in determines the input data of the function terminal node.
[0085] For example, the attack root node 401, the function branch node C 404, and multiple function terminal nodes may all be used to perform an attack.
[0086] For example, the output data of the function terminal node A may be multiple. For another example, the output data of the function terminal node B may be one.
[0087] Figure 5 The figure is a flow chart of a method for testing attacks according to an embodiment of the present disclosure.
[0088] like Figure 5 As shown, the method may include operation S540. The method may also include, for example Figure 2 Operations S210 to S230 in the process.
[0089] In operation S540, in response to the attack request, an attack test is performed on the target object according to the updated resource library to obtain a test result.
[0090] In the embodiment of the present disclosure, the resource library is updated according to the resource library updating method provided by the present disclosure.
[0091] For example, the resource library is based on e.g. Figure 2 The provided resource library update method is updated.
[0092] For example, an attack request may be issued by a tester or may be automatically issued according to a preset cycle.
[0093] For example, the target object is a website backend server. If the attack is successful, the test result obtained will at least include the backend administrator account, password and login certificate. After the resource library is updated, the data of each data node in the data structure can be traversed first. If it is determined that there is no backend administrator account, password and login certificate, the test result obtained is that the attack failed.
[0094] Relevant data of the target object, such as a website URL, can be added to a node in the data structure.
[0095] Next, you can refer to, for example, Figure 2The resource library update method iteratively performs the following operations until the resource library is no longer updated or a test result of a successful attack is obtained.
[0096] In one iteration, in response to the data structure being updated, an updated data node can be determined. Based on the updated data node, at least one function node can be determined from the function structure. Input data of at least one function node at least includes a website URL, for example, a function node for subdomain mining can mine subdomains of the website URL.
[0097] Then, according to at least one function node and the updated data structure, the input data of each function node in the at least one function node is determined. According to the input data of each function node, the output data of each function node is obtained. Then, according to the output data in the function node, it is determined whether new data different from any data node in the data structure is generated during this iterative attack process. If new data is generated, the data structure can be updated according to the new data to obtain an updated data structure.
[0098] After one iteration is executed, each data node of the updated data structure can be traversed. In response to the presence of the website's backend administrator account, password, and login certificate in one or more data nodes, a test result of a successful attack can be obtained, and the iteration can be terminated. In response to the absence of one of the website's backend administrator account, password, and login certificate in the data structure, a test result of a failed attack can be obtained, and the iteration continues until the data structure cannot be updated.
[0099] Through the embodiments of the present disclosure, during the attack testing process, there is no need to preset an attack path, and it is possible to successfully attack the target object, which greatly reduces the threshold of attack testing.
[0100] Figure 6 is a block diagram of a resource library updating device according to another embodiment of the present disclosure.
[0101] like Figure 6 As shown, the device 600 includes a determination module 610 , an acquisition module 620 and an update module 630 .
[0102] The determination module 610 is used to determine the input data of the function node in the function structure according to the data structure in response to the update of the resource library, wherein the resource library includes the data structure and the function structure, and the function structure includes a plurality of function nodes.
[0103] The obtaining module 620 is used to obtain the output data of the function node according to the input data of the function node.
[0104] The updating module 630 is used to update the data structure according to the new data in the output data of the function node, so as to obtain an updated resource library in response to the presence of new data different from the data of any data node in the data structure.
[0105] In some embodiments, the above-mentioned determination module includes: a first determination submodule, used to determine the updated data node in response to the above-mentioned data structure update; a second determination submodule, used to determine at least one function node from the above-mentioned function structure based on the above-mentioned updated data node; and a third determination submodule, used to determine the input data of the above-mentioned at least one function node from the updated data structure based on the above-mentioned at least one function node.
[0106] In some embodiments, the above-mentioned determination module includes: a fourth determination submodule, used to determine the updated function node in the function structure in response to the above-mentioned function structure update; a fifth determination submodule, used to determine the input data of the above-mentioned updated function node according to the above-mentioned data structure; the above-mentioned acquisition module includes: a first acquisition submodule, used to obtain the output data of the above-mentioned updated function node according to the input data of the above-mentioned updated function node; the above-mentioned update module includes: a first update submodule, used to update the above-mentioned data structure according to the above-mentioned new data in response to the presence of new data in the output data of the above-mentioned updated function node that is different from the data of any data node in the above-mentioned data structure.
[0107] In some embodiments, the update module includes: a sixth determination submodule, used to determine the conversion parameters of the new data based on the new data; a first conversion submodule, used to perform a first conversion operation on the new data based on the conversion parameters of the new data to obtain a new string; and an adding submodule, used to add the new string and the conversion parameters of the new data to the data structure to update the data structure.
[0108] In some embodiments, the above-mentioned determination module includes: a seventh determination sub-module, used to determine the string of the above-mentioned input data and the conversion parameters of the above-mentioned input data according to the above-mentioned data structure; a second conversion sub-module, used to perform a second conversion operation according to the string of the above-mentioned input data and the conversion parameters of the above-mentioned input data to obtain the input data of the above-mentioned function node.
[0109] In some embodiments, the above-mentioned determination module includes: an eighth determination submodule, which is used to respond to the above-mentioned resource library update, and for the M function nodes in the above-mentioned function structure, determine the input data of each function node according to the above-mentioned data structure, and obtain the input data of the M function nodes, M is a positive integer greater than 1; the above-mentioned acquisition module includes: a second acquisition submodule, which is used to obtain the output data of the mth function node according to the input data of the mth function node, m is a positive integer not greater than M; the above-mentioned update module includes: a second update submodule, which is used to respond to the presence of new data in the output data of the M function nodes that is different from the data of any data node in the above-mentioned data structure, and update the above-mentioned data structure according to the above-mentioned new data.
[0110] In some embodiments, at least one of the M function nodes is a function branch node, and each of the function branch nodes is connected to at least one function terminal node; the eighth determination submodule includes: a first determination unit, in response to the resource library update, determines K function branch nodes, K is a positive integer not greater than M; a second determination unit, for determining, for at least one function terminal node connected to the kth function branch node, input data of each function terminal node connected to the kth function branch node according to the data structure, and obtains input data of at least one function terminal node connected to the kth function branch node; k is a positive integer not greater than K; the second acquisition submodule includes: an acquisition unit, for at least one function terminal node connected to the kth function branch node, according to the input data of each function terminal node connected to the kth function branch node, obtains output data of at least one function terminal node connected to the kth function branch node; the second update submodule includes: an update unit, for updating the data structure according to the new data in response to the presence of new data in the output data of at least one function terminal node that is different from the data of any data node in the data structure.
[0111] In some embodiments, the device 600 further includes a testing module for executing an attack test on a target object in response to an attack request according to an updated resource library to obtain a test result.
[0112] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0113] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0114] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0115] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0116] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0117] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a resource library update method. For example, in some embodiments, the resource library update method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the resource library update method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the resource library update method in any other appropriate manner (e.g., by means of firmware).
[0118] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0119] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0120] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0121] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0122] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0123] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0124] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0125] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A resource library updating method, comprising: In response to the resource library being updated, determining input data of a function node in a function structure according to a data structure, the resource library including a data structure and a function structure, the function structure including a plurality of function nodes; Obtaining output data of the function node according to the input data of the function node; In response to the presence of new data in the output data of the function node that is different from the data of any data node in the data structure, the data structure is updated according to the new data to obtain an updated resource library.
2. The method according to claim 1, wherein: In response to the resource library update, determining the input data of the function node in the function structure according to the data structure includes: In response to the data structure update, determining an updated data node; Determining at least one function node from the function structure according to the updated data node; According to the at least one function node, input data of the at least one function node is determined from the updated data structure.
3. The method according to claim 1, wherein: In response to the resource library being updated, determining the input data of the function node in the function structure according to the data structure comprises: In response to the function structure update, determining an updated function node in the function structure; Determining input data of the updated function node according to the data structure; The step of obtaining output data of the function node according to the input data of the function node comprises: Obtaining output data of the updated function node according to the input data of the updated function node; In response to the output data of the function node being different from data of any data node in the data structure, updating the data structure according to the output data of the function node comprises: In response to the presence of new data in the output data of the updated function node that is different from data of any data node in the data structure, the data structure is updated according to the new data.
4. The method according to claim 1, wherein: The updating of the data structure according to the new data comprises: Determining conversion parameters of the new data according to the new data; Performing a first conversion operation on the new data according to the conversion parameters of the new data to obtain a new character string; The new character string and the conversion parameters of the new data are added to the data structure to update the data structure.
5. The method according to claim 4, wherein: In response to the resource library update, determining the input data of the function node in the function structure according to the data structure includes: Determining, according to the data structure, a character string of the input data and a conversion parameter of the input data; A second conversion operation is performed according to the character string of the input data and the conversion parameter of the input data to obtain the input data of the function node.
6. The method according to any one of claims 1 to 5, wherein: In response to the resource library update, determining the input data of the function node in the function structure according to the data structure includes: In response to the resource library being updated, for the M function nodes in the function structure, according to the data structure, determining the input data of each function node, to obtain the input data of the M function nodes, where M is a positive integer greater than 1; The step of obtaining output data of the function node according to the input data of the function node comprises: According to the input data of the mth function node, the output data of the mth function node is obtained, where m is a positive integer not greater than M; In response to the output data of the function node being different from data of any data node in the data structure, updating the data structure according to the output data of the function node comprises: In response to the presence of new data in the output data of the M function nodes that is different from the data of any data node in the data structure, the data structure is updated according to the new data.
7. The method according to claim 6, wherein: At least one function node among the M function nodes is a function branch node, and each of the function branch nodes is connected to at least one function terminal node; In response to the resource library update, for the M function nodes in the function structure, according to the data structure, determining the input data of each function node, and obtaining the input data of the M function nodes includes: In response to the resource library update, determining K function branch nodes, where K is a positive integer not greater than M; For at least one function terminal node connected to the kth function branch node, according to the data structure, determine the input data of each function terminal node connected to the kth function branch node, and obtain the input data of at least one function terminal node connected to the kth function branch node; k is a positive integer not greater than K; The step of obtaining output data of the mth function node according to the input data of the mth function node comprises: For at least one function terminal node connected to the kth function branch node, according to input data of each function terminal node connected to the kth function branch node, obtain output data of at least one function terminal node connected to the kth function branch node; In response to the presence of new data different from data of any data node in the data structure in the output data of the M function nodes, updating the data structure according to the new data includes: In response to the presence of new data in the output data of at least one function terminal node that is different from the data of any data node in the data structure, the data structure is updated according to the new data.
8. The method according to any one of claims 1 to 7, further comprising: In response to the attack request, an attack test is performed on the target object according to the updated resource library to obtain a test result.
9. A resource library updating device, comprising: A determination module, configured to determine input data of a function node in a function structure according to a data structure in response to a resource library update, wherein the resource library includes a data structure and a function structure, and the function structure includes a plurality of function nodes; An acquisition module, used for obtaining output data of the function node according to input data of the function node; The updating module is used for updating the data structure according to the new data in the output data of the function node, so as to obtain an updated resource library in response to the presence of new data different from the data of any data node in the data structure.
10. The device according to claim 9, wherein: The determination module comprises: A first determination submodule, configured to determine an updated data node in response to the data structure update; A second determining submodule, configured to determine at least one function node from the function structure according to the updated data node; The third determining submodule is configured to determine input data of the at least one function node from the updated data structure according to the at least one function node.
11. The device according to claim 9, wherein: The determination module comprises: a fourth determining submodule, configured to determine an updated function node in the function structure in response to the function structure updating; A fifth determination submodule, configured to determine input data of the updated function node according to the data structure; The acquisition module comprises: A first obtaining submodule, used for obtaining output data of the updated function node according to the input data of the updated function node; The update module includes: The first updating submodule is configured to update the data structure in response to the presence of new data in the output data of the updated function node that is different from the data of any data node in the data structure, according to the new data.
12. The device according to claim 9, wherein: The update module includes: A sixth determination submodule, used to determine a conversion parameter of the new data according to the new data; A first conversion submodule, configured to perform a first conversion operation on the new data according to a conversion parameter of the new data to obtain a new character string; The adding submodule is used to add the new character string and the conversion parameters of the new data to the data structure to update the data structure.
13. The device according to claim 12, wherein: The determination module comprises: a seventh determination submodule, configured to determine a character string of the input data and a conversion parameter of the input data according to the data structure; The second conversion submodule is used to perform a second conversion operation according to the character string of the input data and the conversion parameter of the input data to obtain the input data of the function node.
14. The device according to any one of claims 9 to 13, wherein: The determination module comprises: an eighth determination submodule, configured to, in response to the resource library update, determine input data of each function node according to the data structure for the M function nodes in the function structure, and obtain input data of the M function nodes, which is a positive integer greater than 1; The acquisition module comprises: The second obtaining submodule is used to obtain the output data of the mth function node according to the input data of the mth function node, where m is a positive integer not greater than M; The update module includes: The second updating submodule is used for updating the data structure according to the new data in response to the presence of new data in the output data of the M function nodes that is different from the data of any data node in the data structure.
15. The device according to claim 14, wherein: At least one function node among the M function nodes is a function branch node, and each of the function branch nodes is connected to at least one function terminal node; The eighth determining submodule comprises: A first determining unit, in response to the resource library update, determines K function branch nodes, where K is a positive integer not greater than M; The second determining unit is used to determine, for at least one function terminal node connected to the kth function branch node, input data of each function terminal node connected to the kth function branch node according to the data structure, and obtain input data of at least one function terminal node connected to the kth function branch node; k is a positive integer not greater than K The second obtaining submodule comprises: an obtaining unit, for obtaining, for at least one function terminal node connected to the kth function branch node, output data of at least one function terminal node connected to the kth function branch node according to input data of each function terminal node connected to the kth function branch node; The second updating submodule includes: An updating unit is used to update the data structure according to the new data in response to the presence of new data in the output data of at least one function terminal node that is different from the data of any data node in the data structure.
16. The device according to any one of claims 9 to 15, further comprising: The test module is used to respond to the attack request and perform an attack test on the target object according to the updated resource library to obtain a test result.
17. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 8.
19. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Detection method and system of webpage bugs
CN105553917A
Penetration testing method and device
CN106874768A
Penetration test method and device and storage medium
CN110851841A
Vehicle safety analysis method and device, electronic equipment and storage medium
CN111756762A
Object testing method, object testing device, electronic equipment and readable storage medium
CN113127362A
