Article(id=1251535842775351937, tenantId=1146029695717560320, journalId=1251233871195320423, issueId=1251535833375912679, articleNumber=null, orderNo=null, doi=10.13190/j.jbupt.2024-197, pmid=null, cstr=null, oa=null, hot=null, price=null, onlineType=0, articleFormat=0, articleType=null, articleTypeStr=null, receivedDate=1728403200000, receivedDateStr=2024-10-09, revisedDate=null, revisedDateStr=null, acceptedDate=null, acceptedDateStr=null, onlineDate=1776318997328, onlineDateStr=2026-04-16, pubDate=null, pubDateStr=null, doiRegisterDate=null, doiRegisterDateStr=null, onlineIssueDate=1776318997328, onlineIssueDateStr=2026-04-16, onlineJustAcceptDate=null, onlineJustAcceptDateStr=null, onlineFirstDate=null, onlineFirstDateStr=null, sourceXml=null, magXml=null, createTime=1776318997328, creator=13701087609, updateTime=1776318997328, updator=13701087609, issue=Issue{id=1251535833375912679, tenantId=1146029695717560320, journalId=1251233871195320423, year='2025', volume='48', issue='5', pageStart='1', pageEnd='172', issueExtLink='null', onlineDate='null', pubDate='null', beforeIssueId=null, nextIssueId=null, price=null, status=1, issueComplete=1, articleOrder=1, issueType=1, specialIssue=null, createTime=1776318995087, creator=13701087609, updateTime=1776389324200, updator=13701087609, preIssue=null, nextIssue=null, ext={EN=IssueExt(id=1251830815148163525, tenantId=1146029695717560320, journalId=1251233871195320423, issueId=1251535833375912679, language=EN, specialIssueTitle=, coverIllustrator=null, specialIssueEditor=, specialIssueAbout=), CN=IssueExt(id=1251830815148163526, tenantId=1146029695717560320, journalId=1251233871195320423, issueId=1251535833375912679, language=CN, specialIssueTitle=, coverIllustrator=null, specialIssueEditor=, specialIssueAbout=)}, issueFiles=null}, startPage=55, endPage=61, ext={EN=ArticleExt(id=1251535843047981709, articleId=1251535842775351937, tenantId=1146029695717560320, journalId=1251233871195320423, language=EN, title=Smart Contract Vulnerability Detection Based on Expert Pattern and Explainable Machine Learning, columnId=1251535834252522218, journalTitle=Journal of Beijing University of Posts and Telecommunications, columnName=PAPERS, runingTitle=null, highlight=null, articleAbstract=

A smart contract is a piece of computer program that runs on the blockchain, which has the characteristics of automatic execution, non-tampering, and publicity. Smart contracts control the flow of large amounts of high-value data, and attackers can exploit vulnerabilities in smart contracts to steal funds or resources. Existing detection methods, such as symbol execution, have problems such as path explosion and high false positive rate, while machine learning methods are black-box and uninterpretable. In order to solve the above problems, an expert mode based on expert mode and explainable machine learning was proposed to detect vulnerabilities in smart contract code, an expert mode for vulnerabilities was designed, and shapley additive explanations (SHAP) was used to explain the weights of multiple features, and the average detection accuracy of four vulnerabilities (re-entrancy vulnerability, timestamp vulnerability, integer overflow vulnerability, and permission control vulnerability) reached 90.36% , which achieved better detection results compared with classic tools such as Oyente and Mythril.

, correspAuthors=null, authorNote=null, correspAuthorsNote=null, copyrightStatement=null, copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=null, magXml=null, pdfUrl=null, pdf=null, pdfFileSize=null, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=null, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=null, mapNumber=null, authorCompany=null, fund=null, authors=null, authorsList=Cong TAN, Biao LI, Wenmin LI, Sujuan QIN, Fei GAO), CN=ArticleExt(id=1251535844146889406, articleId=1251535842775351937, tenantId=1146029695717560320, journalId=1251233871195320423, language=CN, title=基于专家模式和可解释机器学习的智能合约漏洞检测, columnId=1251535834390934253, journalTitle=北京邮电大学学报, columnName=论文, runingTitle=null, highlight=null, articleAbstract=

智能合约是运行在区块链上的一段计算机程序,具有自动执行、不可篡改、公开等特性。智能合约控制大量高价值数据的流动,攻击者可以利用智能合约存在的漏洞窃取资金或资源。现有的检测方法,如符号执行存在路径爆炸、误报率较高等问题,机器学习方法是黑盒的,有不可解释性。针对上述问题,提出了基于专家模式和可解释的机器学习来进行智能合约代码漏洞的检测,设计漏洞的专家模式,使用可解释性机器学习(SHAP)来解释多种特征的权重,针对4种漏洞(重入漏洞、时间戳漏洞、整数溢出漏洞、权限控制漏洞)的平均检测准确率达到了90.36%,和Oyente、Mythril等经典工具相比取得了更好的检测效果。

, correspAuthors=null, authorNote=null, correspAuthorsNote=
秦素娟(1979—),女,教授,博士生导师,邮箱:
, copyrightStatement=null, copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=rDT8srlYgbKe/ZUb3sOooQ==, magXml=N9cXtBaHaovq9nI+p6vGbw==, pdfUrl=null, pdf=gCGLCuojvRHMh5g05GsT9Q==, pdfFileSize=1659965, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=wC122CJjj8oq24SUW06v6Q==, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=X0rmNljR0ER9bc2ar1hlsg==, mapNumber=null, authorCompany=null, fund=null, authors=

谈聪(2001—),女,硕士生。

, authorsList=谈聪, 李彪, 李文敏, 秦素娟, 高飞)}, authors=[Author(id=1251535844528571092, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1251535844612457177, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535844528571092, language=EN, stringName=Cong TAN, firstName=Cong, middleName=null, lastName=TAN, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1251535844696343262, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535844528571092, language=CN, stringName=谈聪, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=北京邮电大学 网络空间安全学院,北京 100876, bio={"content":"

谈聪(2001—),女,硕士生。

"}, bioImg=null, bioContent=

谈聪(2001—),女,硕士生。

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1251535844432102092, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, xref=null, ext=[AuthorCompanyExt(id=1251535844444685005, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China), AuthorCompanyExt(id=1251535844453073614, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=北京邮电大学 网络空间安全学院,北京 100876)])]), Author(id=1251535844817978084, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1251535844956390125, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535844817978084, language=EN, stringName=Biao LI, firstName=Biao, middleName=null, lastName=LI, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1251535845065442037, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535844817978084, language=CN, stringName=李彪, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=北京邮电大学 网络空间安全学院,北京 100876, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1251535844432102092, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, xref=null, ext=[AuthorCompanyExt(id=1251535844444685005, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China), AuthorCompanyExt(id=1251535844453073614, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=北京邮电大学 网络空间安全学院,北京 100876)])]), Author(id=1251535845149328123, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, orderNo=2, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1251535845224825601, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535845149328123, language=EN, stringName=Wenmin LI, firstName=Wenmin, middleName=null, lastName=LI, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1251535845338071819, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535845149328123, language=CN, stringName=李文敏, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=北京邮电大学 网络空间安全学院,北京 100876, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1251535844432102092, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, xref=null, ext=[AuthorCompanyExt(id=1251535844444685005, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China), AuthorCompanyExt(id=1251535844453073614, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=北京邮电大学 网络空间安全学院,北京 100876)])]), Author(id=1251535845442929430, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, orderNo=3, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=qsujuan@bupt.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1251535845564564254, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535845442929430, language=EN, stringName=Sujuan QIN, firstName=Sujuan, middleName=null, lastName=QIN, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1251535845656838951, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535845442929430, language=CN, stringName=秦素娟, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=北京邮电大学 网络空间安全学院,北京 100876, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1251535844432102092, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, xref=null, ext=[AuthorCompanyExt(id=1251535844444685005, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China), AuthorCompanyExt(id=1251535844453073614, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=北京邮电大学 网络空间安全学院,北京 100876)])]), Author(id=1251535845740725041, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, orderNo=4, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1251535845849776953, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535845740725041, language=EN, stringName=Fei GAO, firstName=Fei, middleName=null, lastName=GAO, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1251535845967217475, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, authorId=1251535845740725041, language=CN, stringName=高飞, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=北京邮电大学 网络空间安全学院,北京 100876, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1251535844432102092, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, xref=null, ext=[AuthorCompanyExt(id=1251535844444685005, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China), AuthorCompanyExt(id=1251535844453073614, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=北京邮电大学 网络空间安全学院,北京 100876)])])], keywords=[Keyword(id=1251535846155961170, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, orderNo=1, keyword=blockchain), Keyword(id=1251535846277595992, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, orderNo=2, keyword=smart contract), Keyword(id=1251535846386647908, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, orderNo=3, keyword=vulnerability detection), Keyword(id=1251535846483116907, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, orderNo=4, keyword=machine learning), Keyword(id=1251535846554420082, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, orderNo=5, keyword=expert pattern), Keyword(id=1251535846629917560, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, orderNo=1, keyword=区块链), Keyword(id=1251535846709609343, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, orderNo=2, keyword=智能合约), Keyword(id=1251535846814466950, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, orderNo=3, keyword=漏洞检测), Keyword(id=1251535846923518862, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, orderNo=4, keyword=机器学习), Keyword(id=1251535847053542292, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, orderNo=5, keyword=专家模式)], refs=[Reference(id=1251535848576074743, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2018, volume=20, issue=4, pageStart=3416, pageEnd=3452, url=null, language=null, rfNumber=[1], rfOrder=0, authorNames=CONTI M, KUMAR S, LAL C, journalName=IEEE Communications Surveys and Tutorials, refType=null, unstructuredReference=CONTI M, KUMAR S, LAL C, et al. A survey on security and privacy issues of bitcoin. IEEE Communications Surveys and Tutorials, 2018, 20(4): 3416-3452., articleTitle=A survey on security and privacy issues of bitcoin, refAbstract=null), Reference(id=1251535848680932349, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=1997, volume=6, issue=1, pageStart=199, pageEnd=null, url=null, language=null, rfNumber=[2], rfOrder=1, authorNames=SZABO N, journalName=Nick Szabo's Papers and Concise Tutorials, refType=null, unstructuredReference=SZABO N. The idea of smart contracts. Nick Szabo's Papers and Concise Tutorials, 1997, 6(1): 199., articleTitle=The idea of smart contracts, refAbstract=null), Reference(id=1251535848810954756, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2017, volume=null, issue=null, pageStart=164, pageEnd=186, url=null, language=null, rfNumber=[3], rfOrder=2, authorNames=ATZEI N, BARTOLETTI M, CIMOLI T, journalName=In Principles of Security and Trust, refType=null, unstructuredReference=ATZEI N, BARTOLETTI M, CIMOLI T. Asurvey of attacks on ethereum smart contracts (sok). In Principles of Security and Trust, 2017: 164-186., articleTitle=Asurvey of attacks on ethereum smart contracts (sok), refAbstract=null), Reference(id=1251535848924200973, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2024, volume=35, issue=1, pageStart=38, pageEnd=62, url=null, language=null, rfNumber=[4], rfOrder=3, authorNames=董伟良, 刘哲, 刘逵, journalName=软件学报, refType=null, unstructuredReference=董伟良,刘哲,刘逵,.智能合约漏洞检测技术综述[J].软件学报, 2024, 35(1): 38-62., articleTitle=智能合约漏洞检测技术综述, refAbstract=null), Reference(id=1251535849037447186, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2024, volume=35, issue=1, pageStart=38, pageEnd=62, url=null, language=null, rfNumber=[4], rfOrder=4, authorNames=DONG W L, LIU Z, LIU K, journalName=Journal of Software, refType=null, unstructuredReference=DONG W L, LIU Z, LIU K, et al. Survey on vulnerability detection technology of smart contracts[J]. Journal of Software, 2024, 35(1): 38-62., articleTitle=Survey on vulnerability detection technology of smart contracts, refAbstract=null), Reference(id=1251535849129721880, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=1976, volume=19, issue=7, pageStart=385, pageEnd=394, url=null, language=null, rfNumber=[5], rfOrder=5, authorNames=KING J C, journalName=Communications of the ACM, refType=null, unstructuredReference=KING J C. Symbolic execution and program testing. Communications of the ACM, 1976, 19(7): 385-394., articleTitle=Symbolic execution and program testing, refAbstract=null), Reference(id=1251535849242968094, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2023, volume=60, issue=null, pageStart=020001, pageEnd=null, url=null, language=null, rfNumber=[6], rfOrder=6, authorNames=张小松, 牛伟纳, 黄世平, journalName=四川大学学报:自然科学版, refType=null, unstructuredReference=张小松,牛伟纳,黄世平,.基于深度学习的智能合约漏洞检测方法综述[J].四川大学学报:自然科学版, 2023, 60: 020001., articleTitle=基于深度学习的智能合约漏洞检测方法综述, refAbstract=null), Reference(id=1251535849310076963, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2023, volume=60, issue=null, pageStart=020001, pageEnd=null, url=null, language=null, rfNumber=[6], rfOrder=7, authorNames=ZHANG X S, NIU W N, HUANG S P, journalName=Journal of Sichuan University (Natural Science Edition), refType=null, unstructuredReference=ZHANG X S, NIU W N, HUANG S P, et al. A survey of smart contract vulnerability detection methods based on deep learning[J]. Journal of Sichuan University (Natural Science Edition), 2023, 60: 020001., articleTitle=A survey of smart contract vulnerability detection methods based on deep learning, refAbstract=null), Reference(id=1251535849444294700, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2021, volume=null, issue=null, pageStart=1325, pageEnd=1341, url=null, language=null, rfNumber=[7], rfOrder=8, authorNames=PEREZ D, LIVSHITS B, journalName=null, refType=null, unstructuredReference=PEREZ D, LIVSHITS B. Smart contract vulnerabilities:Vulnerable does not imply exploited. In 30th USENIX Security Symposium (USENIX Security 21), 2021: 1325-1341., articleTitle=Smart contract vulnerabilities:Vulnerable does not imply exploited, refAbstract=null), Reference(id=1251535849536569393, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2019, volume=46, issue=11, pageStart=1, pageEnd=10, url=null, language=null, rfNumber=[8], rfOrder=9, authorNames=范吉立, 李晓华, 聂铁铮, journalName=计算机科学, refType=null, unstructuredReference=范吉立,李晓华,聂铁铮,.区块链系统中智能合约技术综述[J].计算机科学, 2019, 46(11): 1-10., articleTitle=区块链系统中智能合约技术综述, refAbstract=null), Reference(id=1251535849616261175, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2019, volume=46, issue=11, pageStart=1, pageEnd=10, url=null, language=null, rfNumber=[8], rfOrder=10, authorNames=FAN J L, LIXH, NIETZ, journalName=Computer Science, refType=null, unstructuredReference=FAN J L, LIXH,NIETZ, et al. Survey on smart contract based on blockchain system[J]. Computer Science, 2019, 46(11): 1-10., articleTitle=Survey on smart contract based on blockchain system, refAbstract=null), Reference(id=1251535849691758652, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2019, volume=null, issue=null, pageStart=1, pageEnd=11, url=null, language=null, rfNumber=[9], rfOrder=11, authorNames=CHEN T, LI Z H, ZHANG Y F, journalName=null, refType=null, unstructuredReference=CHEN T, LI Z H, ZHANG Y F, et al. A large-scale empirical study on control flow identification of smart contracts. In 2019 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), 2019: 1-11., articleTitle=A large-scale empirical study on control flow identification of smart contracts, refAbstract=null), Reference(id=1251535849796616257, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=[10], rfOrder=12, authorNames=MIKOLOV T, CHEN K, CORRADO G, journalName=Computer Science. arXiv preprint arXiv 2013: 1301.3781, refType=null, unstructuredReference=MIKOLOV T, CHEN K, CORRADO G, et al. Efficient estimation of word representations in vector space[J]. Computer Science. arXiv preprint arXiv 2013: 1301.3781., articleTitle=Efficient estimation of word representations in vector space, refAbstract=null), Reference(id=1251535849880502343, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2024, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=[11], rfOrder=13, authorNames=SHAP, journalName=null, refType=null, unstructuredReference=SHAP. Welcome to the SHAP documentation[EB/OL]. 2024. https://shap.readthedocs.io/en/latest/index.html., articleTitle=Welcome to the SHAP documentation, refAbstract=null), Reference(id=1251535849976971342, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2019, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=[12], rfOrder=14, authorNames=SEC-BIT, journalName=null, refType=null, unstructuredReference=SEC-BIT. Awesome-buggy-erc20-tokens[EB/OL]. 2019. https//github.com/sec-bit/awesome-buggyerc20-tokens., articleTitle=Awesome-buggy-erc20-tokens, refAbstract=null), Reference(id=1251535850060857425, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2021, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=[13], rfOrder=15, authorNames=ConsenSys, journalName=null, refType=null, unstructuredReference=ConsenSys. Mythril-security analysis tool for evm bytecode[EB/OL]. 2021. https://github.com/Consen-Sys/mythril., articleTitle=Mythril-security analysis tool for evm bytecode, refAbstract=null), Reference(id=1251535850127966294, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2016, volume=null, issue=null, pageStart=254, pageEnd=269, url=null, language=null, rfNumber=[14], rfOrder=16, authorNames=LUU L, CHU D, OLICKEL H, journalName=null, refType=null, unstructuredReference=LUU L, CHU D, OLICKEL H, et al. Making smart contracts smarter. In Proceedings of the 2016 ACM SIG-SAC Conference on Computer and Communications Security, 2016: 254-269., articleTitle=Making smart contracts smarter, refAbstract=null), Reference(id=1251535850186686555, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2018, volume=null, issue=null, pageStart=1317, pageEnd=1333, url=null, language=null, rfNumber=[15], rfOrder=17, authorNames=KRUPP J, ROSSOW C, journalName=null, refType=null, unstructuredReference=KRUPP J, ROSSOW C. TeEther: Gnawing at ethereum to automatically exploit smart contracts. In 27th USENIX Security Symposium (USENIX Security 18), 2018: 1317-1333., articleTitle=TeEther: Gnawing at ethereum to automatically exploit smart contracts, refAbstract=null), Reference(id=1251535850278961247, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=2020, volume=null, issue=null, pageStart=3283, pageEnd=3290, url=null, language=null, rfNumber=[16], rfOrder=18, authorNames=ZHUANG Y, LIU Z, QIAN P, journalName=null, refType=null, unstructuredReference=ZHUANG Y, LIU Z, QIAN P, et al. Smart contract vulnerability detection using graph neural network[C]//IJCAI, 2020: 3283-3290., articleTitle=Smart contract vulnerability detection using graph neural network, refAbstract=null), Reference(id=1251535850400596069, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=[17], rfOrder=19, authorNames=TOUVRON H, LAVRIL T, IZACARD G, journalName=arXiv preprint arXiv 2023: 2302.13971, refType=null, unstructuredReference=TOUVRON H, LAVRIL T, IZACARD G, et al. Llama:Open and efficient foundation language models[J]. arXiv preprint arXiv 2023: 2302.13971., articleTitle=Llama:Open and efficient foundation language models, refAbstract=null)], funds=null, companyList=[AuthorCompany(id=1251535844432102092, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, xref=null, ext=[AuthorCompanyExt(id=1251535844444685005, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China), AuthorCompanyExt(id=1251535844453073614, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, companyId=1251535844432102092, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=北京邮电大学 网络空间安全学院,北京 100876)])], figs=[ArticleFig(id=1251535847246480292, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, label=null, caption=null, figureFileSmall=KF593Wf0ktoim/qUnbdjKA==, figureFileBig=wC122CJjj8oq24SUW06v6Q==, tableContent=null), ArticleFig(id=1251535847351337901, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, label=图1, caption=检测智能合约漏洞流程图, figureFileSmall=KF593Wf0ktoim/qUnbdjKA==, figureFileBig=wC122CJjj8oq24SUW06v6Q==, tableContent=null), ArticleFig(id=1251535847598801849, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, label=null, caption=null, figureFileSmall=+gX7nUm8QN2SYKksuxItyg==, figureFileBig=tMyYAvbxW7xlJ4o7ZXjU3w==, tableContent=null), ArticleFig(id=1251535847728825280, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, label=图2, caption=数据集中各漏洞合约占比, figureFileSmall=+gX7nUm8QN2SYKksuxItyg==, figureFileBig=tMyYAvbxW7xlJ4o7ZXjU3w==, tableContent=null), ArticleFig(id=1251535847825294279, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, label=null, caption=null, figureFileSmall=axQfA4BOTk+Ucf/G4bDS9Q==, figureFileBig=bBpqU6klTp7RyhAZtC8Jug==, tableContent=null), ArticleFig(id=1251535848047592399, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, label=图3, caption=各种漏洞的特征权重, figureFileSmall=axQfA4BOTk+Ucf/G4bDS9Q==, figureFileBig=bBpqU6klTp7RyhAZtC8Jug==, tableContent=null), ArticleFig(id=1251535848135672787, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, label=null, caption=null, figureFileSmall=null, figureFileBig=null, tableContent=
漏洞类别方案精确率误报率漏报率
重入漏洞Oyente74.1013.0530.02
Mythril80.4317.9328.54
GNNSCVulDetector81.5719.1724.42
笔者方案95.1710.8513.78
权限控制漏洞Mythril77.8919.2024.76
GNNSCVulDetector67.9033.0826.15
TeEher82.1523.738.94
笔者方案86.5220.049.86
时间戳依赖漏洞Oyente81.0418.1529.23
Mythril83.6623.4228.94
GNNSCVulDetector79.5124.6719.69
笔者方案90.739.4912.33
整数溢出漏洞Oyente76.7418.9641.73
Mythril78.1515.4235.75
GNNSCVulDetector70.0321.8815.79
笔者方案89.0416.3520.18
), ArticleFig(id=1251535848227947482, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, label=表1, caption=

本方案与其他工具4种漏洞检测效果对比

, figureFileSmall=null, figureFileBig=null, tableContent=
漏洞类别方案精确率误报率漏报率
重入漏洞Oyente74.1013.0530.02
Mythril80.4317.9328.54
GNNSCVulDetector81.5719.1724.42
笔者方案95.1710.8513.78
权限控制漏洞Mythril77.8919.2024.76
GNNSCVulDetector67.9033.0826.15
TeEher82.1523.738.94
笔者方案86.5220.049.86
时间戳依赖漏洞Oyente81.0418.1529.23
Mythril83.6623.4228.94
GNNSCVulDetector79.5124.6719.69
笔者方案90.739.4912.33
整数溢出漏洞Oyente76.7418.9641.73
Mythril78.1515.4235.75
GNNSCVulDetector70.0321.8815.79
笔者方案89.0416.3520.18
), ArticleFig(id=1251535848316027874, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=EN, label=null, caption=null, figureFileSmall=null, figureFileBig=null, tableContent=
漏洞类别方案精确率误报率漏报率
重入漏洞大模型68.7421.9333.45
笔者方案95.1710.8513.78
权限控制漏洞大模型83.742.8621.15
笔者方案86.5220.049.86
时间戳依赖漏洞大模型91.115.3135.40
笔者方案90.739.4912.33
整数溢出漏洞大模型50.9412.4052.36
笔者方案89.0416.3520.18
), ArticleFig(id=1251535848412496877, tenantId=1146029695717560320, journalId=1251233871195320423, articleId=1251535842775351937, language=CN, label=表2, caption=

笔者方案与Meta公司大模型在各漏洞上的检测效果对比

, figureFileSmall=null, figureFileBig=null, tableContent=
漏洞类别方案精确率误报率漏报率
重入漏洞大模型68.7421.9333.45
笔者方案95.1710.8513.78
权限控制漏洞大模型83.742.8621.15
笔者方案86.5220.049.86
时间戳依赖漏洞大模型91.115.3135.40
笔者方案90.739.4912.33
整数溢出漏洞大模型50.9412.4052.36
笔者方案89.0416.3520.18
)], attaches=null, journal=Journal(id=1251231493079478365, delFlag=0, nameCn=北京邮电大学学报, nameEn=Journal of Beijing University of Posts and Telecommunications, nameHistory1=null, nameHistory2=null, issn=1007-5321, eissn=, cn=11-3570/TN, coden=null, periodic=双月刊, language=CN, oaType=1, ccby=null, superviseOffice=null, ownerOffice=null, pubOffice=null, editorOffice=null, officeType=null, aims=null, clcCode=null, officeProv=null, officeCity=null, officeAddr=null, officeZip=null, officeEmail=, officePhone=, editDirector=null, officeDirector=null, officeDirectorPhone=null, officeStaffNum=null, officeEmpNum=null, coverPicUrl=3oVT0g3QLp1rkvAIIuTmqQ==, journalPrice=null, startedYear=null, abbrevIsoEn=Journal of Beijing University of Posts and Telecommunications, journalRemark=null, publicationField=null, createdTime=1776246434710, updatedTime=1776251818275, createdBy=18614031015, updatedBy=13701087609, firstLetterCn=J, firstLetterEn=J, subjectCode=Natural Sciences, subjectName=自然科学, subjectCodeEn=Natural Sciences, subjectNameEn=null, picCn=3oVT0g3QLp1rkvAIIuTmqQ==, picEn=cZgqTxrxv5qAJeszFMxaRQ==, jcr=null, cjcr=null, exts=[JournalExt(id=1251254073522078690, language=CN, name=北京邮电大学学报, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1776251818304, updatedTime=1776251818304, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://journal.bupt.edu.cn/journalx_yddxzrb/authorLogOn.action, submissionEditorUrl=https://journal.bupt.edu.cn/journalx_yddxzrb/editorLogOn.action, submissionReviewUrl=https://journal.bupt.edu.cn/journalx_yddxzrb/expertLogOn.action, submissionCeEditorUrl=, submissionAeEditorUrl=, option={"copyright":""}), JournalExt(id=1251254073559827427, language=EN, name=Journal of Beijing University of Posts and Telecommunications, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1776251818313, updatedTime=1776251818313, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://journal.bupt.edu.cn/journalx_yddxzrb/authorLogOn.action, submissionEditorUrl=https://journal.bupt.edu.cn/journalx_yddxzrb/editorLogOn.action, submissionReviewUrl=https://journal.bupt.edu.cn/journalx_yddxzrb/expertLogOn.action, submissionCeEditorUrl=, submissionAeEditorUrl=, option={"copyright":""})], databaseList=null, tenantJournalId=1251233871195320423, websiteList=[Website(id=1251257283355820070, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1251233871195320423, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/bjyddxxb/CN, language=CN, createTime=1776252583588, createBy=18614031015, updateTime=1776252856823, updateBy=18614031015, name=北京邮电大学学报-中文, tplId=1146099689490845704, title=北京邮电大学学报, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1251258558722031723, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=articleTextType, value=kx, createTime=1776252887659, updateTime=1776252887659, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558696865896, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=banner, value=null, createTime=1776252887653, updateTime=1776252887653, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558743003246, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=grayFlag, value=0, createTime=1776252887664, updateTime=1776252887664, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558684282983, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=logo, value=https://castjournals.cast.org.cn/joweb/bjyddxxb/CN/file/pic?fileId=TrlkYZ8NzFuGUlsjyFExDA==, createTime=1776252887650, updateTime=1776252887650, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558755586160, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=minRunFlag, value=0, createTime=1776252887667, updateTime=1776252887667, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558713643114, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/bjyddxxb/CN/file/pic, createTime=1776252887657, updateTime=1776252887657, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558747197551, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=silenceFlag, value=0, createTime=1776252887665, updateTime=1776252887665, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558705254505, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_cn_619/, createTime=1776252887655, updateTime=1776252887655, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558726226028, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=themeColor, value=null, createTime=1776252887660, updateTime=1776252887660, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258558734614637, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283355820070, code=themeStyle, value=null, createTime=1776252887662, updateTime=1776252887662, creator=18614031015, updator=18614031015)]), Website(id=1251257283590701108, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1251233871195320423, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/bjyddxxb/EN, language=EN, createTime=1776252583644, createBy=18614031015, updateTime=1776252852864, updateBy=18614031015, name=北京邮电大学学报-英文, tplId=1146101810881728533, title=Journal of Beijing University of Posts and Telecommunications, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1251258589290119285, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=articleTextType, value=kx, createTime=1776252894947, updateTime=1776252894947, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589269147762, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=banner, value=null, createTime=1776252894942, updateTime=1776252894942, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589311090808, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=grayFlag, value=0, createTime=1776252894952, updateTime=1776252894952, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589260759153, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=logo, value=https://castjournals.cast.org.cn/joweb/bjyddxxb/EN/file/pic?fileId=TrlkYZ8NzFuGUlsjyFExDA==, createTime=1776252894940, updateTime=1776252894940, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589323673722, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=minRunFlag, value=0, createTime=1776252894955, updateTime=1776252894955, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589281730676, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/bjyddxxb/EN/file/pic, createTime=1776252894945, updateTime=1776252894945, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589315285113, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=silenceFlag, value=0, createTime=1776252894953, updateTime=1776252894953, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589277536371, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_en_623/, createTime=1776252894944, updateTime=1776252894944, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589294313590, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=themeColor, value=null, createTime=1776252894948, updateTime=1776252894948, creator=18614031015, updator=18614031015), WebsiteProps(id=1251258589302702199, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1251257283590701108, code=themeStyle, value=null, createTime=1776252894950, updateTime=1776252894950, creator=18614031015, updator=18614031015)])], journalTitle=北京邮电大学学报, weixinUrl=null, journalUrl=https://journal.bupt.edu.cn/, iacademicId=null, status=1, seqNo=null, journalTitleEn=Journal of Beijing University of Posts and Telecommunications, journalPhotoCn=3oVT0g3QLp1rkvAIIuTmqQ==, journalPhotoEn=cZgqTxrxv5qAJeszFMxaRQ==, journalFirstLetter=J, journalRecommend=null, journalNew=null, journalCollection=null, jcrJf=null, cjcrJf=null, jcrJfStr=null, cjcrJfStr=null, submissionFirstDecision=null, sciSubjectClassification=null, casSubjectClassification=null, citeScore=null, totalCitationFrequency=null, icpCode=null, psCode=null, advertisingLicenseCode=null, copyrightInformation=null, country=null, option=, provinceCode=null, provinceName=null, collectFlag=false), detailUrlCn=https://castjournals.cast.org.cn/joweb/bjyddxxb/CN/10.13190/j.jbupt.2024-197, detailUrlEn=https://castjournals.cast.org.cn/joweb/bjyddxxb/EN/10.13190/j.jbupt.2024-197, pdfUrlCn=https://castjournals.cast.org.cn/joweb/bjyddxxb/CN/PDF/10.13190/j.jbupt.2024-197, pdfUrlEn=https://castjournals.cast.org.cn/joweb/bjyddxxb/EN/PDF/10.13190/j.jbupt.2024-197, aliStartDate=null, aliEndDate=null, collectionFlag=false, citedCount=null, citedUrl=null, reference=null)
收藏切换
基于专家模式和可解释机器学习的智能合约漏洞检测
收藏切换
PDF下载
谈聪 , 李彪 , 李文敏 , 秦素娟 , 高飞
北京邮电大学学报 | 论文 2025,48(5): 55-61
收起
收藏切换
北京邮电大学学报 | 论文 2025, 48(5): 55-61
基于专家模式和可解释机器学习的智能合约漏洞检测
全屏
谈聪, 李彪, 李文敏, 秦素娟 , 高飞
作者信息
  • 北京邮电大学 网络空间安全学院,北京 100876
  • 谈聪(2001—),女,硕士生。

通讯作者:

秦素娟(1979—),女,教授,博士生导师,邮箱:
Smart Contract Vulnerability Detection Based on Expert Pattern and Explainable Machine Learning
Cong TAN, Biao LI, Wenmin LI, Sujuan QIN , Fei GAO
Affiliations
  • School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, China
doi: 10.13190/j.jbupt.2024-197
文章导航
收藏切换

智能合约是运行在区块链上的一段计算机程序,具有自动执行、不可篡改、公开等特性。智能合约控制大量高价值数据的流动,攻击者可以利用智能合约存在的漏洞窃取资金或资源。现有的检测方法,如符号执行存在路径爆炸、误报率较高等问题,机器学习方法是黑盒的,有不可解释性。针对上述问题,提出了基于专家模式和可解释的机器学习来进行智能合约代码漏洞的检测,设计漏洞的专家模式,使用可解释性机器学习(SHAP)来解释多种特征的权重,针对4种漏洞(重入漏洞、时间戳漏洞、整数溢出漏洞、权限控制漏洞)的平均检测准确率达到了90.36%,和Oyente、Mythril等经典工具相比取得了更好的检测效果。

区块链  /  智能合约  /  漏洞检测  /  机器学习  /  专家模式

A smart contract is a piece of computer program that runs on the blockchain, which has the characteristics of automatic execution, non-tampering, and publicity. Smart contracts control the flow of large amounts of high-value data, and attackers can exploit vulnerabilities in smart contracts to steal funds or resources. Existing detection methods, such as symbol execution, have problems such as path explosion and high false positive rate, while machine learning methods are black-box and uninterpretable. In order to solve the above problems, an expert mode based on expert mode and explainable machine learning was proposed to detect vulnerabilities in smart contract code, an expert mode for vulnerabilities was designed, and shapley additive explanations (SHAP) was used to explain the weights of multiple features, and the average detection accuracy of four vulnerabilities (re-entrancy vulnerability, timestamp vulnerability, integer overflow vulnerability, and permission control vulnerability) reached 90.36% , which achieved better detection results compared with classic tools such as Oyente and Mythril.

blockchain  /  smart contract  /  vulnerability detection  /  machine learning  /  expert pattern
谈聪, 李彪, 李文敏, 秦素娟, 高飞. 基于专家模式和可解释机器学习的智能合约漏洞检测. 北京邮电大学学报, 2025 , 48 (5) : 55 -61 . DOI: 10.13190/j.jbupt.2024-197
Cong TAN, Biao LI, Wenmin LI, Sujuan QIN, Fei GAO. Smart Contract Vulnerability Detection Based on Expert Pattern and Explainable Machine Learning[J]. Journal of Beijing University of Posts and Telecommunications, 2025 , 48 (5) : 55 -61 . DOI: 10.13190/j.jbupt.2024-197
以太坊由Vitalik Buterin于2015年推出,是一个去中心化的开源区块链平台[1],对数字资产和去中心化应用程序的世界产生了重大影响。智能合约是以太坊上自动执行的合约,其条款直接写入代码[2]。它们存储并复制到区块链网络上,以确保透明度、可验证性和不变性。一旦满足指定的条件,智能合约就会自动执行商定的操作,而无需中介。关注以太坊上智能合约的安全性至关重要,因为任何违规行为都可能导致重大财务损失[3],并破坏对生态系统的信任。
智能合约作为可信的去中心化应用,获得了广泛关注,但是其存在的安全漏洞问题也给智能合约的可靠性带来了巨大的威胁。智能合约上链后若存在漏洞无法被修复,这对智能合约的可靠性提出了更高的要求。目前,研究者们使用多种方法,比如符号执行、形式化验证、中间表示、模糊测试、深度学习等来进行智能合约的漏洞检测[4],取得了一定的成果。
符号执行方法先将合约中的变量值符号化,在逐条解释执行程序中指令的过程中,更新执行状态,搜集路径约束,以完成程序中所有可执行路径的探索,并发现相应的安全问题,但存在路径爆炸与约束求解难[5]、误报漏报率较高等问题。
形式化验证是最严谨的智能合约安全验证技术,但其自动化程度相对较低,且无法动态分析,缺乏对漏洞检测结果的可达性检验,会产生较高的误报率。形式化验证可能无法应对智能合约中的所有情况,因此可能存在遗漏的情况。
模糊测试是当前流行的漏洞检测技术之一,从目标应用程序中生成大量正常和异常的测试用例,尝试将生成的用例提供给目标应用程序,并监视执行状态中的异常结果以发现安全问题,可发现智能合约中的未预料到的输入和边界情况。但是通常需要大量的随机输入来覆盖各种情况,可能无法覆盖所有可能的路径和漏洞。
近年来,深度学习在代码漏洞检测领域已经有越来越多的成功实践,在智能合约漏洞检测领域也有一定程度的应用,与传统漏洞挖掘方法相比,引入深度技术可缓解传统方法耗费的大量人力与误报率、漏报率较高的问题,但是目前深度学习在检测智能合约跨函数漏洞上的检测效果不佳[4]。另外,深度学习方法依赖数据集、算法,存在源码语义建模不足和检测结果可解释性较差[6]等问题。
为了缓解机器学习检测智能合约漏洞的黑盒问题,以及应对机器学习检测合约中跨函数漏洞准确率低的问题,基于开源的智能合约数据集,结合设计的专家模式使用机器学习的模型来进行4种类型:重入漏洞、时间戳漏洞、整数溢出漏洞、权限控制漏洞的代码漏洞检测。4种漏洞的平均检测准确率、误报率、漏报率分别为90.36%,14.18%,14.04%,显著提升了漏洞检测效果。对提取出来的多种特征进行了权重解释,通过比较多种特征对于模型训练的贡献程度来为机器学习提供解释性。
智能合约的重要特点之一就是调用和利用其他外部的合约。通常在合约中会发生一些将以太币发送给外部用户账户的行为,而转账和调用外部合约的操作需要智能合约的外部调用,若这些外部调用操作不慎,则极其容易被攻击者利用。可重入性通常表现为一个函数的同时多次调用,恶意合约在调用其他函数完成之前多次调用被攻击函数,在被攻击合约中“重新输入”了代码执行[7],从而实现攻击,这可能会造成巨大的破坏。
当算术运算达到类型的最大或最小值时,将发生上溢或者下溢。例如,如果一个数字以uint8类型存储,则意味着该数字以8位无符号数字存储,值范围从0到28 -1。当算术运算试图创建一个超出指定位数表示范围的数值时,就会发生整数溢出。在Solidity语言中也会出现类似的问题。
合约通常需要访问时间值以执行某种功能。block. timestamp和block. number可以使开发者了解当前区块的时间参数,但是大多数情况下使用它们并不安全。对于block. timestamp,开发人员经常尝试使用它来触发时间相关的事件。由于以太坊是去中心化的节点,只能在某种程度上同步时间[8]。此外,恶意矿工可以更改其区块的时间戳。
Solidity语言中函数和变量的4种可见性修饰包含:public,internal,private,external。如果开发人员未设置函数或状态变量的可见性,或可见性为public或internal,并且恶意用户能够进行未经授权或意外的状态更改,则可能导致漏洞。
针对深度学习在检测智能合约跨函数漏洞上检测效果不佳、源代码语义建模不足、检测结果可解释性差的问题,提出了基于专家模式和可解释机器学习的智能合约漏洞检测方案。
方案检测流程如下:首先对智能合约Solidity源代码进行预处理,提取出源代码的语义特征和操作码的结构特征,使用漏洞专家知识经跨函数静态分析模块分析得到专家模式特征,输入特征到深度学习模型中训练,使用可解释性机器学习(SHAP,shapley additive explanations)库进行可解释的特征权重计算,特征筛选模块利用深度学习解释得到的专家模式特征、源代码语义特征、操作码序列结构特征的权重,上述权重可以展示不同特征在模型训练过程中起到的作用,最后输出漏洞检测报告。图1为笔者方案的检测智能合约代码漏洞的流程图。
对源代码进行预处理,包含去除Solidity代码中的注释、换行符、空格等。在作数据预处理的时候,可以捕捉与漏洞相关的重要变量所在的源代码片段,去除源代码中的噪音代码。如未对msg. sender进行正确的权限验证,可能导致未经授权的地址执行合约中的敏感操作;不正确地使用block. timestamp可能导致时间依赖性的漏洞,如时间戳漏洞;不正确地使用合约自身的地址可能导致重入攻击或其他安全问题。
源代码编译得到字节码,处理字节码得到合约中的控制流图(CFG,control flow graph),针对CFG进行深度优先搜索(DFS,depth-first search)遍历得到操作码路径。智能合约中与漏洞密切相关的操作码[9]包含获取当前合约地址的address、获取指定地址的以太币余额的balance、根据权限条件进行跳转或回滚的操作码jump和jumpi、存储和读取状态变量的sstore和sload等。可以结合与漏洞相关的操作码对操作码路径进行去噪处理。
提取源代码语义特征、操作码结构特征、专家模式特征作为机器模型训练的输入。
1)源代码语义特征提取。将经过预处理后的源代码划分为token;然后使用自然语言处理的方法从中提取出智能合约的语义特征。使用预训练的词嵌入模型Word2Vec[10]将token转换为密集的向量表示;使用n-gram模型来捕捉标记序列的局部上下文信息,使用3-gram来提取相邻标记的组合特征。
2)操作码结构特征提取。操作码特征指的是操作码序列包含的结构特征,针对智能合约源代码使用solc编译器编译得到字节码,然后使用evm_cfg_builder生成字节码对应的CFG图文件,使用DFS算法遍历CFG图得到操作码序列的路径,路径中即包含了智能合约代码的结构信息。
3)专家模式特征提取。根据智能合约漏洞库漏洞原理获取专家知识,使用跨函数静态分析模块分析敏感路径,在敏感路径上进行专家知识校验,得到漏洞的专家模式特征。
跨函数静态分析模块流程如下:构建CFG和数据依赖图(DDG,data dependency graph),然后将CFG和DDG合并成一个综合图,这样可以同时考虑控制流和数据流。在综合图中标记所有涉及到权限控制和敏感操作的关键节点。权限控制节点通常是指那些包含权限检查的地方,如函数调用或状态变量修改;而敏感操作节点是指那些执行关键动作的地方,比如转移资产或修改重要状态变量。从权限控制节点出发,寻找所有通往敏感操作节点的路径,并构建路径集合。
以重入漏洞为例,通过在跨函数静态分析模块收集到的路径上实现算法1,提取专家模式的算法如下所示。
算法1 提取重入漏洞专家模式
输入:contract智能合约源代码
中间:allFunctionList所有的函数存放在列表callValueFunctionList调用了call. value的函数存放在列表里
otherFunctionList其他函数存放在列表里
输出:patterns提取出的重入漏洞专家模式
Begin
Patterns初始化为空列表。
对contract进行预处理:去除注释空格等。
切割得到contract中的函数列表allFunctionList:
for function in allFunctionList
 if‘call. value' in function
  callValueFunctionList. add(function)
 else
  otherFunctionList. add(function)
 if len(callValueFunctionList)! =0
  patterns. append(1)
  if callValueFunctionList调用了call. value的变量进行算术操作:
   patterns. append(1)
   if call. value的参数在后面出现:
    patterns. append(1)
 else
  patterns. append(0)
