Intelligent contract malicious transaction detection and analysis system and method based on dynamic data storage

Through the smart contract malicious transaction detection system based on dynamic data storage, the combination of simulated execution and attack identification modules solves the problems of low effectiveness and large space occupation of existing detection methods, and achieves efficient and fast malicious transaction and vulnerability detection. , and does not affect the normal operation of Ethereum.

CN114491508BActive Publication Date: 2024-09-17WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210053786.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-18
Publication Date
2024-09-17
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

Existing smart contract vulnerability detection methods are not effective enough and take up a lot of space. They do not take into account the high correlation between attack characteristics and honeypot contracts and the deployment and operation overhead of the contract's built-in probe program.

Method used

A smart contract malicious transaction detection system based on dynamic storage of data is used to obtain transaction information through the transaction data acquisition module. The simulation execution module simulates the replay of the bytecode-level execution process of historical transactions, generates intermediate data and dynamically stores it, and the attack identification module identifies and Report malicious trading behavior and smart contract vulnerabilities.

Benefits of technology

It implements an efficient detection process, takes up only a small space, and can quickly identify malicious transactions and vulnerabilities without changing the Ethereum source code. It can run independently and interact normally with Ethereum.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491508B
    Figure CN114491508B
Patent Text Reader

Abstract

The present invention provides a system and method for detecting and analyzing malicious transactions of smart contracts based on dynamic data storage, wherein the system includes a transaction information acquisition module for crawling and managing all historical transactions and execution information of Ethereum; a simulation execution module for constructing a stack according to the bytecode-level execution process of the acquired transaction and simulating transaction execution; an attack identification module for analyzing stack data, detecting and identifying malicious transaction behaviors and vulnerabilities of vulnerable smart contracts, and providing an identification result report. The detection system performs comprehensive analysis and detection by calling the interfaces provided by the above three modules. The present invention proposes a detection idea based on data reverse logic, and the method has good practicality and scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a system and method for detecting and analyzing malicious transactions of smart contracts based on dynamic data storage. Background Art

[0002] Blockchain is a shared distributed ledger technology, a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Smart contract is a special application running on blockchain, which allows irreversible and trusted transactions without third-party monitoring. For smart contracts, transactions are usually generated by calling their functions.

[0003] At present, there are tens of billions of dollars of digital currency stored in smart contracts on the Ethereum chain, but smart contracts also face serious security threats. According to statistics, as of December 2019, the number of DApps running on public chains such as ETH, EOS, and TRON exceeded 3,000, and there were more than 100 smart contract vulnerability incidents. The internationally renowned Anbi Lab conducted a deep scan and detected the source code of 23,357 smart contracts currently in operation, and found that a total of 405,882 of them did not comply with security development specifications. Smart contract vulnerabilities not only cause huge economic losses to users, but also undermine the public's trust in smart contracts and the application ecosystem based on Ethereum. It can be seen that it is very necessary to develop an accurate and in-depth smart contract vulnerability detection tool.

[0004] Although the existing dynamic detection methods for smart contract vulnerabilities can be executed and cover deeper execution paths and a larger vulnerability detection range. However, there are still shortcomings such as huge data storage, insufficient use of transaction data, and the need to be embedded in the Ethereum client. In addition, in the prior art, in order to solve the security problems caused by the unpredictability of smart contract attack behaviors, a blockchain-based smart contract intrusion detection method was proposed. However, the applicant found through research that it did not consider the high correlation between attack characteristics and honeypot contracts, the deployment and operation overhead of additional codes such as built-in probe programs in contracts, and therefore there are technical problems such as insufficient detection effectiveness and the need to occupy a large space. Summary of the invention

[0005] The present invention proposes a smart contract malicious transaction detection and analysis system and method based on dynamic data storage, which is used to solve the technical problems existing in the prior art of insufficient detection effectiveness and large space occupation.

[0006] In order to solve the above technical problems, the first aspect of the present invention discloses a smart contract malicious transaction detection and analysis system based on dynamic data storage, comprising:

[0007] The transaction data acquisition module is used to obtain detailed information of the transaction, including transaction hash and executed bytecode;

[0008] The simulation execution module is used to simulate and replay the bytecode-level execution process information of historical transactions based on the acquired transaction details, build a stack, generate intermediate data and logic, dynamically store the generated intermediate data, and map the generated logic to the data index setting;

