Blockchain client vulnerability mining method, device, equipment and storage medium

By obtaining the writing attributes of the blockchain client and generating vulnerability test samples for vulnerability analysis, the problems of vulnerability on the blockchain client are solved, the accuracy and depth of vulnerability identification are improved, and the security of the blockchain system is enhanced.

CN110443044BActive Publication Date: 2024-11-01TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN201910731257.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-08
Publication Date
2024-11-01
Estimated Expiration
2040-07-30

AI Technical Summary

Technical Problem

Blockchain clients may have vulnerabilities in hardware, software or protocols, causing attackers to access or destroy the system without authorization, threatening the security of the blockchain, and may lead to economic losses in financial applications.

Method used

By obtaining the writing attributes of the blockchain client, generating corresponding vulnerability test samples, performing vulnerability analysis and processing, and collecting exception information to determine the vulnerabilities existing on the client and improving the accuracy and depth of vulnerability determination.

Benefits of technology

Effectively identify and eliminate vulnerabilities in blockchain clients, enhance their security, reduce the risk of economic losses, and improve the overall security of blockchain systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110443044B_ABST
    Figure CN110443044B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for mining vulnerabilities in a blockchain client, wherein: the writing attributes of the blockchain client are obtained; a blockchain vulnerability test sample corresponding to the writing attributes is obtained; the blockchain client is subjected to vulnerability analysis processing through the blockchain vulnerability test sample to obtain the vulnerability analysis result, and the abnormal information generated by the blockchain client is collected at the same time; the vulnerability existing in the blockchain client is determined according to the vulnerability analysis result and the abnormal information. Since the writing attributes include the attributes based on which the blockchain client is written, the obtained vulnerability test sample can realize vulnerability mining of the blockchain client at the writing level, and the depth of vulnerability mining is deeper and the vulnerability mining intensity is greater; and the abnormal information generated by the blockchain client is collected, and the vulnerability existing in the blockchain client is determined according to the vulnerability analysis result and the abnormal information, which increases the consideration factors when determining the vulnerability and improves the accuracy of vulnerability determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a blockchain client vulnerability mining method, device, equipment and storage medium. Background Art

[0002] With the development of computer technology, users have higher and higher requirements for the accuracy and security of data on computers. In this application scenario, blockchain is increasingly valued due to its tamper-proof and traceable properties. When building a blockchain, you need to use a blockchain client. However, the blockchain client may have vulnerabilities. Vulnerabilities are defects in the specific implementation of hardware, software, protocols, or system security policies. Vulnerabilities can allow attackers to access or damage the system without authorization. Since blockchains often have financial attributes, vulnerabilities can cause a lot of economic losses and threaten the security of blockchains. Summary of the invention

[0003] In view of this, the purpose of this application is to provide a blockchain client vulnerability mining method, device, blockchain node device and storage medium to mine the vulnerabilities existing in the blockchain client and ensure the security of the blockchain client. The specific scheme is as follows:

[0004] In order to achieve the above objectives, on the one hand, the present application provides a blockchain client vulnerability mining method, comprising:

[0005] Obtaining a writing attribute of a blockchain client, wherein the blockchain client includes a blockchain node, and the writing attribute includes an attribute based on which the blockchain client is written;

[0006] Obtain a blockchain vulnerability test sample corresponding to the writing attribute; wherein the blockchain vulnerability test sample is a sample generated according to the vulnerability carried by the writing attribute;

[0007] Perform vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain vulnerability analysis results, and simultaneously collect abnormal information generated by the blockchain client;

[0008] The vulnerability analysis result and the vulnerability information present in the abnormal information are parsed, and the vulnerability corresponding to the vulnerability information is determined as the vulnerability of the blockchain client.

[0009] Preferably, the obtaining of the writing attribute of the blockchain client includes:

[0010] Obtain the programming language type of the blockchain client;

[0011] The obtaining of a blockchain vulnerability test sample corresponding to the writing attribute includes:

[0012] Analyze the vulnerability types and vulnerability objects existing in the writing language type;

[0013] The blockchain vulnerability test sample is generated based on the vulnerability type and the vulnerability object.

[0014] Preferably, generating the blockchain vulnerability test sample based on the vulnerability type and the vulnerability object includes:

[0015] The blockchain vulnerability test sample corresponding to the vulnerability type and the vulnerability object is generated in the form of a regular expression.

[0016] Preferably, performing vulnerability analysis processing on the blockchain client through the blockchain vulnerability test sample to obtain a vulnerability analysis result includes:

[0017] In the blockchain client, matching a target object that is the same as the vulnerability object of the blockchain vulnerability test sample;

[0018] The target object is parsed according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability parsing result.

[0019] Preferably, the target object is parsed according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability parsing result, including:

[0020] Performing operations on the target object according to the operation method of the blockchain vulnerability test sample to obtain an operation result;

[0021] The operation result is parsed according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability parsing result.

[0022] Preferably, in the blockchain client, matching a target object that is the same as the vulnerability object of the blockchain vulnerability test sample includes:

[0023] Matching the blockchain vulnerability test sample with each functional module of the blockchain client respectively to obtain the target object that is the same as the vulnerability object of the blockchain vulnerability test sample;

[0024] Among them, the functional modules of the blockchain client include a transaction module, a synchronization module, a broadcast module, a remote procedure call module, and a smart contract execution module.

[0025] Preferably, performing vulnerability analysis processing on the blockchain client through the blockchain vulnerability test sample to obtain a vulnerability analysis result includes:

[0026] Encapsulating the blockchain vulnerability test sample into a blockchain vulnerability test script;

[0027] Run the blockchain vulnerability test script in the blockchain client, and use the running result as the vulnerability analysis result.

[0028] Preferably, the obtaining of the writing attribute of the blockchain client includes:

[0029] Obtaining the writing protocol of the blockchain client;

[0030] The obtaining of a blockchain vulnerability test sample corresponding to the writing attribute includes:

[0031] Obtain a blockchain vulnerability data packet corresponding to the writing protocol, and use the blockchain vulnerability data packet as the blockchain vulnerability test sample;

[0032] The process of performing vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain a vulnerability analysis result includes:

[0033] The blockchain vulnerability test sample is sent to the blockchain client, and a parsing result of the blockchain vulnerability test sample parsed by the blockchain client is obtained, and the parsing result is used as the vulnerability parsing result.

