{"title":"SoliTester:使用合约账户触发方法检测智能合约中可利用的外部风险漏洞","authors":"Tianyuan Hu, Jingyue Li, Xiangfei Xu, Bixin Li","doi":"10.1002/smr.2633","DOIUrl":null,"url":null,"abstract":"<p>The vulnerability in smart contracts (SCs) on the blockchain system may lead to severe security compromises. The SC can be invoked from an externally owned account (EOA) or a contract account (CA). The account a user creates to receive or send ether is an EOA. A CA contains codes that can interact with SCs. In Solidity SC, some vulnerabilities can only be exploited by the interactions between CAs and vulnerable SCs, which can be named <i><b>external-risky vulnerabilities</b></i>. Most state-of-the-art (SOTA) detectors detect external-risky vulnerabilities by executing contract codes as an EOA user, thus reporting many unexploitable vulnerabilities. Therefore, we propose a CA-triggering method to identify exploitable external-risky vulnerabilities in Solidity SCs. We first designed agent contracts to simulate CAs' interactions with the target SCs in the real blockchain environment. We then detect vulnerability exploitation by analyzing transaction logs between agent contracts and target SCs and identifying successful exploits. We implemented the CA-triggering method in a tool named SoliTester and evaluated it using three benchmark datasets, which contain three types of external-risky vulnerabilities, namely, Reentancy (RE), Unchecked Call (UcC), and TxOrigin (TO). The results show that SoliTester can efficiently detect exploitable external-risky vulnerabilities with significantly better precisions and recalls than SOTA detectors.</p>","PeriodicalId":48898,"journal":{"name":"Journal of Software-Evolution and Process","volume":"36 7","pages":""},"PeriodicalIF":1.7000,"publicationDate":"2023-11-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"SoliTester: Detecting exploitable external-risky vulnerability in smart contracts using contract account triggering method\",\"authors\":\"Tianyuan Hu, Jingyue Li, Xiangfei Xu, Bixin Li\",\"doi\":\"10.1002/smr.2633\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p>The vulnerability in smart contracts (SCs) on the blockchain system may lead to severe security compromises. The SC can be invoked from an externally owned account (EOA) or a contract account (CA). The account a user creates to receive or send ether is an EOA. A CA contains codes that can interact with SCs. In Solidity SC, some vulnerabilities can only be exploited by the interactions between CAs and vulnerable SCs, which can be named <i><b>external-risky vulnerabilities</b></i>. Most state-of-the-art (SOTA) detectors detect external-risky vulnerabilities by executing contract codes as an EOA user, thus reporting many unexploitable vulnerabilities. Therefore, we propose a CA-triggering method to identify exploitable external-risky vulnerabilities in Solidity SCs. We first designed agent contracts to simulate CAs' interactions with the target SCs in the real blockchain environment. We then detect vulnerability exploitation by analyzing transaction logs between agent contracts and target SCs and identifying successful exploits. We implemented the CA-triggering method in a tool named SoliTester and evaluated it using three benchmark datasets, which contain three types of external-risky vulnerabilities, namely, Reentancy (RE), Unchecked Call (UcC), and TxOrigin (TO). The results show that SoliTester can efficiently detect exploitable external-risky vulnerabilities with significantly better precisions and recalls than SOTA detectors.</p>\",\"PeriodicalId\":48898,\"journal\":{\"name\":\"Journal of Software-Evolution and Process\",\"volume\":\"36 7\",\"pages\":\"\"},\"PeriodicalIF\":1.7000,\"publicationDate\":\"2023-11-10\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Software-Evolution and Process\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://onlinelibrary.wiley.com/doi/10.1002/smr.2633\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Software-Evolution and Process","FirstCategoryId":"94","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/smr.2633","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
摘要
区块链系统中智能合约(SC)的漏洞可能会导致严重的安全隐患。SC 可以从外部拥有的账户(EOA)或合约账户(CA)中调用。用户为接收或发送以太坊而创建的账户就是 EOA。CA 包含可与 SC 交互的代码。在Solidity SC中,有些漏洞只能通过CA与易受攻击的SC之间的交互来利用,这些漏洞可被称为外部风险漏洞。大多数最先进的(SOTA)检测器都是通过作为 EOA 用户执行合同代码来检测外部风险漏洞的,因此会报告许多无法利用的漏洞。因此,我们提出了一种CA触发方法来识别Solidity SC中可利用的外部风险漏洞。我们首先设计了代理合约,模拟 CA 在真实区块链环境中与目标 SC 的交互。然后,我们通过分析代理合约与目标 SC 之间的交易日志来检测漏洞利用情况,并识别成功的漏洞利用。我们在名为 SoliTester 的工具中实现了 CA 触发方法,并使用三个基准数据集对其进行了评估,这三个基准数据集包含三种类型的外部风险漏洞,即 Reentancy (RE)、Unchecked Call (UcC) 和 TxOrigin (TO)。结果表明,SoliTester 可以有效地检测可利用的外部风险漏洞,其精确度和召回率明显优于 SOTA 检测器。
SoliTester: Detecting exploitable external-risky vulnerability in smart contracts using contract account triggering method
The vulnerability in smart contracts (SCs) on the blockchain system may lead to severe security compromises. The SC can be invoked from an externally owned account (EOA) or a contract account (CA). The account a user creates to receive or send ether is an EOA. A CA contains codes that can interact with SCs. In Solidity SC, some vulnerabilities can only be exploited by the interactions between CAs and vulnerable SCs, which can be named external-risky vulnerabilities. Most state-of-the-art (SOTA) detectors detect external-risky vulnerabilities by executing contract codes as an EOA user, thus reporting many unexploitable vulnerabilities. Therefore, we propose a CA-triggering method to identify exploitable external-risky vulnerabilities in Solidity SCs. We first designed agent contracts to simulate CAs' interactions with the target SCs in the real blockchain environment. We then detect vulnerability exploitation by analyzing transaction logs between agent contracts and target SCs and identifying successful exploits. We implemented the CA-triggering method in a tool named SoliTester and evaluated it using three benchmark datasets, which contain three types of external-risky vulnerabilities, namely, Reentancy (RE), Unchecked Call (UcC), and TxOrigin (TO). The results show that SoliTester can efficiently detect exploitable external-risky vulnerabilities with significantly better precisions and recalls than SOTA detectors.