[0009] The attack identification module is used to analyze and detect transaction execution information based on the generated intermediate data and logic, and to identify and report malicious transaction behaviors and smart contract vulnerabilities.

[0010] In one implementation, the transaction data acquisition module is specifically used to:

[0011] Get block information from Ethereum,

[0012] Get the included execution bytecode of the transaction from Ethereum according to the transaction hash recorded in the block.

[0013] In one embodiment, the simulation execution module includes a virtual machine simulation execution unit and a dynamic data storage unit, wherein the virtual machine simulation execution unit is used to perform bytecode-level fine-grained replay of historical transactions, and the dynamic data storage unit is used to build a stack and dynamically store intermediate data generated during the simulation process, which is released when used up.

[0014] In one embodiment, the basic attributes of the virtual machine simulation execution unit include virtual memory, virtual registers, instruction interpretation system and execution engine, and the dynamic data storage unit includes structured storage of intermediate data in the virtual memory and logical data mapping index.

[0015] In one embodiment, the attack identification module includes an attack feature definition unit and an attack behavior matching detection unit, which are respectively used to define malicious behavior and analyze and detect the contract call process.

[0016] In one embodiment, the attack feature definition unit includes a reentry attack, and the attack behavior matching detection subunit is specifically used to define malicious behavior in combination with dynamic data storage and attack.

[0017] Based on the same inventive concept, the second aspect of the present invention provides a method for detecting and analyzing malicious transactions of smart contracts based on dynamic data storage, comprising:

[0018] The system starts and obtains detailed information of the transaction through the transaction data acquisition module, including transaction hash and executed bytecode;

[0019] Load real-time transactions through the simulation execution module, simulate and replay transaction bytecode, and generate real-time register data based on the calling relationship between contracts;

[0020] The transaction information acquisition module starts the storage management subunit to save the dynamic data generated by the simulated execution virtual machine in the form of stack and memory data, and the dynamic data is intermediate data;

[0021] The attack behavior matching detection subunit performs data analysis based on the predetermined data index pattern and combined with the attack feature definition;

[0022] The attack identification module analyzes and detects transaction execution information based on the generated intermediate data and logic, and identifies and reports malicious transaction behaviors and smart contract vulnerabilities.

[0023] The above one or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:

[0024] The invention provides a smart contract malicious transaction detection and analysis system based on dynamic data storage. The simulation execution module can simulate and replay the historical transaction bytecode-level execution process information according to the acquired transaction details, build a stack, generate intermediate data and logic, dynamically store the generated intermediate data, and map the generated logic to the data index setting. The transaction logic process can be reversed from the intermediate data on the virtual storage such as the virtual stack and memory generated by the execution bytecode, and a method of dynamic data storage and logic indexing is proposed, that is, only the data generated during the virtual machine analysis is stored and released after use; the logic can be indexed with the corresponding data in the form of mapping. This method allows the detection process to only take up a small space, but can have a very fast rate.

[0025] On the one hand, the dependencies of data and logic can be stored in a new way, where the related logic can be collected for detection. On the other hand, when the data is no longer needed, the storage space of the related logic can be released to save space. The simulated virtual machine reruns the transactions generated by the smart contract, and stores the logic and data of the smart contract generated at runtime in a special data structure. Finally, the logic and data characteristics are analyzed through the pre-set detection rules to determine the vulnerabilities and attacks in the smart contract. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1The architecture of the smart contract malicious transaction detection system with dynamic data storage provided in the embodiment of the present invention;

[0028] Figure 2 This is a functional classification diagram of the smart contract malicious transaction detection system according to an embodiment of the present invention;

[0029] Figure 3 A flowchart of a method for detecting malicious transactions in smart contracts provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The technical problem to be solved by the present invention is to provide a smart contract malicious transaction detection system based on dynamic data storage. The system obtains the dynamic data and call relationship of the transaction execution process by simulating and replaying the transaction at the bytecode level according to the attack characteristics and attributes of specific vulnerabilities, and refines the contract interaction logical relationship of the transaction. When the analysis detects that the transaction contains malicious behavior, it gives a warning and vulnerability location information.

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] Embodiment 1

[0033] The embodiment of the present invention provides a smart contract malicious transaction detection and analysis system based on dynamic data storage, including:

[0034] The transaction data acquisition module is used to obtain detailed information of the transaction, including transaction hash and executed bytecode;

[0035] The simulation execution module is used to simulate and replay the bytecode-level execution process information of historical transactions based on the acquired transaction details, build a stack, generate intermediate data and logic, dynamically store the generated intermediate data, and map the generated logic to the data index setting;

[0036] The attack identification module is used to analyze and detect transaction execution information based on the generated intermediate data and logic, and to identify and report malicious transaction behaviors and smart contract vulnerabilities.

[0037] Specifically, the transaction information acquisition module serves as the data acquisition subsystem of the entire detection system, and is used to synchronize transaction and block information from Ethereum. The simulation execution module is used to simulate and replay the bytecode-level execution process information of historical transactions and perform stack construction. The attack identification module is used to analyze and detect transaction execution information, identify and report malicious transaction behaviors and smart contract vulnerabilities.

[0038] Intermediate data refers to the data generated on the stack, storage, and memory when bytecode is executed.

[0039] In one implementation, the transaction data acquisition module is specifically used to:

[0040] Get block information from Ethereum,

[0041] Get the included execution bytecode of the transaction from Ethereum according to the transaction hash recorded in the block.

[0042] In one embodiment, the simulation execution module includes a virtual machine simulation execution unit and a dynamic data storage unit, wherein the virtual machine simulation execution unit is used to perform bytecode-level fine-grained replay of historical transactions, and the dynamic data storage unit is used to build a stack and dynamically store intermediate data generated during the simulation process, which is released when used up.

[0043] In one embodiment, the basic attributes of the virtual machine simulation execution unit include virtual memory, virtual registers, instruction interpretation system and execution engine, and the dynamic data storage unit includes structured storage of intermediate data in the virtual memory and logical data mapping index.

[0044] In one embodiment, the attack identification module includes an attack feature definition unit and an attack behavior matching detection unit, which are respectively used to define malicious behavior and analyze and detect the contract call process.

[0045] In one embodiment, the attack feature definition unit includes a reentry attack, and the attack behavior matching detection subunit is specifically used to define malicious behavior in combination with dynamic data storage and attack.

[0046] The attack feature definition unit includes reentrancy attack features and may also include a variety of other contract layer vulnerability attack feature attributes.

[0047] In the prior art, CN111683084A discloses a smart contract intrusion detection method, apparatus, terminal device and storage medium. This solution does not take into account the high correlation between attack features and honeypot contracts, the deployment and operation overhead of additional codes such as built-in probe programs in contracts, and the feature capture range is not high, resulting in low detection effectiveness and high operation overhead.

[0048] In general, the main innovation of the system and method provided by the present invention is to reverse the transaction logic process from the intermediate data on the virtual storage such as the virtual stack and memory generated by the execution bytecode, and propose a method of dynamic data storage and logical indexing, that is: only the data generated during the virtual machine analysis is stored and released after use; the logic can be indexed with the corresponding data in the form of mapping. This method allows the detection process to occupy only a small space but can have a very fast speed.

[0049] On the one hand, the dependencies of data and logic can be stored in a new way, where the related logic can be collected for detection. On the other hand, when the data is no longer needed, the storage space of the related logic can be released to save space. The simulated virtual machine reruns the transactions generated by the smart contract, and stores the logic and data of the smart contract generated at runtime in a special data structure. Finally, the logic and data characteristics are analyzed through the pre-set detection rules to determine the vulnerabilities and attacks in the smart contract.

[0050] Compared with the prior art, the method provided by the present invention has the following main advantages:

[0051] First, by indexing the corresponding logic of the data (the logic can be indexed by the corresponding data in the form of mapping), transaction analysis by reverse deducing the logic from the data is realized, avoiding the need to store large amounts of data.

[0052] Second, in terms of bytecode data type recovery, due to the complexity of smart contract compilation, it is not possible to determine whether the data in the stack has practical significance, nor can it determine the data type of each data. To address this problem, this work studies the smart contract compilation process, finds the objective rules of the underlying smart contract processing of different data types, and proposes a data type prediction scheme based on bytecode context, while detecting integer overflow attacks during transactions.