[0034] Preferably, the obtaining of a blockchain vulnerability data packet corresponding to the writing protocol includes:

[0035] Analyzing the type of the written protocol;

[0036] If the type of the writing protocol is an instruction protocol, all instructions in the writing protocol are obtained, a preset number of the instructions are selected to form a random instruction sequence, and the random instruction sequence is packaged to obtain the blockchain vulnerability data packet;

[0037] If the type of the writing protocol is a non-instruction protocol, the original blockchain data packet of the writing protocol is obtained, and the data in the original blockchain data packet is modified to obtain the blockchain vulnerability data packet.

[0038] Preferably, after determining the vulnerability corresponding to the vulnerability information as the vulnerability of the blockchain client, the method further includes:

[0039] The writing attributes, the blockchain vulnerability test sample, the vulnerability analysis result and the exception information are sent to a security server, so that the security server performs a vulnerability analysis on the blockchain client based on the writing attributes, the blockchain vulnerability test sample, the vulnerability analysis result and the exception information.

[0040] On the other hand, the present application also provides a blockchain client vulnerability mining device, comprising:

[0041] A writing attribute acquisition module, used to acquire writing attributes of a blockchain client, wherein the blockchain client includes a blockchain node, and the writing attributes are attributes based on which the blockchain client is written;

[0042] A test sample acquisition module, used to acquire a blockchain vulnerability test sample corresponding to the writing attribute; wherein the blockchain vulnerability test sample is a sample generated according to the vulnerability carried by the writing attribute;

[0043] A parsing result acquisition module, used to perform vulnerability parsing processing on the blockchain client through the blockchain vulnerability test sample, obtain vulnerability parsing results, and simultaneously collect abnormal information generated by the blockchain client;

[0044] The vulnerability determination module is used to parse the vulnerability analysis result and the vulnerability information present in the abnormal information, and determine the vulnerability corresponding to the vulnerability information as the vulnerability of the blockchain client.

[0045] On the other hand, the present application also provides a blockchain node device, which includes a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the aforementioned blockchain client vulnerability mining method.

[0046] On the other hand, the present application also provides a storage medium, which stores computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, the aforementioned blockchain client vulnerability mining method is implemented.

[0047] It can be seen that in the embodiment of the present application, by mining the vulnerabilities of the blockchain client, the corresponding blockchain vulnerability test sample is obtained according to the obtained writing attributes of the blockchain client. Since the writing attributes include the attributes based on which the blockchain client is written, the obtained blockchain vulnerability test sample can realize vulnerability mining of the blockchain client at the writing level, and the depth of vulnerability mining is deeper and the intensity of vulnerability mining is greater; and in the process of applying the blockchain vulnerability test sample to perform vulnerability analysis on the blockchain client, the abnormal information generated by the blockchain client is further collected, and the vulnerabilities existing in the blockchain client are determined together according to the vulnerability analysis results and the abnormal information, which increases the considerations when determining the blockchain vulnerability and improves the accuracy of blockchain vulnerability determination. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 A schematic diagram of the composition architecture of a blockchain client vulnerability mining system provided for this application;

[0050] Figure 2 A flowchart of a blockchain client vulnerability mining method provided in an embodiment of the present application;

[0051] Figure 3 A flowchart of a blockchain client vulnerability mining method provided in an embodiment of the present application;

[0052] Figure 4 A flowchart of a blockchain client vulnerability mining method provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of a structure corresponding to an application scenario embodiment of the present application;

[0054] Figure 6 is a schematic diagram of the structure of terminal 21;

[0055] Figure 7 Flowchart for implementing vulnerability testing for terminal 21;

[0056] Figure 8 A schematic diagram of a blockchain client vulnerability mining device provided in an embodiment of the present application;

[0057] Fig. 9 A schematic diagram of the structure of a server provided in an embodiment of the present application;

[0058] Fig.10 A schematic diagram of the structure of a terminal provided in an embodiment of the present application;

[0059] Fig.11 A schematic diagram of a hardware composition framework applicable to the blockchain client vulnerability mining method of an embodiment of the present application. DETAILED DESCRIPTION

[0060] Blockchain is an Internet protocol and a basic data structure. Just as HTTP is the most important application protocol in the Internet application layer, blockchain is also a peer-to-peer transmission protocol in the application layer. Based on the protocol, blockchain defines a distributed ledger by "blocks" and "chains". "Blocks" are similar to transaction records in securities trading, recording all equity transfer relationships that occurred within a specific time period; there is a strict and unique succession relationship between these "blocks", forming a "chain" of "blocks". The unique mechanism of blockchain guarantees the rationality and uniqueness of the content and succession relationship of "block" records, and this process does not rely on a specific central node. In addition, blockchain cannot be tampered with and is traceable, which can help society reduce credit costs while ensuring the authenticity and reliability of data. Smart contracts are the core components of the blockchain platform, executing business logic on the blockchain and recording information on the blockchain to ensure that data cannot be tampered with.

[0061] When building a blockchain, it is necessary to use a blockchain client to implement it. The blockchain client can be a blockchain node on the blockchain, such as a user blockchain node used by ordinary users, an administrator blockchain node used by administrators who manage ordinary users, etc. Taking the blockchain responsible for the game as an example, the user blockchain node used by ordinary users can be the user blockchain node used by players, and the administrator blockchain node used by administrators can be the administrator blockchain node used by game developers, etc. However, there may be vulnerabilities in the blockchain client. Vulnerabilities are defects in the specific implementation of hardware, software, protocols or system security policies. Vulnerabilities can enable attackers to access or destroy the system without authorization; and because blockchains often have financial attributes, vulnerabilities can cause a lot of economic losses and threaten the security of blockchains.

[0062] In view of the above-mentioned problems currently existing, the present application proposes a technical solution for client vulnerability mining, through which vulnerability mining can be performed on the client to eliminate the vulnerabilities existing in the client.

[0063] For ease of understanding, the system architecture to which the technical solution of this application is applicable is introduced below. Figure 1 , which shows the composition architecture of a client vulnerability mining system of the present application.

[0064] like Figure 1 As shown, a component architecture of the blockchain client vulnerability mining system of the present application may include a tester terminal 11, a server 12, and a blockchain client 13.

