EthSecurity1 / Web3Bugs

Demystifying Exploitable Bugs in Smart Contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demystifying Exploitable Bugs in Smart Contracts

integrity validation

loading-ag-167

This project aims to provide a valuable resource for Web3 developers and security analysts by facilitating their understanding of exploitable bugs in smart contracts. We conduct a thorough analysis of exploitable bugs extracted from code4rena and classify each bug according to its nature.

Our initial research suggests that a notable proportion of exploitable bugs in smart contracts are functional bugs, which cannot be detected using simple and general oracles like reentrancy. We aim to raise awareness about the significance of such bugs and encourage practitioners to develop more sophisticated and nuanced automatic semantical oracles to detect them.


𝙰 πšœπš’πšπš—πš’πšπš’πšŒπšŠπš—πš πš—πšžπš–πš‹πšŽπš› 𝚘𝚏 πšŽπš‘πš™πš•πš˜πš’πšπšŠπš‹πš•πšŽ πš‹πšžπšπšœ πš’πš— πšœπš–πšŠπš›πš πšŒπš˜πš—πšπš›πšŠπšŒπšπšœ πšπšŠπš•πš• πšžπš—πšπšŽπš› πšπš‘πšŽ πšŒπšŠπšπšŽπšπš˜πš›πš’ 𝚘𝚏 πšπšžπš—πšŒπšπš’πš˜πš—πšŠπš• πš‹πšžπšπšœ, πš πš‘πš’πšŒπš‘ πšŒπšŠπš—πš—πš˜πš πš‹πšŽ 𝚍𝚎𝚝𝚎𝚌𝚝𝚎𝚍 πšžπšœπš’πš—πš πšœπš’πš–πš™πš•πšŽ πšŠπš—πš πšπšŽπš—πšŽπš›πšŠπš• πš˜πš›πšŠπšŒπš•πšŽπšœ.


Please be aware that this repository is currently undergoing active development, and the data may change over time due to ongoing code4rena contests.

Vulnerability Detection with Automatic Semantical Oracles

We plan to compile an extensive list of vulnerability detection techniques that prioritize the development of semantical oracles for smart contracts.

We warmly welcome any additional suggestions or contributions from the community to help expand and improve the list. These techniques can be sourced from a variety of materials, such as peer-reviewed research papers, pre-prints, industry tools, online resources, and more.

Folder Structure

The dataset is organized into four folders:

  • papers/: contains our ICSE23 paper summarizing our preliminary results, as well as the supplementary material for the paper.
  • results/: contains the bug classification in bugs.csv and the description for each contest in contests.csv.
  • contracts/: contains all the smart contracts that we examined, using the version at the time of the contest.
  • reports/: contains all the reports provided by code4rena.

Bug Labels

We classify the surveyed bugs into three main categories based on their nature:

  • Out-of-scope bugs (denoted by O)
  • Bugs with simple and general testing oracles (denoted by L)
  • Bugs that require high-level semantical oracles (denoted by S)

As classifying functional bugs can be ambiguous, we welcome suggestions to improve our classification standards. You can find more detailed label information in our documentation, and we encourage you to refer to our current classification guidelines for more information.

Contributing

We welcome all types of contributions to our project, including but not limited to:

  • Suggesting new reference techniques for prioritizing smart contract vulnerability detection with semantical oracles.
  • Adding newly disclosed code4rena contest bugs.
  • Suggesting improvements to the classification standard
  • Correcting mislabeled bugs

Further details can be found in our contribution guidelines.

Cite

  • Zhuo Zhang, Brian Zhang, Wen Xu, Zhiqiang Lin, "Demystifying Exploitable Bugs in Smart Contracts." In Proceedings of the 45th International Conference on Software Engineering, 2023.

Clarification

Please refer to our classification documentation.

Acknowledgments

We would like to extend our sincere thanks to code4rena for making this valuable information publicly available.

About

Demystifying Exploitable Bugs in Smart Contracts


Languages

Language:Solidity 41.9%Language:TypeScript 26.4%Language:JavaScript 19.9%Language:Python 4.0%Language:HTML 3.8%Language:Go 1.2%Language:Vyper 0.8%Language:Rust 0.7%Language:Reason 0.5%Language:ReScript 0.5%Language:Ruby 0.2%Language:Shell 0.1%Language:Makefile 0.0%Language:Handlebars 0.0%Language:CSS 0.0%Language:Dockerfile 0.0%Language:Nix 0.0%Language:Perl 0.0%