Propostas

DEI - FCTUC
Gerado a 2024-05-20 04:07:30 (Europe/Lisbon).
Voltar

Titulo Estágio

Vulnerability Injector for Smart Contracts

Áreas de especialidade

Sistemas Inteligentes

Engenharia de Software

Local do Estágio

DEI-FCTUC

Enquadramento

Smart contracts play an important role in advancing blockchain as they expand the application of the technology to various domains (e.g., finance (Hewa et al., 2021), education (Grech and Camilleri, 2017), healthcare (Agbo et al., 2019), government (Geneiatakis et al., 2020)). While they are essential for the consolidation and expansion of the technology, they also bring serious risks, namely those associated with the potential presence of vulnerabilities that can affect the security of the blockchain system (Atzei et al., 2017).
Just as conventional programs, smart contracts are being deployed with residual software faults (i.e., bugs or defects), including security vulnerabilities (i.e., internal faults that enable external events to harm the system) (Qian et al., 2022; Avizienis et al., 2004). However, the consequences of deploying a faulty contract have particular characteristics in the context of blockchain systems, such as: i) if faulty code is identified, the respective contract cannot be patched, it must be terminated, and a new one should be created (Zou et al., 2019); ii) once the potentially erroneous data (generated/updated by faulty contracts) has been stored in the blockchain, there is no way to change it, i.e., to undo the respective transactions (and subsequent transactions that rely on this data) (Yaga et al., 2018); and iii) if the faulty contract has been executed, the associated impact may be irreparable (e.g., reputation costs) (Antonopoulos and Wood, 2018). Several initiatives have been created that ultimately aim at contributing to the development of more secure smart contracts. Among these initiatives, we find three main types: i) New smart contract programming languages (e.g., Clarify (Blockstack and Algorand, 2021), Vyper (Kaleem et al., 2020), Obsidian (Coblenz, 2019)), which aim at increasing protection against vulnerabilities; ii) New vulnerability detection tools (e.g., Mythril (ConsenSys, 2021), Neucheck (Lu et al., 2019), (Bose et al., 2022), SoliDetector (Hu et al., 2023)), which have the main goal of detecting vulnerabilities in smart contracts so that vulnerable contracts do not reach the deployment phase; and also, iii) vulnerability classifications that mostly allow knowledge regarding vulnerabilities to be identified in a standard manner and systematized.

Objetivo

The main objective of this internship is to implement an effective vulnerability injector tool independent from programming language for smart contracts. The tools will help to build a dataset of vulnerable contracts that can be used for multiple purposes including: i) to study the impact of each vulnerability, ii) creation of a benchmark that will allow assessing the fault detection capabilities of different smart contract verification tools (e.g., static analyzers, fuzzers) in a relative fashion (i.e., assessment with the goal of comparing), iii) training machine learning models for vulnerability detection, iv) training security teams, and v) building best practices and design patterns preventing these vulnerabilities.
To construct such vulnerability injection tool, we will need to integrate changes (i.e., mutations) into the source code of the smart contracts. To have a injector that is minimally independent of programming language, we will first generate an abstract representation of the smart contract code (e.g., Abstract Syntax Tree (AST)). We will then inject individual vulnerabilities into the AST, which will result in several faulty ASTs, each with exactly one injected fault/vulnerability. Then the vulnerable ASTs will be converted back to code, resulting in vulnerable smart contracts mutants.
In the next step, we aim to use the vulnerable contracts to train machine learning models by using generative AI, able to generate vulnerable of a given contract.

Plano de Trabalhos - Semestre 1

Month 1: Integration into the existing team on blockchain security in SSE group and Familiarization with vulnerability classification, tools and datasets created by the team
Month 2-4: Implementing the preliminary version of vulnerability injector.
Month 5-6: Write the report for intermediate defense.

Plano de Trabalhos - Semestre 2

Month 6-8: Complete the development of the injector.
Month 8-9: Use Generative AI to train models that can inject vulnerebity
Month 10: Evaluating both injectors and make a comparison between them.
Month11: Final Report

Condições

The selected student will be integrated in the Software and Systems Engineering (SSE) group of CISUC and the work will be carried out in the facilities of the Department of Informatics Engineering at the University of Coimbra (CISUC - Software and Systems Engineering Group), where a work place and necessary computer resources will be provided.

Observações

Please contact the advisor for any question or clarification needed.

Orientador

Naghmeh Ivaki
naghmeh@dei.uc.pt 📩