[0065] Among them, the test party terminal 11 can provide the test party with an information input interface and an information sending trigger unit on the user interaction interface through its own pre-installed client. Among them, the test party terminal 11 obtains the vulnerability mining instruction input by the test party through the information input interface. When the information sending trigger unit is triggered by the outside world, the test party terminal 11 can use the first communication network to send the information obtained through the information input interface to the server 12. It can be understood that the test party terminal 11 in this application includes but is not limited to smartphones, tablet computers, wearable devices, desktop computers, etc. installed with the above-mentioned client.

[0066] In the present application, the server 12 may specifically refer to a dedicated server for implementing a single business, and different servers 12 are used to implement different businesses. The server 12 establishes a communication connection with the test party terminal 11 through the first communication network. After the server 12 obtains the vulnerability mining instruction sent by the test party terminal 11, it can execute the vulnerability mining instruction to complete the corresponding vulnerability mining task for the blockchain client 13. In the present application, a monitoring program is pre-integrated inside the server 12 to monitor the behavior of executing the vulnerability mining instruction. Once a vulnerability mining instruction is monitored to be executed, the vulnerability mining instruction can be collected, and the vulnerability mining results corresponding to the vulnerability mining instruction can be collected. Subsequently, the vulnerability mining instructions and vulnerability mining results currently collected in real time or historically collected can be bound to the identity of the test party, and then the binding information is stored for subsequent viewing by the test party, or the binding information is directly sent to the test party terminal 11 so that the test party can view it through the test party terminal 11.

[0067] It should be noted that the above-mentioned first communication network of the present application can be determined according to the network conditions and application requirements in the actual application process. It can be a wireless communication network, such as a mobile communication network or a WIFI network, or a wired communication network; it can be a wide area network, and a local area network can also be used when circumstances permit.

[0068] Still taking the aforementioned blockchain responsible for games as an example, on this blockchain, users may conduct transactions with administrators due to certain needs, and these transactions need to be completed through the blockchain. For example, on the blockchain responsible for production games, the user blockchain node may need to transfer money to the administrator blockchain node so that the administrator blockchain node can speed up the priority production process of the user blockchain node. However, if there is a vulnerability in the blockchain node, such as the vulnerability that the user blockchain node can trade with two administrator blockchain nodes at the same time, the user blockchain node can send a transaction containing only one amount to the two administrator blockchain nodes at the same time, so that the user blockchain node can use one sum of money to obtain resources on the two administrator blockchain nodes, causing resource loss of the administrator blockchain node. For this reason, the present application provides a blockchain client vulnerability mining method to solve the vulnerability problem existing in the blockchain client.

[0069] Figure 2 A flowchart of a blockchain client vulnerability mining method provided by an embodiment of the present application. Figure 2 As shown, the blockchain client vulnerability mining method may include the following steps:

[0070] S101: Obtain writing attributes of a blockchain client, wherein the blockchain client includes a blockchain node, and the writing attributes are attributes based on which the blockchain client is written.

[0071] In an embodiment of the present application, the writing attributes of the blockchain client obtained may be the writing attributes of the blockchain client that saves records during the historical vulnerability mining process, or may be the writing attributes obtained from the blockchain client in real time, etc.

[0072] In one implementation, when the writing attributes of the acquired blockchain client are the writing attributes of the blockchain client recorded in the historical vulnerability mining process, multiple blockchain clients and their corresponding writing attribute information may be stored at this time. In order to facilitate the management of the blockchain client and its corresponding writing attribute information, the identification information of the blockchain client and the writing attribute information corresponding to the blockchain client can be stored in the form of a key-value pair. Afterwards, when it is necessary to obtain the writing attributes of the blockchain client, the writing attributes that match the identification information of the blockchain client can be queried in the saved information to obtain the writing attributes of the blockchain client.

[0073] In another implementation method, when the writing attributes of the blockchain client are obtained from the blockchain client in real time, the method for obtaining the writing attributes can be agreed upon with the blockchain client in advance. For example, if the acquisition method is a specific instruction trigger method, the special instruction can be sent to the blockchain client. When the blockchain client receives the special instruction and recognizes that the special instruction is an instruction for obtaining the writing attributes, it can return its own writing attributes. In addition, the corresponding data information can be obtained from the blockchain client, and the writing attributes of the blockchain client can be obtained by analyzing the data information.

[0074] S102: Obtain a blockchain vulnerability test sample corresponding to the writing attribute.

[0075] In this embodiment, because the types of blockchain clients are different, the attributes based on which the blockchain clients are written are also different, which makes the writing attributes of the blockchain clients varied, and the vulnerabilities of blockchain clients written with different writing attributes may also be varied. Therefore, it is necessary to obtain blockchain vulnerability test samples corresponding to the writing attributes.

[0076] In one implementation method, corresponding blockchain vulnerability test samples can be generated in real time according to the writing attributes. During this process, the writing attributes need to be analyzed, which makes the process of generating blockchain vulnerability test samples according to the writing attributes more complicated. In order to reduce the complexity of generating blockchain vulnerability test samples according to the writing attributes, a neural network model can be used to automatically generate blockchain vulnerability test samples. During this process, it is necessary to collect known writing attributes and corresponding blockchain vulnerability test samples, and use the known writing attributes and corresponding blockchain vulnerability test samples to train the neural network model to obtain a neural network model that meets the requirements. After that, you only need to input the writing attributes into the neural network model to obtain the blockchain vulnerability test sample generated by the neural network model and corresponding to the writing attributes.

[0077] In another implementation method, each time vulnerability mining is performed on the client, the generated blockchain vulnerability test samples corresponding to the written attributes can be actively stored, and a corresponding blockchain vulnerability test sample database can be established to save the blockchain vulnerability test samples. In this way, when vulnerability mining is required for the same type of blockchain client, the corresponding blockchain vulnerability test samples can be queried in the blockchain vulnerability test sample database.

[0078] S103: Perform vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain the vulnerability analysis result, and at the same time collect the abnormal information generated by the blockchain client.

[0079] In this embodiment, different blockchain vulnerability test samples represent different vulnerability types. In order to obtain vulnerability information of the blockchain client, it is necessary to perform vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain vulnerability analysis results. At the same time, in order to further improve the accuracy of judging the vulnerabilities existing in the blockchain client, the abnormal information generated by the blockchain client during the vulnerability mining process can be collected, and the vulnerability information of the blockchain client can be analyzed by comprehensively considering the vulnerability analysis results and the abnormal information.