End
将2.2节中提取出的3种特征放到机器学习模型中训练,并使用SHAP库来对权重进行解释。SHAP是一种流行的机器学习模型解释性工具,它基于博弈论中的Shapley值来解释模型的预测结果。SHAP的核心思想是,模型的每个预测都是由多个特征的“贡献”组成的,这些贡献可以被量化为SHAP值[11]。通过计算每个特征对预测结果的SHAP值,可以了解每个特征对模型输出的影响程度。
输入特征到深度学习的模型中预训练完成后,使用SHAP算法来评估模型的预测。下面为使用SHAP库解释多种特征的算法2。
算法2 SHAP实现特征权重的可解释性
输入:model预训练好的机器学习模型;data特征数据集;n特征数量;m数据集中样本的数量
输出:shap_values包含每个特征的SHAP值数组
Begin
初始化shap_values数组,长度为m,存储每个样本的SHAP值。
计算模型预测的基线值base_value:
 base_value = model(data)
 for i in data
  特征i的权重初始化:Pi =0
  对每个特征子集S except i
   计算子集S的权重w
   计算子集S与特征i结合的模型预测值Fi=model(data[S∪{i}])
   计算子集S的模型预测值F= model(data[S])
  累加特征i的增量Pi =Pi +wFi -F
  sharp_values[i] = Pi
 return sharp_values