[0053] Third, unlike traditional smart contract dynamic detection tools, the tool implemented in this work does not change the Ethereum source code, but can run independently of Ethereum while achieving normal interaction with Ethereum, which greatly facilitates user use.

[0054] Fourth, the visualization of knowledge graphs can help professionals conduct more in-depth and targeted research and analysis on certain specific issues.

[0055] Embodiment 2

[0056] Based on the same inventive concept, this embodiment provides a method for detecting and analyzing malicious transactions of smart contracts based on dynamic data storage, including:

[0057] The system starts and obtains detailed information of the transaction through the transaction data acquisition module, including transaction hash and executed bytecode;

[0058] Load real-time transactions through the simulation execution module, simulate and replay transaction bytecode, and generate real-time register data based on the calling relationship between contracts;

[0059] The transaction information acquisition module starts the storage management subunit to save the dynamic data generated by the simulated execution virtual machine in the form of stack and memory data, and the dynamic data is intermediate data;

[0060] The attack behavior matching detection subunit performs data analysis based on the predetermined data index pattern and combined with the attack feature definition;

[0061] The attack identification module analyzes and detects transaction execution information based on the generated intermediate data and logic, and identifies and reports malicious transaction behaviors and smart contract vulnerabilities.

[0062] See also Figure 3 , which is a flow chart of a method for detecting malicious transactions in smart contracts provided in an embodiment of the present invention.

[0063] Specifically, the design ideas of the detection system and method provided by the present invention are as follows: Figure 1 As shown in the figure, combined with the general process of dynamic detection of Ethereum smart contracts, the transaction data acquisition module is used as the bottom layer of the entire system, which is the source of raw data for subsequent analysis; the simulation execution module is responsible for replaying the execution of transaction instructions and building the execution process and intermediate data of the entire transaction; the attack identification module gives real-time warnings and vulnerability information reports based on the output of simulation execution and the characteristic attributes of vulnerability attacks. Figure 2 As shown, based on this basic function, the system has been expanded to manage three aspects: blockchain, account and smart contract, so that users can easily use tools independently for blockchain. The basic operation will start the blockchain connection and connect the tool to Ethereum to start detection. Account management can realize the application of new accounts and the viewing of existing accounts. Contract management can realize the compilation of source code contracts, the disassembly of on-chain contract bytecode, contract deployment and operation.

[0064] In the specific implementation process, malicious transaction detection includes the following steps:

[0065] (1) Connect to Ethereum, and the transaction data acquisition module obtains the real-time transaction JSON form from the chain;

[0066] (2) The simulation execution module (simulation execution virtual machine) replays the transaction according to the transaction bytecode and constructs the virtual memory and register intermediate data;

[0067] (3) The attack identification module combines the intermediate data with the attack detection strategy, analyzes and detects the intermediate data, and generates a transaction detection report. If necessary, it will automatically provide transaction warning information and vulnerability location.

[0068] The following attack types can be detected:

[0069] (1) Origin phishing: When the non-repeated call depth in a transaction is greater than 2 and the bytecode contains instructions or logical relationships that compare the ORIGIN instruction, the transaction is considered to be at risk of triggering an origin phishing vulnerability;

[0070] (2) Reentrancy vulnerability: The most obvious feature of reentrancy vulnerability is repeated calls between two contracts. This invention uses this as a detection feature for this type of malicious behavior;

[0071] (3) Integer overflow: In combination with the bytecode untyped number recovery algorithm proposed in the present invention, the integer type and value are recovered when the virtual machine simulates the execution of transactions, and the overflow that may be caused by the operation is checked in combination with the mathematical operation rules;

[0072] (4) Stack overflow: The number of EVM stack frames is 1024. Therefore, within the same transaction, when the difference between the virtual stack pointers ebp and esp is greater than the stack frame upper limit, a stack overflow attack must have occurred.

[0073] (5) Timestamp dependency: If there is a comparison of the Unix timestamp instruction TIMESTAMP during the bytecode execution process, the transaction is at risk of a timestamp dependency attack;

[0074] (6) Unchecked call: Not checking the return result of an external call may cause various unexpected situations. Therefore, when there is no comparison return value after the call class instruction {CALL, CALLCODE, DELEGATECALL} in the virtual stack, unexpected situations caused by unchecked calls may be triggered;

[0075] (7) Suicide vulnerability: The suicide vulnerability can use the legality check of the caller as a basis for judgment;