[0080] In one implementation, in order to improve the analysis efficiency of analyzing the blockchain client through the blockchain vulnerability test sample, the blockchain vulnerability test sample can be used to analyze the blockchain client with the help of a multi-threaded mode, that is, multiple blockchain vulnerability test samples are simultaneously applied to analyze the blockchain client to obtain corresponding analysis results. In another possible implementation, a neural network model can be further used to achieve the processing efficiency of vulnerability analysis processing of the blockchain client through the blockchain vulnerability test sample.

[0081] S104: parse the vulnerability analysis result and the vulnerability information in the exception information, and determine the vulnerability corresponding to the vulnerability information as a vulnerability of the blockchain client.

[0082] In this embodiment, if there is a vulnerability in the blockchain client, the vulnerability information corresponding to the vulnerability in the blockchain client will exist in the vulnerability analysis result. Similarly, the vulnerability information corresponding to the vulnerability in the blockchain client will also exist in the exception information. For example, when the vulnerability is a numerical overflow, information corresponding to the numerical overflow will be generated in both the vulnerability analysis result and the exception information. Therefore, the vulnerability information in the vulnerability analysis result and the exception information can be parsed, and the vulnerability corresponding to the vulnerability information can be determined as the vulnerability of the blockchain client.

[0083] In one implementation, in order to solve the vulnerability problem existing in the blockchain client, after the vulnerability corresponding to the vulnerability information is determined as the vulnerability of the blockchain client, the writing attributes, blockchain vulnerability test samples, vulnerability analysis results and exception information can also be sent to the security server, so that the security server can perform a vulnerability analysis on the blockchain client based on the writing attributes, blockchain vulnerability test samples, vulnerability analysis results and exception information, so as to use the security server to solve the vulnerability existing in the blockchain client.

[0084] In an embodiment of the present application, vulnerability mining is performed on a blockchain client, and a corresponding blockchain vulnerability test sample is obtained according to the obtained writing attributes of the blockchain client. Since the writing attributes include the attributes based on which the blockchain client is written, the obtained blockchain vulnerability test sample can realize vulnerability mining of the blockchain client at the writing level, and the vulnerability mining is deeper and more intense. In the process of applying the blockchain vulnerability test sample to analyze the blockchain client, the abnormal information generated by the blockchain client is further collected, and it is determined whether the blockchain client has a vulnerability based on the vulnerability analysis result and the abnormal information, which increases the considerations when determining the blockchain vulnerability and improves the accuracy of blockchain vulnerability determination.

[0085] Figure 3 A flowchart of a blockchain client vulnerability mining method provided by an embodiment of the present application. Figure 3 As shown, the blockchain client vulnerability mining method may include the following steps:

[0086] S201: Obtain a programming language type of the blockchain client, where the programming language type includes a language based on which the blockchain client is written.

[0087] In this embodiment, the programming language used when programming the blockchain client determines the security of the blockchain client and the types of vulnerabilities that may exist to a certain extent. For example, the make statement of the G0 language has a memory overflow vulnerability model. Therefore, when obtaining the programming properties of the blockchain client, the programming language type of the blockchain client can be obtained, and the vulnerability of the blockchain client can be mined based on the programming language type of the blockchain client.

[0088] In one implementation, when obtaining the programming language type of the blockchain client, the programming language of the blockchain client, such as writing code, can be collected, and the collected writing language can be analyzed to determine the programming language type of the blockchain client. In a possible implementation, the programming language type of the blockchain client can be determined by scanning the file suffix of the blockchain client or checking the code syntax.

[0089] S202: Analyze the vulnerability types and vulnerability objects existing in the writing language type.

[0090] S203: Generate a blockchain vulnerability test sample based on the vulnerability type and vulnerability object.

[0091] In this embodiment, when the writing attribute is the writing language type, since the vulnerabilities existing in the writing language may be integer overflow, buffer overflow, array access out of bounds, memory leak, etc., after analyzing the vulnerabilities existing in the writing language, it is concluded that the vulnerabilities existing in the writing language have commonalities: the vulnerability consists of a vulnerability type and a vulnerability object; taking the vulnerability as an integer overflow as an example, where the integer belongs to a vulnerability object and the overflow belongs to a vulnerability type, so when obtaining the vulnerability test sample corresponding to the writing attribute, the vulnerability type and vulnerability object existing in the writing language type can be analyzed first, and then the corresponding blockchain vulnerability test sample can be generated based on the vulnerability type and vulnerability object. The format of the generated blockchain vulnerability test sample can be determined according to actual needs. For example, in a possible implementation method, in order to facilitate the subsequent analysis of the blockchain client through the blockchain vulnerability test sample, a regular expression form can be used to generate a blockchain vulnerability test sample corresponding to the vulnerability type and vulnerability object. The regular expression involved in this application is a logical formula for operating on character strings (including common characters (for example, letters between a and z) and special characters (called "meta-characters")). In other words, it is a "regular string" composed of some pre-defined specific characters and combinations of these specific characters. This "regular string" is used to express a filtering logic for the string. A regular expression is a text pattern that describes one or more strings to be matched when searching for text.

[0092] The following uses G0 language as an example to describe the generation process of blockchain vulnerability test samples in the form of normal expressions. For the memory overflow vulnerability in G0 language, the blockchain vulnerability test sample generated by regular expression can be expressed as "make\(\[" etc.; correspondingly, in G0 language, there may also be certificate overflow in the addition, subtraction, multiplication and division statements, and the vulnerability test sample generated by regular expression can be expressed as "\s\*\s\", "\s\+\s\", "\s\-\s\", etc.

[0093] S204: Perform vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain the vulnerability analysis result, and collect the abnormal information generated by the blockchain client.

[0094] In this embodiment, since the blockchain vulnerability test sample is generated based on the vulnerability type and the vulnerability object, when the blockchain client is subjected to vulnerability analysis through the blockchain vulnerability test sample and the vulnerability analysis result is obtained, the target object identical to the vulnerability object of the blockchain vulnerability test sample can be matched in the blockchain client first. At this time, the blockchain vulnerability test sample can be matched with the vulnerability object in a single-line matching manner, or the blockchain vulnerability test sample can be matched with the vulnerability object in a multi-line matching manner. The single-line matching means that only one vulnerability object is matched with the blockchain client at a time, and the multi-line matching means that multiple vulnerability objects are matched with the blockchain client at a time; and then the target object is subjected to vulnerability analysis according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability analysis result. That is, only when there is a target object identical to the vulnerability object in the blockchain vulnerability test sample in the blockchain client, the blockchain client may have the vulnerability type reflected by the blockchain vulnerability test sample.