End
使用的实验条件如下:配置为4核、8GB内存、8Mbit/s带宽的Ubuntu Server 20.04长期支持(LTS,long term support)64位服务器。服务器的系统盘容量为500GB。代码开发工具为Visual Studio Code。使用的Python环境版本为3.7.2。
笔者从已发布的文献和Awesome-BuggyERC20-Tokens[12]项目收集智能合约,最终共收集了51039个智能合约,去除重复的合约和空白的合约后,共包含18131个合约。其中,包含漏洞的合约有8523个,包含重入漏洞的合约有2392个,包含权限控制漏洞的合约有1596个,包含整数溢出漏洞的合约有3419个,包含时间戳漏洞的合约有1116个,不包含漏洞的合约有9608个,数据分布如图2所示。
实验评价指标包含精确率、漏报率、误报率。
1)精确率:表示检测准确的个数占所有样本的比例。
2)漏报率:表示在检测没有漏洞但实际上包含漏洞的合约个数占实际上所有包含漏洞合约个数的比例,也就是漏报合约的个数占所有具有漏洞合约个数的比例。
3)误报率:表示在检测包含漏洞但是实际上并没有漏洞的合约个数占实际上无漏洞合约个数的比例,也就是误报合约的个数占所有正常合约个数的比例。
实验1 为了研究笔者方案检测效果是否优于智能合约漏洞检测领域经典方法的问题,调研文献后,选择下面经典智能合约代码漏洞工具在3.1节的智能合约的数据集上作实验比对。
Mythril[13]是一种智能合约静态分析工具,其使用概念分析、污点分析和控制流验证来检测以太坊智能合约中的漏洞,包含重入漏洞、整数溢出漏洞、时间戳漏洞、权限控制漏洞等。
Oyente[14]以智能合约字节码和以太坊状态作为输入,模拟以太坊虚拟机(EVM,Ethereum virtual machine),并且遍历合约的不同执行路径,其支持检测的漏洞类型包括重入漏洞、整数溢出漏洞、时间戳漏洞等。
TeEther[15]是一种智能合约静态分析工具,区别于其他工具,它考虑了智能合约漏洞自动识别以及合约生成方法,并通过分析合约字节码查找关键的执行路径,以检测合约的安全问题。可检测权限控制漏洞等。
GNNSCVulDetector[16]是一种使用图神经网络进行智能合约漏洞检测的技术。可针对重入漏洞、整数溢出漏洞、时间戳漏洞、权限控制漏洞进行检测。实验结果如表1所示。
使用SHAP库对训练好的4种漏洞的检测模型进行权重分析的结果如图3所示。图3中weight_expert,weight_structure,weight_code分别表示专家模式特征、操作码结构特征、代码语义特征对于模型训练结果的贡献程度,SHAP值越大,贡献程度越高。若某一类特征的SHAP值低于5%,说明该特征对模型训练的贡献程度不大,需要进行特征筛选重新训练。
下面以重入漏洞为例分析其特征权重。比较语义特征weight_code、结构特征weight_structure、专家知识特征weight_expert大小:weight_structure>weight_expert>weight_code。这表明在重入漏洞检测中,操作码结构特征对模型的贡献度最高,其次是专家模式特征,最后是代码语义特征。这一结果与重入漏洞的原理相符,因为重入漏洞通常与递归调用转账函数有关,这是一种结构上的特征。重入漏洞的原理可简述为递归调用某个转账函数,递归调用这一动作和结构特征联系紧密,同时weight_expert>weight_code说明专家模式特征能够捕捉到更深层次的、与漏洞相关的模式。由于源代码的语义特征对于检测的贡献度较低,于是仅输入结构特征和专家特征重新训练机器学习的模型,发现准确率没有降低,可以筛除掉源代码的语义特征,这也验证了特征筛选的有效性。去除不必要的特征可以减少模型的复杂度,防止过拟合。
实验2为了比对笔者方案和大模型在数据集上的检测效果,使用Meta公司推出的大语言模型元人工智能[17](LLaMA,large language model meta AI)进行实验对比。在3.1节中的数据集上使用LLaMA 3.2版本模型,基于提示词工程设计输入的问题检测智能合约漏洞。将大模型输出的实验结果进行统计,与论文提出方案进行对比,得到的实验结果如表2所示。
根据表2可知,LLaMA 3.2大模型在数据集上的时间戳漏洞检测效果比笔者方案好,但是在其他3种漏洞上的检测效果较差。实验中发现针对长合约的检测效果较差,目前LLaMA 3.2处理这种长文本的能力还不符合预期,需要结合专家知识来检测。
针对机器学习的难解释性和主流工具检测误报漏报问题,设计了检测工具,基于4类漏洞(重入漏洞、时间戳漏洞、整数溢出漏洞、权限控制漏洞)的原理设计专家模式,将专家模式特征和字节码中提取的特征输入到机器学习的模型中,并给出训练过程不同特征的权重分析结果,赋予工具检测结果以可解释性。从公开的漏洞数据库中收集了智能合约数据集,并进行了实验,证明了笔者工具的有效性,其准确率超过了现有的智能合约漏洞检测工具如Oyente等,降低了误报率和漏报率。同时,针对部分漏洞目前没有全面的检测工具,后续可以收集智能合约的其他漏洞类别的数据集,设计专家模式,扩充工具对于漏洞类别的覆盖面。
参考文献 引证文献
排序方式:
[1]
CONTI M, KUMAR S, LAL C, et al. A survey on security and privacy issues of bitcoin. IEEE Communications Surveys and Tutorials, 2018, 20(4): 3416-3452.
[2]
SZABO N. The idea of smart contracts. Nick Szabo's Papers and Concise Tutorials, 1997, 6(1): 199.
[3]
ATZEI N, BARTOLETTI M, CIMOLI T. Asurvey of attacks on ethereum smart contracts (sok). In Principles of Security and Trust, 2017: 164-186.
[4]
董伟良,刘哲,刘逵,.智能合约漏洞检测技术综述[J].软件学报, 2024, 35(1): 38-62.
DONG W L, LIU Z, LIU K, et al. Survey on vulnerability detection technology of smart contracts[J]. Journal of Software, 2024, 35(1): 38-62.
[5]
KING J C. Symbolic execution and program testing. Communications of the ACM, 1976, 19(7): 385-394.
[6]
张小松,牛伟纳,黄世平,.基于深度学习的智能合约漏洞检测方法综述[J].四川大学学报:自然科学版, 2023, 60: 020001.
ZHANG X S, NIU W N, HUANG S P, et al. A survey of smart contract vulnerability detection methods based on deep learning[J]. Journal of Sichuan University (Natural Science Edition), 2023, 60: 020001.
[7]
PEREZ D, LIVSHITS B. Smart contract vulnerabilities:Vulnerable does not imply exploited. In 30th USENIX Security Symposium (USENIX Security 21), 2021: 1325-1341.
[8]
范吉立,李晓华,聂铁铮,.区块链系统中智能合约技术综述[J].计算机科学, 2019, 46(11): 1-10.
FAN J L, LIXH,NIETZ, et al. Survey on smart contract based on blockchain system[J]. Computer Science, 2019, 46(11): 1-10.
[9]
CHEN T, LI Z H, ZHANG Y F, et al. A large-scale empirical study on control flow identification of smart contracts. In 2019 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), 2019: 1-11.
[10]
MIKOLOV T, CHEN K, CORRADO G, et al. Efficient estimation of word representations in vector space[J]. Computer Science. arXiv preprint arXiv 2013: 1301.3781.
[11]
SHAP. Welcome to the SHAP documentation[EB/OL]. 2024. https://shap.readthedocs.io/en/latest/index.html.
[12]
SEC-BIT. Awesome-buggy-erc20-tokens[EB/OL]. 2019. https//github.com/sec-bit/awesome-buggyerc20-tokens.
[13]
ConsenSys. Mythril-security analysis tool for evm bytecode[EB/OL]. 2021. https://github.com/Consen-Sys/mythril.
[14]
LUU L, CHU D, OLICKEL H, et al. Making smart contracts smarter. In Proceedings of the 2016 ACM SIG-SAC Conference on Computer and Communications Security, 2016: 254-269.
[15]
KRUPP J, ROSSOW C. TeEther: Gnawing at ethereum to automatically exploit smart contracts. In 27th USENIX Security Symposium (USENIX Security 18), 2018: 1317-1333.
[16]
ZHUANG Y, LIU Z, QIAN P, et al. Smart contract vulnerability detection using graph neural network[C]//IJCAI, 2020: 3283-3290.
[17]
TOUVRON H, LAVRIL T, IZACARD G, et al. Llama:Open and efficient foundation language models[J]. arXiv preprint arXiv 2023: 2302.13971.
2025年第48卷第5期
PDF下载
132
62
引用本文
BibTeX
文章信息
doi: 10.13190/j.jbupt.2024-197
  • 接收时间:2024-10-09
  • 首发时间:2026-04-16
补充材料
相关文章
文章信息
作者
出版历史
  • 收稿日期:2024-10-09
基金
作者信息
    北京邮电大学 网络空间安全学院,北京 100876

通讯作者:

秦素娟(1979—),女,教授,博士生导师,邮箱:
参考文献
分享链接
https://castjournals.cast.org.cn/joweb/bjyddxxb/CN/10.13190/j.jbupt.2024-197
分享至
全文二维码

扫描看全文

引用本文
BibTeX
本文的引用情况
2种不同金属材料的力学参数

Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)

Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