《山东大学学报(理学版)》 ›› 2026, Vol. 61 ›› Issue (3): 20-28.doi: 10.6040/j.issn.1671-9352.9.2025.001
• • 上一篇
林思怡1,2,宋甫元1,2*,付章杰1,2
摘要: 针对联盟链超级账本(Hyperledger Fabric)中链码的安全漏洞问题,提出了一种基于漏洞子树和预训练模型的深度学习漏洞检测网络。检测方法包括2个关键阶段:首先,通过自动化工具提取链码为抽象语法树,并设计了漏洞子树结构VB-tree,确保模型专注于关键漏洞特征,在此基础上根据程序语句之间的数据和控制依赖关系转化为数据流图;其次,利用预训练模型对提取的特征进行处理,准确识别潜在漏洞。最后,从Github收集了6 935个不同领域开源项目的链码构建可用于评估方法有效性的数据集。实验结果表明,在检测链码中的21种漏洞时,模型的平均F1分数为93.68%,优于现有的方法。
中图分类号:
| [1] 参考文献:[1] SZABO N. Smart contracts: building blocks for digital markets[J]. EXTROPY, 1996(16):18. [2] SUN Nan, WANG Wei, TONG Yongxin, et al. Blockchain based federated learning for intrusion detection for Internet of Things[J]. Frontiers of Computer Science, 2024, 18(5):185328. [3] CHEN Xingxing, CHENG Qingfeng, YANG Weidong, et al. An anonymous authentication and secure data transmission scheme for the Internet of Things based on blockchain[J]. Frontiers of Computer Science, 2024, 18(3):183807. [4] QU Youyang, MA Lichuan, YE Wenjie, et al. Towards privacy-aware and trustworthy data sharing using blockchain for edge intelligence[J]. Big Data Mining and Analytics, 2023, 6(4):443-464. [5] ZHANG Xiaofeng, LI Ling. A review of blockchain solutions in supply chain traceability[J]. Tsinghua Science and Technology, 2022, 28(3):500-510. [6] BUTERIN V. A next-generation smart contract and decentralized application platform[J]. White Paper, 2014, 3(37):2-1. [7] NAKAMOTO S. Bitcoin: a peer-to-peer electronic cash system[EB/OL]. https://bitcoin.org/en/bitcoin-paper. [8] DANNEN C. Introducing Ethereum and solidity[M]. Berkeley:Apress, 2017. [9] DEL C M. The DAO attacked: code issue leads to $60 million ether theft[J]. Saatavissa, 2016, 3:1-4. [10] LUU L, CHU D H, OLICKEL H, et al. Making smart contracts smarter[C] //2016 ACM SIGSAC Conference on Computer and Communications Security. New York: ACM, 2016:254-269. [11] TSANKOV P, DAN A, DRACHSLER-COHEN D, et al. Securify: practical security analysis of smart contracts[C] //2018 ACM SIGSAC Conference on Computer and Communications Security. New York: ACM, 2018:67-82. [12] KALRA S, GOEL S, DHAWAN M, et al. Zeus: analyzing safety of smart contracts[C] //25th Annual Network and Distributed System Security Symposium(NDSS 2018). San Diego: Internet Society, 2018:1-12. [13] BHARGARAN K, DELIGNAT-LAVAUD A, FOURNET C, et al. Formal verification of smart contracts: short paper[C] //2016 ACM Workshop on Programming Languages and Analysis for Security. New York: ACM, 2016:91-96. [14] JIANG Bo, LIU Ye, CHAN W K. Contractfuzzer: fuzzing smart contracts for vulnerability detection[C] //2018 33rd ACM/IEEE International Conference on Automated Software Engineering(ASE). New York: ACM, 2018:259-269. [15] LIU Zhenguang, QIAN Peng, et al. Rethinking smart contract fuzzing: fuzzing with invocation ordering and important branch revisiting[J]. IEEE Transactions on Information Forensics and Security, 2023, 18:1237-1251. [16] ZHUANG Yuan, LIU Zhenguang, QIAN Peng, et al. Smart contract vulnerability detection using graph neural networks[C] //30th International Joint Conference on Artificial Intelligence(IJCAI-21), 2021:3283-3290. [17] ZHANG Zhuo, YAN Lei, YAN Meng, et al. Reentrancy vulnerability detection and localization: a deep learning based two-phase approach[C] //2022 37th IEEE/ACM International Conference on Automated Software Engineering(ASE). New York: ACM, 2022:1-13. [18] CACHIN C. Architecture of the hyperledger blockchain fabric[C] //Workshop on Distributed Cryptocurrencies and Consensus Ledgers. 2016, 310(4):1-4. [19] PETERS M E, NEUMANN M, IYYER M, et al. Deep contextualized word representations[C] //2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. New Orleans: ACL, 2018:2227-2237. [20] RADFORD A, NARASIMHAN K, SALIMANS T, et al. Improving language understanding by generative pre-training[EB/OL]. 2018. [21] DEVLIN J, CHANG M W, LEE K, et al. BERT: pre-training of deep bidirectional transformers for language understanding[C] //2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Minneapolis: ACL, 2019:4171-4186. [22] GUO Daya, REN Shuo, LU Shuai, et al. GraphCodeBERT: pre-training code representations with data flow[C] //2021 International Conference on Learning Representations. ICLR, 2021. [23] WU Hongjun, et al. Peculiar: smart contract vulnerability detection based on crucial data flow graph and pre-training techniques[C] //2021 IEEE 32nd International Symposium on Software Reliability Engineering(ISSRE). IEEE, 2021. [24] ANDROULAKI E, BARGER A, BORTNIKOV V, et al. Hyperledger fabric: a distributed operating system for permissioned blockchains[C] //2018 13th EuroSys Conference. New York: ACM, 2018:1-15. [25] SOUSA J, BESSANI A, VUKOLIC M. A byzantine fault-tolerant ordering service for the hyperledger fabric blockchain platform[C] //2018 48th Annual IEEE/IFIP International Conference on Dependable Systems and Networks(DSN). IEEE, 2018. [26] HUANG Yongfeng, BIAN Yiyang, et al. Smart contract security: a software lifecycle perspective[J]. IEEE Access, 2019, 7:150184-150202. [27] LV Penghui. Potential risk detection system of hyperledger fabric smart contract based on static analysis[C] //2021 IEEE Symposium on Computers and Communications(ISCC). IEEE, 2021:1-7. [28] YAMASHITA K, NOMURA Y, ZHOU E, et al. Potential risks of hyperledger fabric smart contracts[C] //2019 IEEE International Workshop on Blockchain Oriented Software Engineering(IWBOSE). IEEE, 2019:1-10. [29] LI Peiru, WANG Yizheng, HUANG Hao, et al. A vulnerability detection framework for hyperledger fabric smart contracts based on dynamic and static analysis[C] //Proceedings of the 26th International Conference on Evaluation and Assessment in Software Engineering. New York: ACM, 2022:366-374. [30] XU Xiaofei, HU Tiaoyuan, LI Bixin, et al. CCDetector: detect chaincode vulnerabilities based on knowledge graph[C] //2023 IEEE 47th Annual Computers, Software, and Applications Conference(COMPSAC). IEEE, 2023:699-704. [31] LUA T. Tree-sitter[EB/OL]. 2023. https://tree-sitter.github.io/tree-sitter/. |
| [1] | 桂云苗,杨兰,胡红春. 双边市场下物流平台区块链服务投资决策[J]. 《山东大学学报(理学版)》, 2025, 60(6): 63-75. |
| [2] | 史聪,张桂涛,张萧,林帅成. 碳配额与交易监管下基于区块链技术的平台供应链网络运营决策[J]. 《山东大学学报(理学版)》, 2024, 59(1): 100-114, 123. |
| [3] | 刘云,朱鹏俊,陈路遥,宋凯. 基于边缘计算的收益激励算法对区块链分片的优化[J]. 《山东大学学报(理学版)》, 2023, 58(7): 88-96. |
| [4] | 桂云苗,胡红春,龚本刚. 区块链时代下双边平台信息披露决策研究[J]. 《山东大学学报(理学版)》, 2022, 57(3): 89-95. |
| [5] | 康海燕,邓婕. 区块链数据隐私保护研究综述[J]. 《山东大学学报(理学版)》, 2021, 56(5): 92-110. |
| [6] | 宋宇波,张仕奇,宋睿. 一种基于投票权竞争的区块链共识机制[J]. 《山东大学学报(理学版)》, 2020, 55(3): 43-50. |
| [7] | 张晶,陈诚,郑焕科. 面向软件漏洞检测的Fuzzing样本优化方法[J]. 《山东大学学报(理学版)》, 2019, 54(9): 1-8, 35. |
| [8] | 张键红,白文乐,欧培荣. 基于区块链的匿名密码货币支付协议[J]. 《山东大学学报(理学版)》, 2019, 54(1): 88-95. |
|
||