[0076] (8) Exception disorder: Exception disorder means that an exception occurs during the execution of the contract code, but no processing is done, which ultimately causes the contract status to be inconsistent with expectations.

[0077] According to the above process, the specific vulnerability detection method is:

[0078] 1) The user starts the transaction detection system, connects to the Ethereum mainnet, obtains real-time transactions on the chain, and obtains the transaction bytecode execution process, which is stored as a .json file;

[0079] 2) The system starts the virtual machine. The execution engine of the virtual machine drives the interpreter to read the transaction bytecode one by one and execute the actions specified by the instructions. The intermediate data is written to the virtual call stack and virtual memory, or read from it. The logical relationship is extracted through data. The system also provides a call stack to view the specific step-by-step execution process, helping users to determine possible vulnerability locations or other execution details;

[0080] 3) The intermediate data and the corresponding logical relations are stored in the data memory and the logic memory respectively;

[0081] 4) The execution supervisor of the attack identification module reads the intermediate transaction data and logic, and the behavior matching detector performs feature matching one by one in combination with the predefined attack behavior feature strategy;

[0082] 5) Return the transaction detection report to the user, including possible warning information and bytecode-level vulnerability location.

[0083] The above process is highly automated and does not require much user operation.

[0084] Let's take the timestamp dependence vulnerability as an example:

[0085] by Figure 1 to Figure 3 As shown ( Figure 2 The malicious transaction detection platform in the embodiment is a smart contract malicious transaction detection and analysis system based on dynamic data storage), and the smart contract malicious transaction detection system based on dynamic data storage provided in this embodiment is introduced. The system includes:

[0086] The transaction data acquisition module serves as the data acquisition subsystem of the entire detection system;

[0087] The simulation execution module is used to simulate and replay the bytecode-level execution process of historical transactions and build the stack;

[0088] The attack identification module is used to analyze and detect transaction execution information, identify and report malicious transaction behaviors and smart contract vulnerabilities.

[0089] The transaction data acquisition module can obtain transaction and block information from Ethereum;

[0090] The simulation execution module is equipped with a virtual machine simulation execution unit and a dynamic data storage unit, which are used for fine-grained replay of historical transactions at the bytecode level and dynamic storage of data on the stack and memory during execution. The basic attributes of the virtual machine simulation execution unit include virtual memory, virtual registers, instruction interpretation system and execution engine. The dynamic data storage unit includes data storage methods and data indexing methods. Dynamic data includes data on the stack and data in memory.

[0091] The attack identification module is equipped with an attack feature definition unit and an attack behavior matching detection unit, which are used to define malicious behaviors and analyze and detect contract call processes. The attack feature definition unit contains multiple contract layer vulnerability attack feature attributes such as reentry attacks, and the attack behavior matching detection subunit combines dynamic data storage and attack feature definition.

[0092] The startup and detection process of the smart contract malicious transaction detection system based on dynamic data storage includes:

[0093] 1) The user starts the system, enters the blockchain management, and connects to the Ethereum mainnet;

[0094] 2) Obtain real-time transactions on the chain. The system obtains the bytecode execution record of the transaction from the archive node (which can obtain the specific bytecode execution record of the transaction) according to the transaction hash (transactionHash), and then stores it in a .json file;

[0095] 3) The system loads the transaction bytecode, starts the simulated execution virtual machine and initializes the stack, memory, pointers, etc. Before executing the bytecode to simulate and replay the transaction, it will first record the transaction's gas, block hash BlockHash and other necessary information;

[0096] 4) The virtual machine starts to simulate the execution of the transaction. The execution engine drives the interpreter to read the transaction bytecode instructions one by one and execute the actions specified by the instructions. The intermediate data is written into the virtual call stack Stack and virtual memory Memory, or read from them. The logical relationship is extracted from the intermediate data. The user can also call up the call stack to view the specific step-by-step execution process;

[0097] 5) Storing intermediate data and logical relationships, where the logical relationships are stored in a way that can be indexed by data;

[0098] 6) The execution supervisor of the attack identification module reads the transaction intermediate data and logic, and drives the behavior matching detector to check whether an instruction segment contains both the instruction TIMESTAMP for obtaining the current Unix timestamp and the instruction set s={"LT","GT","SLT","SGT","EQ","ISZERO"} for comparing the value pushed into the stack. We assume that this situation exists in the code segment;

