A vulnerable Ethereum smart contract labeling framework.
The MultiTagging framework provides several functions through the following components:
- Tagger: It parses analysis tool reports to extract vulnerability tags and map them to the common vulnerability labels, i.e., SWC codes and DASP Ranks.
- Evaluator: It measures the performance of the tool using different evaluation metrics.
- Elector: It elects the sample label based on votes of a number of tools. It supports two Threshold-based vote methods (AtLeastOne and Majority) and one Power-based vote method.
- Plotter: It plots the evaluation results in different formats.
- The components of the MultiTagging framework can be utilized for any analysis tool except for the Tagger.
- Currently Tagger supports 6 tools: MAIAN, Mythril, Semgrep, Slither, Solhint, and VeriSmart.
- Python >=3.11.7 (Recommended 3.12.2)
- You can run MultiTagging framework using Jupyter Notebook or from Terminal.
- Clone MultiTagging repository
git clone https://github.com/MultiTagging/MultiTagging.git
- Go to the MultiTagging home directory.
cd MultiTagging
- Add your study's files in ToolReports, ToolAnalysisTime, and BaseDS. To retrieve study files from other folders, you can alternatively update the Scripts/config.json file.
- Run the MultiTagging framework, there are three options:
- Termianl Option:
- Run Main.py to open the wizard program.
python3 Main.py- Pass your choices and enter the requested input to get the output.
MultiTagging Framework .................................................. Enter the number of the selected function: 1: Get the labeled data for the tool reports. 2: Get vote-based labeled data. 3: Get the evaluation report. 4: Get the evaluation chart. 5: Get tools overlap degree. 6: Get tool efficiency scores 7: Exit ..................................................- Check the Results directory to get the saved output.
- Jupyter Notebook:
- In a code cell, Run Main.py to open the wizard program.
run -i 'Main.py'- Within your Python code
- You can call any function of the MultiTagging framework directly. Check the MultiTagging Demo
- Termianl Option:
- The MultiTagging framework demo is available here: MultiTagging Demo
For more details about the MultiTagging Framework, read our publication: MultiTagging: A Vulnerable Smart Contract Labeling and Evaluation Framework, published in the Electronics Journal. Please cite our article if you use any part of the framework.
@article{alsunaidi2024multitagging,
title={MultiTagging: A Vulnerable Smart Contract Labeling and Evaluation Framework},
author={Alsunaidi, Shikah J and Aljamaan, Hamoud and Hammoudeh, Mohammad},
journal={Electronics},
volume={13},
number={23},
pages={4616},
year={2024},
publisher={MDPI},
URL = {https://www.mdpi.com/2079-9292/13/23/4616},
ISSN = {2079-9292},
DOI = {10.3390/electronics13234616}
}