[0095] In one possible implementation, since some writing languages ​​involve calculations, and there may be vulnerabilities in the calculation process or calculation results, when analyzing the target object according to the vulnerability type of the blockchain vulnerability test sample and obtaining the analysis result, the target object can be calculated according to the calculation method of the blockchain vulnerability test sample to obtain the calculation result; the calculation result can be analyzed according to the vulnerability type of the blockchain vulnerability test sample to obtain the analysis result.

[0096] In another possible implementation, a blockchain client can implement a variety of functions. The implementation of these functions needs to be based on the functional modules existing in the blockchain client, and the vulnerabilities of these functional modules may be different. In order to accurately determine the vulnerability information of each functional module, in the blockchain client, when matching the target object that is the same as the vulnerability object of the blockchain vulnerability test sample, the blockchain vulnerability test sample can be matched with each functional module of the blockchain client to obtain the target object that is the same as the vulnerability object of the blockchain vulnerability test sample. In this way, there is a corresponding relationship between the vulnerability object and the functional module, and then there is a corresponding relationship between the functional module and the blockchain vulnerability test sample and the vulnerability analysis result. Based on this corresponding relationship, the vulnerability information of each functional module can be determined. Taking the type of blockchain client as a blockchain node as an example, the blockchain node can be divided into a transaction module, a synchronization module, a broadcast module, an RPC (Remote Procedure Call) module, a smart contract execution module, etc. according to the function. Assuming that the transaction module has a target object 1, the broadcast module has a target object 2, the vulnerability type corresponding to the target object 1 is vulnerability 1, and the vulnerability type of the target object 2 is vulnerability 2, then when the blockchain node has vulnerability 2, it can be determined that the vulnerability 2 of the blockchain client exists in the broadcast module.

[0097] In another possible implementation, since the script has the function of being able to run, the script can be used to improve the analysis efficiency of analyzing the blockchain client through the blockchain vulnerability test sample. Then, when the blockchain client is analyzed through the blockchain vulnerability test sample and the analysis result is obtained, the blockchain vulnerability test sample can be encapsulated into a blockchain vulnerability test script; the blockchain vulnerability test script is run in the blockchain client, and the running result is used as the vulnerability analysis result.

[0098] S205: parse the vulnerability analysis result and the vulnerability information in the exception information, and determine the vulnerability corresponding to the vulnerability information as a vulnerability of the blockchain client.

[0099] Figure 4 A flowchart of a blockchain client vulnerability mining method provided by an embodiment of the present application. Figure 4 As shown, the blockchain client vulnerability mining method may include the following steps:

[0100] S301: Obtain a programming protocol of a blockchain client, where the programming attributes include the protocol based on which the blockchain client is programmed.

[0101] In this embodiment, the writing protocol based on which the blockchain client is written determines the security and vulnerability types of the blockchain client to a certain extent. For example, for the writing protocol involving transactions, if there is a vulnerability in the writing protocol that can modify the transaction amount, the attacker can modify the transaction amount of the blockchain client through the vulnerability, causing property losses to the blockchain client. Therefore, the possible vulnerabilities of the blockchain client can be analyzed based on the writing protocol of the blockchain client.

[0102] S302: Obtain a blockchain vulnerability data packet corresponding to the written protocol, and use the blockchain vulnerability data packet as a blockchain vulnerability test sample.

[0103] In this embodiment, since each protocol has a corresponding data packet format, and each protocol can only process data packets in the corresponding data packet format, a data packet can be generated to perform vulnerability analysis on the protocol. Therefore, when obtaining a blockchain vulnerability test sample corresponding to the writing attribute, the blockchain vulnerability data packet corresponding to the writing protocol can be obtained, and the blockchain vulnerability data packet can be used as a blockchain vulnerability test sample.

[0104] In one possible implementation method, due to the different types of protocols, the process of generating the corresponding blockchain vulnerability data packet is also different. For example, when obtaining a blockchain vulnerability data packet corresponding to a writing protocol, the type of the writing protocol can be analyzed; if the type of the writing protocol is an instruction protocol, all instructions in the writing protocol are obtained, a preset number of instructions are selected to form a random instruction sequence, and the random instruction sequence is packaged to obtain a blockchain vulnerability data packet; if the type of the writing protocol is a non-instruction protocol, the original blockchain data packet of the writing protocol is obtained, and the data in the original blockchain data packet is modified to obtain a blockchain vulnerability data packet. Still taking the blockchain client as a blockchain node as an example, the protocols in the blockchain node include the blockchain consensus protocol, the node block synchronization protocol, the node block broadcast protocol, the node transaction broadcast protocol, the RPC protocol and the smart contract protocol, among which the smart contract protocol is responsible for processing instructions, and its type is the instruction protocol. Then, when generating a blockchain vulnerability test sample for vulnerability mining of the smart contract protocol, the instruction set in the smart contract can be collected, and then some instructions can be randomly taken out and combined to generate a random instruction sequence, and then the random instruction sequence can be packaged with the transaction data packet to generate the corresponding blockchain vulnerability test sample; and for the node transaction broadcast protocol, the transaction amount, transaction target, transaction source and other information fields in the transaction data packet can be randomly modified to generate the corresponding blockchain vulnerability test sample.

[0105] S303: Send the blockchain vulnerability test sample to the blockchain client, obtain the analysis result of the blockchain vulnerability test sample analyzed by the blockchain client, use the analysis result as the vulnerability analysis result, and collect the abnormal information generated by the blockchain client.

[0106] In this embodiment, since the writing attribute is to write a protocol, and the protocol is to perform corresponding processing on the data, when the blockchain client is subjected to vulnerability analysis through the blockchain vulnerability test sample and the vulnerability analysis result is obtained, the blockchain vulnerability test sample can be sent to the blockchain client to obtain the analysis result of the blockchain vulnerability test sample analyzed by the blockchain client, and the analysis result can be used as the vulnerability analysis result.

[0107] S304: parse the vulnerability analysis result and the vulnerability information in the exception information, and determine the vulnerability corresponding to the vulnerability information as a vulnerability of the blockchain client.