[0099] 7) The system detects the risk of timestamp-dependent vulnerability attacks, issues malicious transaction warnings to users, and provides vulnerability location detection reports.

[0100] In summary, after the system is connected to Ethereum and obtains complete transaction data, the present invention first initializes the virtual machine, loads and sets the necessary transaction information and storage units such as virtual registers, and then drives the interpreter to execute instructions one by one through the execution engine, and makes the intermediate data interact with the virtual registers and virtual memory. The logical relationship will be extracted from the intermediate data. After that, the data and logic are stored in the corresponding memory respectively, and the execution supervisor reads the data and logic and hands them over to the behavior matching detector, and malicious transaction features are matched by combining the vulnerability behavior features given by the attack feature definition system, and alarm information and vulnerability detection reports are given when necessary. In combination with the actual needs of dynamic detection, the present invention logically divides the detection process into a three-layer structure, and the layers are closely related, which effectively describes the process of the system establishing dynamic attack detection, and is convenient for the development and testing of prototype systems; in view of the problems of tool availability and degree of automation, optimizations are made in terms of user use and actual efficiency compared to existing tools.

[0101] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. Intelligent contract malicious transaction detection and analysis system based on dynamic data storage, It is characterized in that include: The transaction data acquisition module is used to obtain detailed information of the transaction, including transaction hash and executed bytecode; The simulation execution module is used to simulate and replay the bytecode-level execution process information of historical transactions according to the detailed information of the acquired transactions, build a stack, generate intermediate data and logic, dynamically store the generated intermediate data, and map the generated logic setting data index. The simulation execution module includes a virtual machine simulation execution unit and a dynamic data storage unit. The virtual machine simulation execution unit is used to perform bytecode-level fine-grained replay of historical transactions, and the dynamic data storage unit is used to build a stack and dynamically store the intermediate data generated during the simulation process, which will be released after use. The attack identification module is used to analyze and detect transaction execution information based on the generated intermediate data and logic, and to identify and report malicious transaction behaviors and smart contract vulnerabilities.

2. The smart contract malicious transaction detection and analysis system as claimed in claim 1, It is characterized in that The transaction data acquisition module is specifically used for: Get block information from Ethereum, Get the included execution bytecode of the transaction from Ethereum according to the transaction hash recorded in the block.

3. The smart contract malicious transaction detection and analysis system as claimed in claim 1, It is characterized in that The basic properties of the virtual machine simulation execution unit include virtual memory, virtual registers, instruction interpretation system and execution engine. The dynamic data storage unit contains the structured storage of intermediate data in the virtual memory and the logical data mapping index.

4. The smart contract malicious transaction detection and analysis system according to claim 1, It is characterized in that The attack identification module includes an attack feature definition unit and an attack behavior matching detection unit, which are used to define malicious behaviors and analyze and detect contract call processes respectively.

5. The smart contract malicious transaction detection and analysis system as claimed in claim 4, It is characterized in that The attack feature definition unit includes reentry attacks, and the attack behavior matching detection subunit is specifically used to define malicious behaviors in combination with dynamic data storage and attacks.

6. Detection and analysis method of malicious transactions in smart contracts based on dynamic data storage, It is characterized in that include: The system starts and obtains detailed information of the transaction through the transaction data acquisition module, including transaction hash and executed bytecode; The real-time transaction is loaded through the simulation execution module, and the transaction bytecode is simulated and replayed to generate real-time register data based on the calling relationship between contracts. The simulation execution module includes a virtual machine simulation execution unit and a dynamic data storage unit. The virtual machine simulation execution unit is used to perform bytecode-level fine-grained replay of historical transactions, and the dynamic data storage unit is used to build a stack and dynamically store the intermediate data generated during the simulation process, which will be released after use. The transaction information acquisition module starts the storage management subunit to save the dynamic data generated by the simulated execution virtual machine in the form of stack and memory data, and the dynamic data is intermediate data; The attack behavior matching detection subunit performs data analysis based on the predetermined data index pattern and combined with the attack feature definition; The attack identification module analyzes and detects transaction execution information based on the generated intermediate data and logic, and identifies and reports malicious transaction behaviors and smart contract vulnerabilities.