返回
Detecting unknown vulnerabilities in smart contracts using opcode sequences
DOI:10.1080/09540091.2024.2313853.png)
摘要
En 中文
Unknown vulnerabilities, also known as zero-day vulnerabilities, are vulnerabilities in software, systems, or networks that have not yet been publicly disclosed or fixed. If these vulnerabilities are ever discovered by hackers, intentionally or unintentionally, they pose a major threat to network security. This is particularly true in the blockchain field, as smart contracts hold a lot of money, and if they are discovered and exploited by hackers, the financial losses to users will be even greater. However, the current research on smart contract vulnerabilities mainly focuses on known vulnerabilities, and the research on unknown vulnerabilities has been limited. Based on this, we introduce a machine learning-based method for detecting unknown vulnerabilities in smart contracts. First, the method obtains the opcode sequences executed by smart contract transactions in the EVM by instrumenting Geth and replaying the Ethereum transactions. Next, we employ an n-gram model and a vector weight penalty mechanism to extract the opcode sequence features. We then use machine learning algorithms to detect unknown vulnerabilities based on the similarity principle. Finally, we test the effectiveness of our method with four machine learning models: the K-Nearest Neighbor algorithm (KNN), Support Vector Machine (SVM), Logistic Regression (LR), and Decision Tree (DT). The SVM model performs best at detecting unknown vulnerabilities, with an accuracy of 96%, a precision of 91%, a recall of 100%, and an F1-score of 95%. We also discuss the benefits of the method: timely detection of attacks due to unknown vulnerabilities, thus reducing user losses.
Keyword:
Blockchain
smart contracts
unknown vulnerabilities
N-gram
opcode sequences
期刊
IF:
3.4
论文数:
854
被引数:
1.5K
机构
引用论文
SySeVR: A Framework for Using Deep Learning to Detect Software VulnerabilitiesSySeVR: 使用深度学习检测软件漏洞的框架
Genetic polymorphisms at 19q13.33 are associated with [−2]proPSA (p2PSA) levels and provide additional predictive value to prostate health index for prostate cancer
The Prostate
IF0
A systematic review shows no performance benefit of machine learning over logistic regression for clinical prediction models一项系统评价显示,机器学习在临床预测模型中没有比逻辑回归更多的性能优势