[0108] For easier understanding, please refer to Figure 5 , Figure 6 and Figure 7 , combined with an application scenario of the present solution, the following uses the terminal 21, the debugger device 22 and the game blockchain client 231 in the blockchain network 23 as an application scenario to illustrate the vulnerability mining process of the game blockchain client.

[0109] After the user turns on the terminal 21, the terminal 21 establishes a connection with the game blockchain client 231, and the user enters a vulnerability mining instruction on the terminal 21 interface; the terminal 21 responds to the vulnerability mining instruction, obtains the writing attributes of the game blockchain client 231, generates a blockchain vulnerability test sample corresponding to the writing attributes, and uses the blockchain vulnerability test sample to perform vulnerability analysis on the game blockchain client 231 to obtain the vulnerability analysis result; at the same time, the debugger device 22 collects the abnormal information generated by the game blockchain client 231 and feeds it back to the terminal 21, and the terminal 21 determines whether the game blockchain client 231 has a vulnerability based on the vulnerability analysis result and the abnormal information. In this process, when the game blockchain client 231 has a vulnerability, all blockchain nodes in the blockchain network 23 that are consistent with the software code of the game blockchain client 231 have the vulnerability.

[0110] Depend on Figure 6 It can be seen that the terminal 21 can be composed of a vulnerability model generation module 211, a vulnerability model matching module 212, a test sample generation module 213 and a sample batch test module 214; the vulnerability model generation module 211 is used to generate a vulnerability model, the vulnerability model matching module 212 is used to match the vulnerability model with the blockchain client, the test sample generation module 213 is used to generate a test sample, and the sample batch test module 214 is used to test the blockchain client through the test sample; the process of implementing vulnerability testing by the terminal 21 can be found in Figure 7 , which may include the following steps:

[0111] Step S401: Obtain the writing language type of the game blockchain client, analyze the vulnerability type and vulnerability object existing in the writing language type, and execute step S402.

[0112] Step S402: Generate a blockchain vulnerability test sample corresponding to the vulnerability type and vulnerability object in the form of a regular expression, and execute step S403.

[0113] Step S403: Determine whether to execute the script writing operation, if so, execute step S404, if not, execute step S406.

[0114] Step S404: Encapsulate the blockchain vulnerability test sample into a blockchain vulnerability test script and execute step S405.

[0115] Step S405: Run the blockchain vulnerability test script in the game blockchain client, use the running result as the vulnerability analysis result, and execute step S411.

[0116] Step S406: Match the blockchain vulnerability test sample with each functional module of the game blockchain client respectively, obtain the target object that is the same as the vulnerability object of the blockchain vulnerability test sample, and execute step S407.

[0117] Step S407: Perform calculations on the target object according to the calculation method of the blockchain vulnerability test sample, obtain the calculation results, and execute step S408.

[0118] Step S408: Analyze the calculation result according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability analysis result, and execute step S411.

[0119] Step S409: Analyze the writing protocol of the game blockchain client, analyze the type of the writing protocol, and execute step S410.

[0120] Step S410: If the type of the writing protocol is an instruction protocol, then obtain all instructions in the writing protocol, select a preset number of instructions to combine into a random instruction sequence, package the random instruction sequence, and obtain a blockchain vulnerability data packet; if the type of the writing protocol is a non-instruction protocol, then obtain the original blockchain data packet of the writing protocol, modify the data in the original blockchain data packet, obtain the blockchain vulnerability data packet, and execute step S411.

[0121] Step S411: Send the blockchain vulnerability test sample to the game blockchain client, obtain the analysis result of the game blockchain client analyzing the blockchain vulnerability test sample, use the analysis result as the vulnerability analysis result, and execute step S412.

[0122] Step S412: Obtain the abnormal information generated by the game blockchain client and execute step S414.

[0123] Step S413: parse the vulnerability analysis result and the vulnerability information in the exception information, and determine the vulnerability corresponding to the vulnerability information as a vulnerability of the game blockchain client.

[0124] Figure 8 A client vulnerability mining device provided in an embodiment of the present application includes:

[0125] A writing attribute acquisition module 21 is used to acquire writing attributes of a blockchain client, wherein the blockchain client includes a blockchain node, and the writing attributes are attributes based on which the blockchain client is written;

[0126] A test sample acquisition module 22, used to acquire a blockchain vulnerability test sample corresponding to the written attribute;

[0127] The analysis result acquisition module 23 is used to perform vulnerability analysis on the blockchain client through the blockchain vulnerability test sample, obtain the vulnerability analysis result, and collect the abnormal information generated by the blockchain client;

[0128] The vulnerability determination module 24 is used to parse the vulnerability analysis results and the vulnerability information in the abnormal information, and determine the vulnerability corresponding to the vulnerability information as a vulnerability of the blockchain client.

[0129] In a possible implementation, writing the attribute acquisition module 21 may specifically include:

[0130] The writing language acquisition submodule is used to obtain the writing language type of the blockchain client;

[0131] The test sample acquisition module 22 may specifically include:

[0132] Vulnerability analysis submodule, used to analyze the vulnerability types and vulnerability objects existing in the writing language type;

[0133] The test sample generation submodule is used to generate blockchain vulnerability test samples based on vulnerability types and vulnerability objects.

[0134] In a possible implementation, the test sample generation submodule may specifically include:

[0135] The test sample generation unit is used to generate a blockchain vulnerability test sample corresponding to the vulnerability type and vulnerability object in the form of a regular expression.

[0136] In a possible implementation, the parsing result acquisition module 23 may specifically include:

[0137] The object matching submodule is used to match the target object that is the same as the vulnerability object of the blockchain vulnerability test sample in the blockchain client;

[0138] The analysis result acquisition submodule is used to perform vulnerability analysis on the target object according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability analysis result.

[0139] In a possible implementation, the parsing result acquisition submodule may specifically include:

[0140] A computing unit, used to compute the target object according to the computing method of the blockchain vulnerability test sample to obtain a computing result;

[0141] The parsing unit is used to perform vulnerability parsing on the operation result according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability parsing result.

[0142] In a possible implementation, the object matching submodule may specifically include:

[0143] The object matching unit is used to match the blockchain vulnerability test sample with each functional module of the blockchain client respectively to obtain a target object that is the same as the vulnerability object of the blockchain vulnerability test sample.

[0144] In a possible implementation, the parsing result acquisition module 23 may specifically include:

[0145] An encapsulation unit, used to encapsulate blockchain vulnerability test samples into blockchain vulnerability test scripts;

[0146] The running unit is used to run the blockchain vulnerability test script in the blockchain client and use the running result as the vulnerability analysis result.

[0147] In a possible implementation, writing the attribute acquisition module 21 may specifically include:

[0148] The writing protocol acquisition submodule is used to obtain the writing protocol of the blockchain client;

[0149] The test sample acquisition module 22 may specifically include:

[0150] The data packet acquisition submodule is used to obtain the blockchain vulnerability data packet corresponding to the written protocol and use the blockchain vulnerability data packet as a blockchain vulnerability test sample;

[0151] The analysis result acquisition module 23 may specifically include:

[0152] The parsing result acquisition unit is used to send the blockchain vulnerability test sample to the blockchain client, obtain the parsing result of the blockchain vulnerability test sample parsed by the blockchain client, and use the parsing result as the vulnerability parsing result.

[0153] In a possible implementation, the data packet acquisition submodule may specifically include:

[0154] The data packet acquisition unit is used to analyze the type of the writing protocol; if the type of the writing protocol is an instruction protocol, all instructions in the writing protocol are acquired, a preset number of instructions are selected to form a random instruction sequence, and the random instruction sequence is packaged to obtain a blockchain vulnerability data packet; if the type of the writing protocol is a non-instruction protocol, the original blockchain data packet of the writing protocol is acquired, the data in the original blockchain data packet is modified, and a blockchain vulnerability data packet is obtained.

[0155] In a possible implementation, the method may further include:

[0156] The sending module is used for sending the writing attributes, blockchain vulnerability test samples, vulnerability analysis results and exception information to the security server after the vulnerability determination module 24 determines the vulnerability corresponding to the vulnerability information as the vulnerability of the blockchain client. If it is determined that the blockchain client has a vulnerability based on the matching result and the exception information, the security server performs a vulnerability analysis on the blockchain client based on the writing attributes, the blockchain vulnerability test samples, the vulnerability analysis results and the exception information.

[0157] Furthermore, the present application also provides a blockchain node device. The blockchain node device can be Fig. 9 The server 30 shown may also be Fig.10 The terminal 40 shown; when the blockchain node device is a server, the execution subject of the client vulnerability mining generation method of the present application can be the server, and when the blockchain node device is a terminal, the execution subject of the client vulnerability mining method of the present application can be the terminal. Fig. 9 and Fig.10 All of them are diagrams of blockchain node devices according to an exemplary embodiment. The contents in the diagrams cannot be regarded as any limitation on the scope of use of the present application.

[0158] Fig. 9 A schematic diagram of the structure of a server provided in an embodiment of the present application. The server 30 may specifically include: at least one processor 31, at least one memory 32, a power supply 33, a communication interface 34, an input / output interface 35, and a communication bus 36. The memory 32 is used to store a computer program, which is loaded and executed by the processor 31 to implement the relevant steps in the client vulnerability mining method disclosed in any of the aforementioned embodiments.

[0159] In this embodiment, the power supply 33 is used to provide working voltage for each hardware device on the server 30; the communication interface 34 can create a data transmission channel between the server 30 and external devices, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 35 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0160] In addition, the memory 32, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 321, a computer program 322, and data 323, etc. The storage method can be temporary storage or permanent storage.

[0161] Among them, the operating system 321 is used to manage and control the hardware devices and computer programs 322 on the server 30 to realize the operation and processing of the massive data 323 in the memory 32 by the processor 31, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the client vulnerability mining method disclosed in any of the following embodiments, the computer program 322 can further include a computer program that can be used to complete other specific tasks. In addition to including data such as configuration information and test instructions collected by the server, the data 323 can also include data models, performance analysis results and other data.

[0162] Fig.10 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. The terminal 40 may specifically include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.

[0163] Generally, the terminal 40 in this embodiment includes: a processor 41 and a memory 42 .

[0164] Among them, the processor 41 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 41 can 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.

[0165] The memory 42 may include one or more computer-readable storage media, which may be non-transitory. The memory 42 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 42 is at least used to store the following computer program 421, wherein, after the computer program is loaded and executed by the processor 41, it can implement the relevant steps in the client vulnerability mining method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 42 may also include an operating system 422 and data 423, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 422 may include Windows, Unix, Linux, etc. Data 423 includes but is not limited to configuration information, data models, performance analysis results, etc.

[0166] In some embodiments, the terminal 40 may further include a display screen 43 , an input / output interface 44 , a communication interface 45 , a sensor 46 , a power supply 47 , and a communication bus 48 .

[0167] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the terminal 40, and the terminal 40 may include more or fewer components than those shown in the figure.

[0168] It is understandable that the number of blockchain node devices is not limited in the embodiments of the present application, and multiple blockchain node devices may work together to complete the topological relationship generation function. Fig.11 .Depend on Fig.11 It can be seen that the hardware composition framework may include a first blockchain node device 51 and a second blockchain node device 52, and the first blockchain node device 51 and the second blockchain node device 52 are communicated through a network 53.

[0169] In the embodiment of the present application, the hardware structure of the first blockchain node device 51 and the second blockchain node device 52 can refer to Fig. 9 Servers in Fig.10 The terminal in the embodiment can be understood as having two blockchain node devices, which interact with each other to realize the client vulnerability mining function. Further, the form of the network is not limited in the embodiment of the present application. For example, the network 53 can be a wireless network (such as WIFI, Bluetooth, etc.) or a wired network.

[0170] Among them, the first blockchain node device 51 and the second blockchain node device 52 can be the same type of blockchain node device, for example, the first blockchain node device 51 and the second blockchain node device 52 are both servers 30 or both terminals 40; they can also be different types of blockchain node devices, for example, the first blockchain node device 51 can be a terminal 40, and the second blockchain node device 52 can be a server 30. In one possible situation, a server 30 with strong computing power can be used as the second blockchain node device 52 to improve data processing efficiency and reliability, thereby improving the client vulnerability mining efficiency. At the same time, a terminal 40 with low cost and wide application range is used as the first blockchain node device 51 to realize the interaction between the second blockchain node device 52 and the user.

[0171] Furthermore, in order to facilitate the user to obtain the target topological relationship, the first blockchain node device 51 can also output the vulnerability mining result after receiving the vulnerability mining result. The embodiment of the present application does not limit the output form of the first blockchain node device 51, such as using different color fonts to output different vulnerability mining results, using voice to output vulnerability mining results, etc.

