SMT. M. VANI, M. Doshi, Amit A. Nanavati, A. Kundu
Blockchain platforms and smart contracts are vulnerable to security breaches. Security breaches of smart contracts have led to huge financial losses in terms of cryptocurrencies and tokens. In this paper, we present a systematic survey of vulnerability analysis of smart contracts. We begin by providing a brief about the major types of attacks and vulnerabilities that are present in smart contracts. Then we discuss existing frameworks, methods and technologies used for vulnerability detection. We summarise our findings in a table which lists each framework and the attacks it protects against.
The search for smart contract source codes has drawn research attention to fulfill developers’ and researchers’ needs. Yet, the existing studies are not mature enough to address smart contracts’ technical properties and functionalities. This paper proposes a system to improve the naive search for smart contract codes; for example, Etherscan has one keyword search feature without regard to the contract structure. We consider clustering smart contracts based on developers’ preferences, which increases the probability that the resulting source codes match developers’ needs. Our experimental results show a significant improvement in the complexity of the retrieved source codes of smart contracts compared with the baseline scenario using blockchain search engines (e.g., Etherscan). Our solution reduces the number of retrieved smart contract codes the developer has to check if the codes match her/his needs by 94%, 88%, 82%, or 98%, depending on the user’s search preferences.
Organised crime and cybercriminals use Bitcoin, a popular cryptocurrency, to launder money and move it across borders with impunity. The UK and other countries have legislation to recover the proceeds of crime from criminals. Recent UK case law has recognised cryptocurrency assets as property that can be seized and realised under the Proceeds of Crime Act (POCA). To seize a cryptocurrency asset generally requires access to the private key. Anecdotal evidence suggests that if cryptocurrency is not seized quickly after enforcement action has taken place, it will be transferred to other wallets making it difficult to seize at a future time. We investigate how Bitcoin could be seized from an Electrum or Ledger hardware wallet, during a law enforcement search, using live forensic techniques and a dictionary attack. We conduct a literature review examining the state-of-the-art in Bitcoin application forensics and Bitcoin wallet attacks. Concluding, that there is a gap in research on Bitcoin wallet security and that a significant proportion of the available literature comes from a small group of academics working with industry and law enforcement (Volety et al. 2019; Van Der Horst et al., 2017; Zollner et al., 2019). We then forensically examine the Electrum software wallet and the Ledger Nano S hardware wallet, to establish what artefacts can be recovered to assist in the recovery of Bitcoin from the wallets. Our main contribution is a proposed framework for Bitcoin forensic triage, a collection tool to recover Bitcoin artefacts and identifiers, and two proof of concept dictionary-attack tools written in Python and OpenCL. We then evaluate these tools to establish if an attack is practicable using a low-cost cluster of public cloud-based Graphics Processing Unit (GPU) instances. During our investigation, we find a weakness in Electrum's storage of encrypted private keys in RAM. We leverage this to make around 2.4 trillion password guesses. We also demonstrate that we can conduct 16.6 billion guesses against a password protected Ledger seed phrase.
The Ethereum smart contract language Solidity has caused a breakthrough in the field of blockchain technology with the introduction of logic in contract-form via these smart contracts. Since these contracts are immutable, there is a serious requirement to audit and test these contracts multiple times before they are deployed. There are several cases of financial and reputation damage due to unaudited smart contracts as seen in the cases of the Axie Infinity hack or Wormhole bridge hack which resulted in hundreds of millions of dollar losses. For a developer just getting into web3 development, these hacks might intimidate and drive them away from learning due to the fear of incurring such losses themselves or due to not understanding the reason for hacks. This tool allows a developer to simply paste their contract into a textbox and obtain a list of the contract-based vulnerabilities found via parsing and pattern searching. Mitigation techniques are also suggested line by line to aid the developer in securing the contract. The key difference between this tool and existing technologies is that it is compact and very precise in identifying known contract-based vulnerabilities. Providing developers with a quick and simple interface was the rationale behind the motivation. Tools like parsers and regular expression libraries were used to look for keyword detection methodology. The tool is to be used supplementarily and not as the sole identifier of vulnerabilities since there are multiple layers to web3 security and this tool only identifies smart contract-based vulnerabilities, not off-chain ones. Future additions to this tool may include example vulnerable code snippets and also explanations for the reason they are not safe for deployment as well as mitigations which can be used by any user who is interested in learning web3 security and how hacks happen.
The smart contracts of Ethereum have brought an essential contribution to the development of blockchain. Nowadays, an increasing number of smart contracts are being deployed on Ethereum, which brings prosperity to Ethereum while also bringing many security risks. According to reports, several attacks due to the smart contract vulnerability have caused huge losses to Ethereum. Therefore, detecting smart contract security vulnerabilities is of great importance. However, the existing work is not sufficient to fully perform this task. For this reason, we propose a variant of the LSTM model to detect smart contract vulnerabilities at the bytecode level. In our variant LSTM model, we interact hidden state of the model with the input sequence multiple times. In this way, the variant model is able to capture more potential features in the bytecode for learning. We used a dataset of 34822 unique smart contracts for training and testing. The results show that the variant LSTM model outperforms the general LSTM model and improves in most metrics.
Elections make a fundamental contribution to democratic governance and are very important to select the appropriate person to determine the fate of a nation while a large number of citizens do not trust the ballot-paper-based voting system. As a result, e-Voting is being adopted by various countries throughout the world. With advantages, there are a number of constraints of e-voting systems, a single vulnerability can lead to large-scale manipulations of voting results. Leveraging and intersecting both cutting-edge technologies including biometric and blockchain technology can address the limitations of current e-Voting frameworks. In this research, we analyze the requirements for systems modeling of voting technology and possible opportunities to adopt biometrics and blockchain technology. Based on the requirements analysis, we propose a biometric-enabled and hyperledger fabric-based voting framework to automate identity verification that will ensure transparency and security of electronic voting. We utilize the software architecture analysis method and active reviews for intermediate designs for evaluating the proposed framework. Demonstration indicates the efficiency and quality attributes of architectural design that shall lead us to implement the system in real-world scenarios in future studies. Initially, we develop a Webbased prototype to demonstrate the framework. In future studies, we aim to implement on large scale and evaluate the prototype against the requirements and security standard.
Rashidah Funke Olanrewaju, Burhan Ul Islam Khan, Miss Laiha Mat Kiah, Nor Aniza Abdullah · 5 authors
The inclusion of mobility-based Internet-of-Things (IoT) devices accelerates the data transmission process, thereby catering to IoT users’ demands; however, securing the data transmission in mobility-based IoT is one complex and challenging concern. The adoption of unified security architecture has been identified to prevent side-channel attacks in the IoT, which has been discussed extensively in developing security solutions. Despite blockchain’s apparent superiority in withstanding a wide range of security threats, a careful examination of the relevant literature reveals that some common pitfalls are associated with these methods. Therefore, the proposed scheme introduces a novel computational security framework wherein a branched and decentralized blockchain network is formulated to facilitate coverage from different variants of side-channel IoT attacks that are yet to be adequately reported. A unique blockchain-based authentication approach is designed to secure communication among mobile IoT devices using multiple stages of security implementation with Smart Agreement and physically unclonable functions. Analytical modeling with lightweight finite field encryption is used to create this framework in Python. The study’s benchmark results show that the proposed scheme offers 4% less processing time, 5% less computational overhead, 1% more throughput, 12% less latency, and 30% less energy consumption compared to existing blockchain methods.
The security of crypto wallets is a major concern in light of the recent prevalence of thefts. Aiming at the problem that there is no complete and reliable security detection model for Android-based crypto wallets, this study provides an evaluation framework based on the standard Android application security detection and unique security assessment of crypto wallets. The framework presents an attack-based detection approach, which identifies potential wallet security issues by simulating attacks and exploiting vulnerabilities. Ten popular Android crypto wallets are evaluated and compared to validate the framework’s practicability and accuracy. The test results demonstrate that the framework can accurately reflect the performance security of wallets. Additionally, the study proposes the corresponding actions to address the identified common security threats in crypto wallets.
A smart contract is a program running on a blockchain platform. Smart devices send data to smart contracts or change their own status based on smart contracts. Businesses want to use smart devices and smart contracts to streamline workflow because smart contracts reduce the need in trusted intermediators and cut down enforcement costs. However, developing smart contract applications is challenging due to different memory models, different interaction models, and a dearth of supporting tools and libraries. When developers are asked to reimplement conventional applications to smart contracts, it is thus ideal to automatically transform them, avoiding manual labor, as well as ensuring reliability and security. This paper contributes a set of rules to transform conventional applications in the Model-View-Controller (MVC) pattern into smart contracts running on Hyperledger Fabric, a blockchain platform preferred by businesses. Major transformations are performed in the model, while in the controller, model calls are replaced by smart contract calls. The source application and the target smart contract are all written in Java. Our rules add read-your-writes consistency that Hyperledger Fabric does not natively support. Runtime pre- and post-condition checking in the original application is supported in the transformed smart contract. We evaluated our rules on CoCoME and other MVC applications, and all code ran correctly and passed unit tests.
Su‐Juan Qin, Zhao Liu, Feixiang Ren, Chong Hui Tan
Ethereum is currently one of the most popular blockchain platforms. Smart contracts are an important part of blockchain. Because developers lack understanding of contract security and the huge value of contracts themselves, contracts are often attacked. Therefore, how to effectively detect smart contract vulnerabilities has become a crucial issue. This paper uses deep learning to detect vulnerabilities, which can get rid of dependence on expert experience. In order to solve the problem of poor detection effect caused by excessive noise, this paper proposes a vulnerability detection technology based on critical combination path and deep learning. The critical combination path only contains code related to vulnerabilities, eliminating many invalid codes, thus greatly reducing the impact of noise. At the same time, by analyzing the characteristics of assembly code, a normalization method is proposed to remove many homogeneous codes. The normalized critical combination paths are then vectorized using SimHash, and then converted to grayscale images for classification using a neural network. The experimental results show that the proposed scheme is effective.
Network slicing has gained popularity as a result of the advances in the fifth generation (5G) mobile network. Network slicing facilitates the support of different service types with varying requirements, which brings into light the slicing-aware next generation mobile network architecture. While allowing resource sharing among multiple stakeholders, there is a long list of administrative negotiations among parties that have not established mutual trust. Distributed ledger technology may be a solution to mitigate the above issues by taking its decentralized yet immutable and auditable ledger, which may help to ease administrative negotiations and build mutual trust among multi-stakeholders. There have been many research interests in this direction which focus on handling various problems in network slicing. This paper aims at constructing this area of knowledge by introducing network slice from a standardization point of view to start with, and presenting security, privacy, and trust challenges of network slicing in 5G and beyond networks. Furthermore, this paper covers distributed ledger technologies basics and related approaches that tackle security, privacy, and trust threats in network slicing for 5G and beyond networks. The various proposals proposed in the literature are compared and presented. Lastly, limitations of current work and open challenges are illustrated as well.
In 2016, the famous attack on the smart contract named The DAO led to a financial loss of 60 million dollars. Since then, attacks on smart contracts have increased. Thus, the security issue of smart contracts has attracted more and more attention from the community, putting pressure on developers to discover security issues in smart contracts before deploying them. To address this problem, many researchers have developed smart contract analyzers to early detect potential vulnerabilities. However, a common problem with these tools is a large number of alarms with a high false positive rate. Consequently, developers need to spend much time and effort investigating the alarms which are falsely detected as vulnerable. In this paper, we propose SCAR, a novel approach to prioritize the alarms of static analysis tools. Based on the intuition that alarms with similar contexts tend to have the same labels (true positive or false positive), SCAR is built with two deep learning models to capture the patterns associated with the contexts of the labeled alarms. After that, for new alarms, SCAR calculates their likelihood to be true positives and ranks them according to the predicted scores. SCAR is evaluated on a large data set of 14,184 alarms from 47,518 realworld smart contracts. The results show that the programmers can productively find up to two-thirds of the actual vulnerabilities by investigating only 20% of the ranked alarms.
Qifan Yu, Pengcheng Zhang, Hai Dong, Yan Xiao · 5 authors
Ethereum smart contracts face serious security problems, which not only cause huge economic losses, but also destroy the Ethereum credit system. To solve this problem, code obfuscation techniques are applied to smart contracts to improve their complexity and security. However, the current source code obfuscation methods have insufficient anti-decompilation ability. Therefore, we propose a novel bytecode obfuscation approach called BOSC based on four kinds of bytecode obfuscation techniques, which is directed at solidity. The experimental results show that, after the bytecode obfuscation, the failure rate of decompilation tools is over 99% and only a small amount of gas is consumed.
Decentralized cryptocurrencies are influential smart contract applications in the blockchain, drawing interest from industry and academia. The capacity to govern and manage token behavior provided by the token smart contract adds to thriving decentralized applications. However, token smart contracts face security challenges in technology weakness and manipulation risks. In this work, we briefly describe the manipulation risk and propose TokenAuditor, a fuzzing framework detecting those risks in token smart contracts. TokenAuditor constructs basic blocks based on the contract bytecodes and adopts the rarity selection and mutation strategy to generate test cases. The main idea is to select the test cases that have hit rare basic blocks since the fuzzing started as candidates and perform mutation operations on them. In our evaluation, TokenAudiotr discovered 664 manipulation risks of four types in 4021 real-world token contracts.
Shunhui Ji, Shaoqing Zhu, Pengcheng Zhang, Hai Dong
With the widespread use of smart contracts, security incidents caused by improper programming have drawn increasing attention. Data flow correctness is a fundamental and vital requirement for smart contracts. Although test cases generated by existing approaches for data flow testing of smart contracts can achieve certain coverage, not all def-use (definitionuse) pairs are covered, which may result in some errors not being detected. To further improve the adequacy and efficiency of testing, we present an approach named TCG-Re (T est C ase G eneration Combined with Data Flow R eduction) to generate test cases for data flow testing of smart contracts. Data flow reduction is performed to reduce redundant def-use pairs and obtain the final test requirements in a smart contract. The test case generation process is optimized to improve the coverage of the generated test cases for the def-use pairs. We collect 30 smart contracts of different scales to perform experimental evaluation. The result shows that, compared with other existing approaches, TCG-Re can not only achieve full coverage for most contracts, but also be more efficient. In addition, TCG-Re is also effective for discovering several types of errors in smart contracts.
LI Wen-yin, Meng Wang, Bin Yu, Yuhang Shi · 6 authors
As one of the representative Delegated Proof-of-Stake (DPoS) blockchain platforms, EOSIO blockchain platform is developing rapidly in recent years due to its excellent features, such as the scalability of transaction speed and support for smart contracts and decentralized applications. However, vulnerabilities in EOSIO smart contracts have caused serious economic losses and moreover vulnerability detection tools for EOSIO contracts are limited. To overcome the above shortcomings, we implement a grey-box fuzzer called GFuzzer based on WebAssembly for smart contracts on the EOSIO platform considering that EOSIO contracts are not open-sourced. In order to generate more test cases for branches that are difficult to cover, GFuzzer selects test cases with the minimum distance to explore uncovered branches for mutation. We evaluate GFuzzer on 3963 real-world smart contracts and the experimental results show that GFuzzer can detect more vulnerabilities in EOSIO contracts than the existing tools EOSFuzzer and EVulHunter, and is efficient in achieving high branch coverage during vulnerability detection.
Due to the surging popularity of various cryptocurrencies in recent years, a large number of browser extensions have been developed as portals to access relevant services, such as cryptocurrency exchanges and wallets. This has stimulated a wild growth of cryptocurrency themed malicious extensions that cause heavy financial losses to the users and legitimate service providers. They have shown their capability of evading the stringent vetting processes of the extension stores, highlighting a lack of understanding of this emerging type of malware in our community. In this work, we conduct the first systematic study to identify and characterize cryptocurrency-themed malicious extensions. We monitor seven official and third-party extension distribution venues for 18 months (December 2020 to June 2022) and have collected around 3600 unique cryptocurrency-themed extensions. Leveraging a hybrid analysis, we have identified 186 malicious extensions that belong to five categories. We then characterize those extensions from various perspectives including their distribution channels, life cycles, developers, illicit behaviors, and illegal gains. Our work unveils the status quo of the cryptocurrency-themed malicious extensions and reveals their disguises and programmatic features on which detection techniques can be based. Our work serves as a warning to extension users, and an appeal to extension store operators to enact dedicated countermeasures. To facilitate future research in this area, we release our dataset of the identified malicious extensions and open-source our analyzer.
Du Jinhu, Song Huang, Xingya Wang, Changyou Zheng · 5 authors
An Ethereum smart contract is an agreement reached by multiple parties, which is guaranteed by blockchain technology to be executed in accordance with the terms expressed in the form of code. Its security needs are particularly prominent due to a large number of digital assets under management. Testing is an effective way to find flaws that threaten the security of smart contracts. However, current smart contract test case generation methods do not regard the impact of other functions in the smart contract on state variables, resulting in the inaccessibility of the control statements related to state variables and low branch coverage of the function under test. To alleviate this problem, this paper proposes SV-Gen. SV-Gen generates test cases for smart contracts through two steps: static analysis and dynamic search. In the first step, SV-Gen considers the read-write relationship between functions and state variables in the smart contract to generate a function invocation sequence for the function to be tested through a backtracking algorithm on state variables. Then the arguments of transactions to invoke each function in the sequence are generated through regex matching to form the primitive test case. In the second step, the primitive test cases constitute an initial population, and a genetic algorithm undertakes the task of evolving them to high branch coverage. The experimental results on one of the VeriSmart datasets show that SV-Gen can effectively enter the control constraints related to state variables and improve the branch coverage of smart contracts.
Recently, the Internet of Things (IoT) has gained tremendous popularity in several realms such as smart cities, healthcare, industrial automation, etc. IoT networks are increasing rapidly, containing heterogeneous devices that offer easy and user-friendly services via the internet. With the big shift to IoT technology, the security of IoT networks has become a primary concern, especially with the lack of intrinsic security mechanisms regarding the limited capabilities of IoT devices. Therefore, many studies have been interested in enhancing the security of IoT networks. IoT networks need a scalable, decentralized, and adaptive defense system. Although the area of development provides advanced security solutions using AI and Blockchain, there is no systematic and comprehensive study talking about the convergence between AI and Blockchain to secure IoT networks. In this paper, we focus on reviewing and comparing recent studies that have been proposed for detecting cybersecurity attacks in IoT environments. This paper address three research questions and highlights the research gaps and future directions. This paper aims to increase the knowledge base for enhancing IoT security, recommend future research, and suggest directions for future research.
The Internet of Things (IoT) is a network of sensors that helps collect data 24/7 without human intervention. However, the network may suffer from problems such as the low battery, heterogeneity, and connectivity issues due to the lack of standards. Even though these problems can cause several performance hiccups, security issues need immediate attention because hackers access vital personal and financial information and then misuse it. These security issues can allow hackers to hijack IoT devices and then use them to establish a Botnet to launch a Distributed Denial of Service (DDoS) attack. Blockchain technology can provide security to IoT devices by providing secure authentication using public keys. Similarly, Smart Contracts (SCs) can improve the performance of the IoT–blockchain network through automation. However, surveyed work shows that the blockchain and SCs do not provide foolproof security; sometimes, attackers defeat these security mechanisms and initiate DDoS attacks. Thus, developers and security software engineers must be aware of different techniques to detect DDoS attacks. In this survey paper, we highlight different techniques to detect DDoS attacks. The novelty of our work is to classify the DDoS detection techniques according to blockchain technology. As a result, researchers can enhance their systems by using blockchain-based support for detecting threats. In addition, we provide general information about the studied systems and their workings. However, we cannot neglect the recent surveys. To that end, we compare the state-of-the-art DDoS surveys based on their data collection techniques and the discussed DDoS attacks on the IoT subsystems. The study of different IoT subsystems tells us that DDoS attacks also impact other computing systems, such as SCs, networking devices, and power grids. Hence, our work briefly describes DDoS attacks and their impacts on the above subsystems and IoT. For instance, due to DDoS attacks, the targeted computing systems suffer delays which cause tremendous financial and utility losses to the subscribers. Hence, we discuss the impacts of DDoS attacks in the context of associated systems. Finally, we discuss Machine-Learning algorithms, performance metrics, and the underlying technology of IoT systems so that the readers can grasp the detection techniques and the attack vectors. Moreover, associated systems such as Software-Defined Networking (SDN) and Field-Programmable Gate Arrays (FPGA) are a source of good security enhancement for IoT Networks. Thus, we include a detailed discussion of future development encompassing all major IoT subsystems.
Bello Musa Yakubu, Majid Iqbal Khan, Pattarasinee Bhattarakosol
The dynamic host configuration protocol (DHCP) servers are forms of an Internet of Things (IoT) address management server (IoTAMS) that gives network configuration settings to newly connected hosts. Administrators of a network may save time by setting DHCP servers instead of every network node. However, the absence of a more robust authentication method for DHCP servers makes hosts susceptible to attacks since neither the server nor the users are able to check the other’s authenticity during DHCP connections. These concerns result in both internal and external threats to the system that have the potential to impair network services. Among these threats are malicious DHCP servers and DHCP starvation. This paper aims to provide a novel approach for tackling these issues and protect the DHCP protocol. The proposed model uses the Diffie–Hellman key exchange mechanism, the elliptic curve discrete logarithm problem (ECDLP), a one-way hash function, blockchain technology, and a smart contract. In addition, registration and validation processes provide support for the proposed model in combating DHCP risks for both internal and external system threats. Results from this study show that the proposed model has an average of 21.1% more resistance to a growing number of adversaries than the benchmark models, thus revealing that the model is better suited for the security of IoT address management servers in smart homes, thereby enhancing resilience against related threats and the success of IP address management.
Youwei Huang, Sen Fang, Li, Jianwen, Hu, Bin · 5 authors
Smart contracts on the blockchain offer decentralized financial services but often lack robust security measures, leading to significant economic losses. While substantial research has focused on identifying vulnerabilities in smart contracts, a notable gap remains in evaluating the malicious intent behind their development. To address this, we introduce \textsc{SmartIntentNN} (Smart Contract Intent Neural Network), a deep learning-based tool designed to automate the detection of developers' intent in smart contracts. Our approach integrates a Universal Sentence Encoder for contextual representation of smart contract code, employs a K-means clustering algorithm to highlight intent-related code features, and utilizes a bidirectional LSTM-based multi-label classification network to predict ten distinct categories of unsafe intent. Evaluations on 10,000 real-world smart contracts demonstrate that \textsc{SmartIntentNN} surpasses all baselines, achieving an F1-score of 0.8633. A demo video is available at \url{https://youtu.be/otT0fDYjwK8}.
Malware detection approaches have been extensively studied for traditional software systems. However, the development of blockchain technology has promoted the birth of a new type of software system–decentralized applications. Composed of smart contracts, a type of application that implements the Ponzi scheme logic (called smart Ponzi schemes) has caused irreversible loss and hindered the development of blockchain technology. These smart contracts generally had a short life but involved a large amount of money. Whereas identification of these Ponzi schemes before causing financial loss has been significantly important, existing methods suffer from three main deficiencies, i.e., the insufficient dataset, the reliance on the transaction records, and the low accuracy. In this study, we first build a larger dataset. Then, a large number of features from multiple views, including bytecode, semantic, and developers, are extracted. These features are independent of the transaction records. Furthermore, we leveraged machine learning methods to build our identification model, i.e., Mul ti-view Cas cade Ensemble model (MulCas). The experiment results show that MulCas can achieve higher performance and robustness in the scope of our dataset. Most importantly, the proposed method can identify smart Ponzi scheme at the creation time.
Youwei Huang, Sen Fang, Jianwen Li, Bin Hu · 6 authors
In recent years, research in software security has concentrated on identifying vulnerabilities in smart contracts to prevent significant losses of crypto assets on blockchains. Despite early successes in this area, detecting developers' intents in smart contracts has become a more pressing issue, as malicious intents have caused substantial financial losses. Unfortunately, existing research lacks effective methods for detecting development intents in smart contracts. To address this gap, we propose \textsc{SmartIntentNN} (Smart Contract Intent Neural Network), a deep learning model designed to automatically detect development intents in smart contracts. \textsc{SmartIntentNN} leverages a pre-trained sentence encoder to generate contextual representations of smart contracts, employs a K-means clustering model to identify and highlight prominent intent features, and utilizes a bidirectional LSTM-based deep neural network for multi-label classification. We trained and evaluated \textsc{SmartIntentNN} on a dataset containing over 40,000 real-world smart contracts, employing self-comparison baselines in our experimental setup. The results show that \textsc{SmartIntentNN} achieves an F1-score of 0.8633 in identifying intents across 10 distinct categories, outperforming all baselines and addressing the gap in smart contract detection by incorporating intent analysis.