Smart contract defect triggerability detection method and system based on defect summary
A technology of smart contracts and detection methods, applied in error detection/correction, platform integrity maintenance, software testing/debugging, etc., can solve the code defects of detection results, cannot well describe the security status of smart contracts, and predict system security risks and prevention of problems such as limited reference significance, to achieve the effect of protecting safety
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
specific Embodiment 1
[0088] The detection process of a smart contract defect triggerability detection method based on defect summary is as follows:
[0089] Step 1. For the defects of the smart contract to be detected, define the defect triggering constraints (the defect triggering constraints are fixed); the agreed symbol σs represents the contract execution stack, INS represents the currently executed instructions and defines related functions, The relevant functions include: zero extension function ZeroExt, sign extension function SignExt and unsigned number comparison function UGT, etc.
[0090] Take the unsigned number comparison function UGT as an example. When the first parameter is greater than the second parameter, UGT returns true, otherwise it returns false; for example, the defect trigger condition of subtraction overflow of uint256 data can be expressed as:
[0091] {INS==SUB,UGT(σs[1],σs[0])}
[0092] Step 2. Select any symbolic execution tool to extract the path constraint set T wh...
specific Embodiment 2
[0103] The detection process of a smart contract defect triggerability detection method based on defect summary is as follows:
[0104] Step 1: Select the open source tool Oyente as the symbolic execution tool;
[0105] Step 2: Use the open source tool ethereumetl to obtain the smart contract existing in Ethereum as a test case;
[0106] Step 3: Use Oyente to perform symbolic execution on all test cases to obtain a defect summary for each test case;
[0107] Step 4: When the contract call for the smart contract in the test case occurs, obtain the status data of the smart contract and the contract call data;
[0108] Step 5: Use real data to replace the symbols in the path constraints and defect trigger condition constraints obtained by symbolic execution with real values;
[0109] Step 6: For path constraints and defect trigger condition constraints whose symbols are replaced with real values, Z3 is used to solve the constraints and calculate whether all constraints have sol...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