[0172] For example, after obtaining the vulnerability mining instruction, the terminal sends the vulnerability mining instruction to the server. After receiving the vulnerability mining instruction, the server performs vulnerability mining on the blockchain client and obtains the corresponding vulnerability mining results. After obtaining the vulnerability mining results, the server can send the vulnerability mining results to the terminal through the network. The terminal outputs the vulnerability mining results.

[0173] Furthermore, an embodiment of the present application also discloses a storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the client vulnerability mining method disclosed in any of the aforementioned embodiments are implemented.

[0174] It should be pointed out that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

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

[0176] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A blockchain client vulnerability mining method, characterized in that: include: Obtaining a writing attribute of a blockchain client, wherein the blockchain client includes a blockchain node, and the writing attribute is an attribute based on which the blockchain client is written; Obtain a blockchain vulnerability test sample corresponding to the writing attribute; wherein the blockchain vulnerability test sample is a sample generated according to the vulnerability carried by the writing attribute; Perform vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain vulnerability analysis results, and simultaneously collect abnormal information generated by the blockchain client; The vulnerability analysis result and the vulnerability information present in the abnormal information are parsed, and the vulnerability corresponding to the vulnerability information is determined as the vulnerability of the blockchain client.

2. The method according to claim 1, characterized in that The step of obtaining the writing attributes of the blockchain client includes: Obtain the programming language type of the blockchain client; The obtaining of a blockchain vulnerability test sample corresponding to the writing attribute includes: Analyze the vulnerability types and vulnerability objects existing in the writing language type; The blockchain vulnerability test sample is generated based on the vulnerability type and the vulnerability object.

3. The method according to claim 2, characterized in that The generating the blockchain vulnerability test sample based on the vulnerability type and the vulnerability object includes: The blockchain vulnerability test sample corresponding to the vulnerability type and the vulnerability object is generated in the form of a regular expression.

4. The method according to claim 3, characterized in that The process of performing vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain a vulnerability analysis result includes: In the blockchain client, matching a target object that is the same as the vulnerability object of the blockchain vulnerability test sample; The target object is parsed according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability parsing result.

5. The method according to claim 4, characterized in that The target object is parsed according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability parsing result, including: Performing operations on the target object according to the operation method of the blockchain vulnerability test sample to obtain an operation result; The operation result is parsed according to the vulnerability type of the blockchain vulnerability test sample to obtain the vulnerability parsing result.

6. The method according to claim 4, characterized in that In the blockchain client, matching a target object that is the same as the vulnerability object of the blockchain vulnerability test sample includes: Matching the blockchain vulnerability test sample with each functional module of the blockchain client respectively to obtain the target object that is the same as the vulnerability object of the blockchain vulnerability test sample; Among them, the functional modules of the blockchain client include a transaction module, a synchronization module, a broadcast module, a remote procedure call module, and a smart contract execution module.

7. The method according to claim 2, characterized in that The process of performing vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain a vulnerability analysis result includes: Encapsulating the blockchain vulnerability test sample into a blockchain vulnerability test script; Run the blockchain vulnerability test script in the blockchain client, and use the running result as the vulnerability analysis result.

8. The method according to claim 1, characterized in that The step of obtaining the writing attributes of the blockchain client includes: Obtaining the writing protocol of the blockchain client; The obtaining of a blockchain vulnerability test sample corresponding to the writing attribute includes: Obtain a blockchain vulnerability data packet corresponding to the writing protocol, and use the blockchain vulnerability data packet as the blockchain vulnerability test sample; The process of performing vulnerability analysis on the blockchain client through the blockchain vulnerability test sample to obtain a vulnerability analysis result includes: The blockchain vulnerability test sample is sent to the blockchain client, and a parsing result of the blockchain vulnerability test sample parsed by the blockchain client is obtained, and the parsing result is used as the vulnerability parsing result.

9. The method according to claim 8, characterized in that The obtaining of a blockchain vulnerability data packet corresponding to the writing protocol includes: Analyzing the type of the written protocol; If the type of the writing protocol is an instruction protocol, all instructions in the writing protocol are obtained, a preset number of the instructions are selected to form a random instruction sequence, and the random instruction sequence is packaged to obtain the blockchain vulnerability data packet; If the type of the writing protocol is a non-instruction protocol, the original blockchain data packet of the writing protocol is obtained, and the data in the original blockchain data packet is modified to obtain the blockchain vulnerability data packet.

10. The method according to any one of claims 1 to 9, characterized in that: After determining the vulnerability corresponding to the vulnerability information as the vulnerability of the blockchain client, the method further includes: The writing attributes, the blockchain vulnerability test sample, the vulnerability analysis result and the exception information are sent to a security server, so that the security server performs a vulnerability analysis on the blockchain client based on the writing attributes, the blockchain vulnerability test sample, the vulnerability analysis result and the exception information.

11. A blockchain client vulnerability mining device, characterized in that: include: A writing attribute acquisition module, used to acquire writing attributes of a blockchain client, wherein the blockchain client includes a blockchain node, and the writing attributes are attributes based on which the blockchain client is written; A test sample acquisition module, used to acquire a blockchain vulnerability test sample corresponding to the writing attribute; wherein the blockchain vulnerability test sample is a sample generated according to the vulnerability carried by the writing attribute; A parsing result acquisition module, used to perform vulnerability parsing processing on the blockchain client through the blockchain vulnerability test sample, obtain vulnerability parsing results, and simultaneously collect abnormal information generated by the blockchain client; The vulnerability determination module is used to parse the vulnerability analysis result and the vulnerability information present in the abnormal information, and determine the vulnerability corresponding to the vulnerability information as the vulnerability of the blockchain client.

12. A blockchain node device, characterized in that: The blockchain node device includes a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the blockchain client vulnerability mining method as described in any one of claims 1 to 10.

13. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the blockchain client vulnerability mining method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Method and system for detecting vulnerability

    CN102651060A

  • Efficient protocol client vulnerability mining method and system

    CN108337266A

  • A highly automated intelligent contract formal verification system and method

    CN108985073A

  • Program vulnerability mining method, device, terminal, and storage medium

    CN109086606A

  • A vulnerability detection method and device

    CN109446814A