Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (11): 3493-3501.DOI: 10.11772/j.issn.1001-9081.2024121858
• The 7th CCF China Conference on Blockchain Technology • Previous Articles
Yushu LI1,2, Ying XING1,2, Siqi LU3, Heng PAN1,2(
), Senchun CHAI4, Xueming SI1,2
Received:2025-01-02
Revised:2025-03-06
Accepted:2025-03-13
Online:2025-04-18
Published:2025-11-10
Contact:
Heng PAN
About author:LI Yushu, born in 1998, M. S. candidate. His research interests include cybersecurity, blockchain.Supported by:
李浴淑1,2, 邢颖1,2, 陆思奇3, 潘恒1,2(
), 柴森春4, 斯雪明1,2
通讯作者:
潘恒
作者简介:李浴淑(1998—),男,河南开封人,硕士研究生,主要研究方向:网络安全、区块链基金资助:CLC Number:
Yushu LI, Ying XING, Siqi LU, Heng PAN, Senchun CHAI, Xueming SI. Deep learning-based vulnerability detection tool for C/C++ smart contracts at function-body slice level[J]. Journal of Computer Applications, 2025, 45(11): 3493-3501.
李浴淑, 邢颖, 陆思奇, 潘恒, 柴森春, 斯雪明. 基于深度学习的函数体切片级C/C++智能合约漏洞检测工具[J]. 《计算机应用》唯一官方网站, 2025, 45(11): 3493-3501.
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.joca.cn/EN/10.11772/j.issn.1001-9081.2024121858
| 模型 | 漏洞种类 | 准确率(A) | 精度(P) |
|---|---|---|---|
| LSTM | 整数溢出 | 85.10 | 84.10 |
| 权限控制 | 86.61 | 86.43 | |
| 代币转移 | 86.52 | 86.56 | |
| 内存管理 | 86.76 | 86.77 | |
| 交易延迟 | 86.29 | 86.30 | |
| BiLSTM | 整数溢出 | 85.30 | 84.30 |
| 权限控制 | 86.71 | 86.53 | |
| 代币转移 | 86.62 | 86.66 | |
| 内存管理 | 86.86 | 86.87 | |
| 交易延迟 | 86.39 | 86.40 | |
| GRU | 整数溢出 | 84.80 | 83.80 |
| 权限控制 | 86.21 | 86.03 | |
| 代币转移 | 86.12 | 86.03 | |
| 内存管理 | 86.36 | 86.37 | |
| 交易延迟 | 85.89 | 85.90 | |
| BGRU | 整数溢出 | 85.30 | 84.30 |
| 权限控制 | 86.71 | 86.53 | |
| 代币转移 | 86.62 | 86.66 | |
| 内存管理 | 86.86 | 86.87 | |
| 交易延迟 | 86.39 | 86.40 |
Tab. 1 Performance analysis of 4 models
| 模型 | 漏洞种类 | 准确率(A) | 精度(P) |
|---|---|---|---|
| LSTM | 整数溢出 | 85.10 | 84.10 |
| 权限控制 | 86.61 | 86.43 | |
| 代币转移 | 86.52 | 86.56 | |
| 内存管理 | 86.76 | 86.77 | |
| 交易延迟 | 86.29 | 86.30 | |
| BiLSTM | 整数溢出 | 85.30 | 84.30 |
| 权限控制 | 86.71 | 86.53 | |
| 代币转移 | 86.62 | 86.66 | |
| 内存管理 | 86.86 | 86.87 | |
| 交易延迟 | 86.39 | 86.40 | |
| GRU | 整数溢出 | 84.80 | 83.80 |
| 权限控制 | 86.21 | 86.03 | |
| 代币转移 | 86.12 | 86.03 | |
| 内存管理 | 86.36 | 86.37 | |
| 交易延迟 | 85.89 | 85.90 | |
| BGRU | 整数溢出 | 85.30 | 84.30 |
| 权限控制 | 86.71 | 86.53 | |
| 代币转移 | 86.62 | 86.66 | |
| 内存管理 | 86.86 | 86.87 | |
| 交易延迟 | 86.39 | 86.40 |
| 工具 | 范围 |
|---|---|
| GNNSCVulDetector | 无限循环 |
| EOSAFE | 虚假令牌、虚假接收、回滚、权限检查 |
| EvulHunter | 虚假令牌、虚假接收 |
| EOSFuzzer | 块信息依赖、虚假令牌、虚假接收 |
| GFuuzer | 块信息依赖、虚假令牌、虚假接收 |
| ExGen | 整数溢出 |
| CDFSentry | 整数溢出、权限控制、代币转移、内存管理、 交易延迟 |
Tab. 2 Vulnerability detection scope
| 工具 | 范围 |
|---|---|
| GNNSCVulDetector | 无限循环 |
| EOSAFE | 虚假令牌、虚假接收、回滚、权限检查 |
| EvulHunter | 虚假令牌、虚假接收 |
| EOSFuzzer | 块信息依赖、虚假令牌、虚假接收 |
| GFuuzer | 块信息依赖、虚假令牌、虚假接收 |
| ExGen | 整数溢出 |
| CDFSentry | 整数溢出、权限控制、代币转移、内存管理、 交易延迟 |
| 漏洞类型 | 源码数 | 函数体数 | 训练数据 | 测试数据 | TP | FP | FN | TN | A/% | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bad | Good | Bad | Good | Bad | Good | |||||||
| 整数溢出 | 1 012 | 712 | 856 | 571 | 684 | 141 | 172 | 145 | 27 | 19 | 122 | 85.30 |
| 权限控制 | 1 002 | 651 | 782 | 521 | 626 | 130 | 156 | 135 | 21 | 17 | 113 | 86.71 |
| 代币转移 | 1 000 | 899 | 748 | 719 | 599 | 180 | 149 | 156 | 24 | 20 | 129 | 86.62 |
| 内存管理 | 1 000 | 802 | 669 | 642 | 532 | 160 | 137 | 139 | 21 | 18 | 119 | 86.86 |
| 交易延迟 | 1 010 | 751 | 626 | 604 | 501 | 147 | 125 | 108 | 17 | 20 | 127 | 87.29 |
Tab. 3 Performance demonstration of CDFSentry tool
| 漏洞类型 | 源码数 | 函数体数 | 训练数据 | 测试数据 | TP | FP | FN | TN | A/% | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bad | Good | Bad | Good | Bad | Good | |||||||
| 整数溢出 | 1 012 | 712 | 856 | 571 | 684 | 141 | 172 | 145 | 27 | 19 | 122 | 85.30 |
| 权限控制 | 1 002 | 651 | 782 | 521 | 626 | 130 | 156 | 135 | 21 | 17 | 113 | 86.71 |
| 代币转移 | 1 000 | 899 | 748 | 719 | 599 | 180 | 149 | 156 | 24 | 20 | 129 | 86.62 |
| 内存管理 | 1 000 | 802 | 669 | 642 | 532 | 160 | 137 | 139 | 21 | 18 | 119 | 86.86 |
| 交易延迟 | 1 010 | 751 | 626 | 604 | 501 | 147 | 125 | 108 | 17 | 20 | 127 | 87.29 |
| 漏洞类型 | 输入格式 | 检测数 | A/% | R/% | P/% | F1/% |
|---|---|---|---|---|---|---|
| 无限循环 | 源码 | 4 170 | 74.61 | 74.32 | 73.89 | 74.10 |
Tab. 4 Performance demonstration of GNNSCVulDetector tool
| 漏洞类型 | 输入格式 | 检测数 | A/% | R/% | P/% | F1/% |
|---|---|---|---|---|---|---|
| 无限循环 | 源码 | 4 170 | 74.61 | 74.32 | 73.89 | 74.10 |
| 漏洞类型 | 输入格式 | 源码数 | 漏洞数 | 可利用漏洞数 | A/% |
|---|---|---|---|---|---|
| 整数溢出 | 源码 | 58 | 130 | 126 | 96.9 |
Tab. 5 Performance demonstration of ExGen tool
| 漏洞类型 | 输入格式 | 源码数 | 漏洞数 | 可利用漏洞数 | A/% |
|---|---|---|---|---|---|
| 整数溢出 | 源码 | 58 | 130 | 126 | 96.9 |
| 工具 | 漏洞类型 | 输入格式 | 检测数 | 漏洞数 | FP | FN |
|---|---|---|---|---|---|---|
| EOSFuzzer | 块信息依赖 | 源码 | 82 | 2 | 0 | 1 |
| 伪造转让通知 | 82 | 4 | 0 | 0 | ||
| 虚假EOS转账 | 82 | 2 | 1 | 0 | ||
| GFuzzer | 块信息依赖 | 82 | 3 | 0 | 0 | |
| 伪造转让通知 | 82 | 5 | 0 | 0 | ||
| 虚假EOS转账 | 82 | 3 | 1 | 0 |
Tab. 6 Performance demonstration of EOSFuzzer and GFuzzer tools
| 工具 | 漏洞类型 | 输入格式 | 检测数 | 漏洞数 | FP | FN |
|---|---|---|---|---|---|---|
| EOSFuzzer | 块信息依赖 | 源码 | 82 | 2 | 0 | 1 |
| 伪造转让通知 | 82 | 4 | 0 | 0 | ||
| 虚假EOS转账 | 82 | 2 | 1 | 0 | ||
| GFuzzer | 块信息依赖 | 82 | 3 | 0 | 0 | |
| 伪造转让通知 | 82 | 5 | 0 | 0 | ||
| 虚假EOS转账 | 82 | 3 | 1 | 0 |
| 漏洞类型 | 输入格式 | 检测数 | 存在实际漏洞合约数 | 无漏洞合约数 | TP | FP | TN | FN | A/% | P/% | R/% | F1/% |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 虚假令牌、虚假接收、回滚、权限检查 | 字节码 | 52 | 27 | 25 | 26 | 0 | 25 | 1 | 98.08 | 100 | 100 | 98.11 |
Tab. 7 Performance demonstration of EOSAFE tool
| 漏洞类型 | 输入格式 | 检测数 | 存在实际漏洞合约数 | 无漏洞合约数 | TP | FP | TN | FN | A/% | P/% | R/% | F1/% |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 虚假令牌、虚假接收、回滚、权限检查 | 字节码 | 52 | 27 | 25 | 26 | 0 | 25 | 1 | 98.08 | 100 | 100 | 98.11 |
| 漏洞类型 | 输入格式 | 检测数 | TP | FP | TN | FN | P/% | R/% | A/% |
|---|---|---|---|---|---|---|---|---|---|
| 虚假转账 | 字节码 | 184 | 75 | 26 | 83 | 0 | 74.26 | 100 | 85.87 |
| 虚假通知 | 195 | 141 | 0 | 54 | 0 | 100.00 | 100 | 100.00 | |
| 混合 | 379 | 216 | 26 | 137 | 0 | 89.26 | 100 | 93.14 |
Tab. 8 Performance demonstration of EVulHunter tool
| 漏洞类型 | 输入格式 | 检测数 | TP | FP | TN | FN | P/% | R/% | A/% |
|---|---|---|---|---|---|---|---|---|---|
| 虚假转账 | 字节码 | 184 | 75 | 26 | 83 | 0 | 74.26 | 100 | 85.87 |
| 虚假通知 | 195 | 141 | 0 | 54 | 0 | 100.00 | 100 | 100.00 | |
| 混合 | 379 | 216 | 26 | 137 | 0 | 89.26 | 100 | 93.14 |
| [1] | BitShares. Delegated proof-of-stake consensus[EB/OL]. [2024-06-07]. . |
| [2] | QUANTUM M. The proposal of PoS[EB/OL]. [2024-07-10].. |
| [3] | BUTERIN V. A next-generation smart contract and decentralized application platform[EB/OL]. [2024-10-01].. |
| [4] | DE CANDIA A. Increase of EOSIO transaction volumes[EB/OL]. [2024-09-03].. |
| [5] | MOZILLA. Basic concepts for WASM[EB/OL]. [2024-07-01].. |
| [6] | NONEAGE. Random number generation vulnerability[EB/OL]. [2024-10-12]. . |
| [7] | Fake EOS transfer vulnerabilities in EOS smart contracts[EB/OL]. [2024-11-02]. . |
| [8] | Forged transfer notification in EOS smart contracts[EB/OL]. [2024-11-05].. |
| [9] | HE N, ZHANG R, WANG H, et al. EOSAFE: security analysis of EOSIO smart contracts[C]// Proceedings of the 30th USENIX Security Symposium. Berkeley: USENIX Association, 2021: 1271-1288. |
| [10] | QUAN L, WU L, WANG H. EVulHunter: detecting fake transfer vulnerabilities for EOSIO's smart contracts at WebAssembly level[EB/OL]. [2024-10-26].. |
| [11] | LI W, WANG M, YU B, et al. Grey-box fuzzing based on execution feedback for EOSIO smart contracts[C]// Proceedings of the 29th Asia-Pacific Software Engineering Conference. Piscataway: IEEE, 2022: 1-10. |
| [12] | HUANG Y, JIANG B, CHAN W K. EOSFuzzer: fuzzing EOSIO smart contracts for vulnerability detection[C]// Proceedings of the 12th Asia-Pacific Symposium on Internetware. New York: ACM, 2020: 99-109. |
| [13] | JIN L, CAO Y, CHEN Y, et al. ExGen: cross-platform, automated exploit generation for smart contract vulnerabilities[J]. IEEE Transactions on Dependable and Secure Computing, 2020: 650-664. |
| [14] | ZHUANG Y, LIU Z, QIAN P, et al. Smart contract vulnerability detection using graph neural networks[C]// Proceedings of the 29th International Joint Conference on Artificial Intelligence. California: ijcai.org, 2020: 3283-3290. |
| [15] | KRUPP J, ROSSOW C. teEther: gnawing at Ethereum to automatically exploit smart contracts[C]// Proceedings of the 27th USENIX Security Symposium. Berkeley: USENIX Association, 2018: 1317-1333. |
| [16] | CHEN J, XIA X, LO D, et al. DefectChecker: automated smart contract defect detection by analyzing EVM bytecode[J]. IEEE Transactions on Software Engineering, 2022, 48(7): 2189-2207. |
| [17] | JIANG B, LIU Y, CHAN W K. ContractFuzzer: fuzzing smart contracts for vulnerability detection[C]// Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering. New York: ACM, 2018: 259-269. |
| [18] | CHOI J, KIM D, KIM S, et al. SMARTIAN: enhancing smart contract fuzzing with static and dynamic data-flow analyses[C]// Proceedings of the 36th IEEE/ACM International Conference on Automated Software Engineering. Piscataway: IEEE, 2021: 227-239. |
| [19] | TANN W J W, HAN X J, GUPTA S S, et al. Towards safer smart contracts: a sequence learning approach to detecting security threats[EB/OL]. [2024-11-05].. |
| [20] | ZHANG L, CHEN W, WANG W, et al. CBGRU: a detection method of smart contract vulnerability based on a hybrid model[J]. Sensors, 2022, 22(9): No.3577. |
| [21] | LI Z, LU S, ZHANG R, et al. VulHunter: hunting vulnerable smart contracts at EVM bytecode-level via multiple instance learning[J]. IEEE Transactions on Software Engineering, 2023, 49(11): 4886-4916. |
| [22] | LI Z, ZOU D, XU S, et al. SySeVR: a framework for using deep learning to detect software vulnerabilities[J]. IEEE Transactions on Dependable and Secure Computing, 2022, 19(4): 2244-2258. |
| [23] | LI Z, ZOU D, XU S, et al. VulDeePecker: a deep learning-based system for vulnerability detection[EB/OL]. [2024-11-05].. |
| [24] | 钱鹏,刘振广,何钦铭,等.智能合约安全漏洞检测技术研究综述[J].软件学报,2022,33(8):3059-3085. |
| QIAN P, LIU Z G, HE Q M, et al. Smart contract vulnerability detection technique: a survey[J]. Journal of Software, 2022, 33(8): 3059-3085. | |
| [25] | REN S, HE K, GIRSHICK R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149. |
| [26] | SHRIVASTAVA A, GUPTA A, GIRSHICK R, et al. Training region-based object detectors with online hard example mining[C]// Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2016: 761-769. |
| [27] | HOCHREITER S, SCHMIDHUBER J. Long short-term memory[J]. Neural Computation, 1997, 9(8): 1735-1780. |
| [28] | CHO K, VAN MERRIËNBOER B, BAHDANAU D, et al. On the properties of neural machine translation: encoder-decoder approaches[C]// Proceedings of the 8th Workshop on Syntax, Semantics and Structure in Statistical Translation. Stroudsburg: ACL, 2014: 103-111. |
| [29] | GRAVES A, SCHMIDHUBER J. Framewise phoneme classification with bidirectional LSTM and other neural network architectures[J]. Neural Networks, 2005, 18(5/6): 602-610. |
| [1] | Hongjun ZHANG, Gaojun PAN, Hao YE, Yubin LU, Yiheng MIAO. Multi-source heterogeneous data analysis method combining deep learning and tensor decomposition [J]. Journal of Computer Applications, 2025, 45(9): 2838-2847. |
| [2] | Jin LI, Liqun LIU. SAR and visible image fusion based on residual Swin Transformer [J]. Journal of Computer Applications, 2025, 45(9): 2949-2956. |
| [3] | Bing YIN, Zhenhua LING, Yin LIN, Changfeng XI, Ying LIU. Emotion recognition method compatible with missing modal reasoning [J]. Journal of Computer Applications, 2025, 45(9): 2764-2772. |
| [4] | Wei SHE, Tianxiang MA, Haige FENG, Zhao TIAN, Wei LIU. Blockchain covert communication method based on contract call concealment [J]. Journal of Computer Applications, 2025, 45(9): 2865-2872. |
| [5] | Weigang LI, Jiale SHAO, Zhiqiang TIAN. Point cloud classification and segmentation network based on dual attention mechanism and multi-scale fusion [J]. Journal of Computer Applications, 2025, 45(9): 3003-3010. |
| [6] | Zhixiong XU, Bo LI, Xiaoyong BIAN, Qiren HU. Adversarial sample embedded attention U-Net for 3D medical image segmentation [J]. Journal of Computer Applications, 2025, 45(9): 3011-3016. |
| [7] | Panfeng JING, Yudong LIANG, Chaowei LI, Junru GUO, Jinyu GUO. Semi-supervised image dehazing algorithm based on teacher-student learning [J]. Journal of Computer Applications, 2025, 45(9): 2975-2983. |
| [8] | Haiyang PENG, Weixing JI, Fawang LIU. Blockchain-based data notarization model for autonomous driving simulation testing [J]. Journal of Computer Applications, 2025, 45(8): 2421-2427. |
| [9] | Peng PENG, Ziting CAI, Wenling LIU, Caihua CHEN, Wei ZENG, Baolai HUANG. Speech emotion recognition method based on hybrid Siamese network with CNN and bidirectional GRU [J]. Journal of Computer Applications, 2025, 45(8): 2515-2521. |
| [10] | Shuo ZHANG, Guokai SUN, Yuan ZHUANG, Xiaoyu FENG, Jingzhi WANG. Dynamic detection method of eclipse attacks for blockchain node analysis [J]. Journal of Computer Applications, 2025, 45(8): 2428-2436. |
| [11] | Lina GE, Mingyu WANG, Lei TIAN. Review of research on efficiency of federated learning [J]. Journal of Computer Applications, 2025, 45(8): 2387-2398. |
| [12] | Yanhua LIAO, Yuanxia YAN, Wenlin PAN. Multi-target detection algorithm for traffic intersection images based on YOLOv9 [J]. Journal of Computer Applications, 2025, 45(8): 2555-2565. |
| [13] | Jinxian SUO, Liping ZHANG, Sheng YAN, Dongqi WANG, Yawen ZHANG. Review of interpretable deep knowledge tracing methods [J]. Journal of Computer Applications, 2025, 45(7): 2043-2055. |
| [14] | Zhenzhou WANG, Fangfang GUO, Jingfang SU, He SU, Jianchao WANG. Robustness optimization method of visual model for intelligent inspection [J]. Journal of Computer Applications, 2025, 45(7): 2361-2368. |
| [15] | Qiaoling QI, Xiaoxiao WANG, Qianqian ZHANG, Peng WANG, Yongfeng DONG. Label noise adaptive learning algorithm based on meta-learning [J]. Journal of Computer Applications, 2025, 45(7): 2113-2122. |
| Viewed | ||||||
|
Full text |
|
|||||
|
Abstract |
|
|||||