Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Vulnerability detection method for smart contract code snippets and related device

A code fragment and vulnerability detection technology, applied in computer security devices, instruments, electrical digital data processing, etc., can solve the problem that code fragments cannot be detected for vulnerabilities

Pending Publication Date: 2022-03-18
SUN YAT SEN UNIV
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] This application provides a vulnerability detection method and related devices for smart contract code fragments, which solves the problem that existing vulnerability detection methods can only detect vulnerabilities in complete smart contracts that can generate bytecodes, and for partial code fragments Technical issues that prevent vulnerability detection

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Vulnerability detection method for smart contract code snippets and related device
  • Vulnerability detection method for smart contract code snippets and related device
  • Vulnerability detection method for smart contract code snippets and related device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] The embodiment of this application provides a vulnerability detection method and related devices for smart contract code fragments, which solves the problem that existing vulnerability detection methods can only detect vulnerabilities in complete smart contracts that can generate bytecodes, and for partial Technical issues where code fragments cannot be exploited for vulnerability detection.

[0052] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a vulnerability detection method for a code snippet of a smart contract and a related device. The method comprises the following steps: acquiring the code snippet of the smart contract to be detected; converting data in the code snippets into an abstract syntax tree; comparing the abstract syntax tree with a local tree in a code contract library to obtain a plurality of target trees similar to the abstract syntax tree; and based on the vulnerability result of the target tree, obtaining a vulnerability detection result of the code snippet. The technical problem that an existing vulnerability detection method can only detect vulnerabilities in a complete smart contract capable of generating byte codes and cannot perform vulnerability detection on local code snippets is solved.

Description

technical field [0001] The present application relates to the field of blockchain, and in particular to a method for detecting vulnerabilities in smart contract code fragments and related devices. Background technique [0002] With the rise of the blockchain, smart contracts have attracted people's attention as running scripts on the blockchain. Smart contracts are distributed, tamper-proof programs that run on the blockchain. Since smart contracts can be flexibly embedded in various digital assets to achieve safe and effective information exchange and value transfer, they have been widely used in supply chain, smart home, e-commerce and asset management and other fields. [0003] Smart contracts involve transactions of blockchain tokens, which are easy targets for attacks, so it is necessary to conduct vulnerability detection for smart contracts. Existing vulnerability detection methods can only detect vulnerabilities in complete smart contracts that can generate bytecode...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F21/56G06F21/57
CPCG06F21/563G06F21/577
Inventor 刘一帆陈湘萍黄袁周晓聪郑子彬
Owner SUN YAT SEN UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products