• English
  • Deutsch
  • Log In
    Password Login
    Research Outputs
    Fundings & Projects
    Researchers
    Institutes
    Statistics
Repository logo
Fraunhofer-Gesellschaft
  1. Home
  2. Fraunhofer-Gesellschaft
  3. Scopus
  4. Analyzing the Impact of Copying-and-Pasting Vulnerable Solidity Code Snippets from Question-and-Answer Websites
 
  • Details
  • Full
Options
2024
Conference Paper
Title

Analyzing the Impact of Copying-and-Pasting Vulnerable Solidity Code Snippets from Question-and-Answer Websites

Abstract
Ethereum smart contracts are executable programs deployed on a blockchain. Once deployed, they cannot be updated due to their inherent immutability. Moreover, they often manage valuable assets that are worth millions of dollars, making them attractive targets for attackers. The introduction of vulnerabilities in programs due to the reuse of vulnerable code posted on Q&A websites such as Stack Overflow is not a new issue. However, little effort has been made to analyze the extent of this issue on deployed smart contracts. In this paper, we conduct a study on the impact of vulnerable code reuse from Q&A websites during the development of smart contracts and provide tools uniquely fit to detect vulnerable code patterns in complete and incomplete Smart Contract code. This paper proposes a pattern-based vulnerability detection tool that is able to analyze code snippets (i.e., incomplete code) as well as full smart contracts based on the concept of code property graphs. We also propose a methodology that leverages fuzzy hashing to quickly detect code clones of vulnerable snippets among deployed smart contracts. Our results show that our vulnerability search, as well as our code clone detection, are comparable to state-of-the-art while being applicable to code snippets. Our large-scale study on 18,660 code snippets reveals that 4,596 of them are vulnerable, out of which 616 can be found in 17,852 deployed smart contracts. These results highlight that the reuse of vulnerable code snippets is indeed an issue in currently deployed smart contracts.
Author(s)
Weiss, Konrad
Fraunhofer-Institut für Angewandte und Integrierte Sicherheit AISEC  
Ferreira Torres, Christof
ETH Zürich
Wendland, Florian  
Fraunhofer-Institut für Angewandte und Integrierte Sicherheit AISEC  
Mainwork
IMC 2024, Internet Measurement Conference. Proceedings  
Conference
Internet Measurement Conference 2024  
Open Access
File(s)
Download (3.73 MB)
Rights
CC BY 4.0: Creative Commons Attribution
DOI
10.1145/3646547.3688437
10.24406/publica-5397
Additional link
Full text
Language
English
Fraunhofer-Institut für Angewandte und Integrierte Sicherheit AISEC  
Keyword(s)
  • code property graph

  • code snippets

  • fuzzy hashing

  • smart contracts

  • Cookie settings
  • Imprint
  • Privacy policy
  • Api
  • Contact
© 2024