With the advancement of blockchain technology, and the proliferation of Internet of things (IoT)-driven devices, the blockchain-IoT applications is changing the perception and working infrastructure of smart networks. Blockchain supports decentralized architecture and provides secure management, authentication, and access to IoT systems by deploying smart contracts provided by Ethereum. The growing demand and expansion of blockchain-IoT systems is generating large volume of sensitive data. Moreover, distributed denial-of-service (DDoS) attacks are the most challenging threats to smart contracts in blockchain-IoT systems. The 2016 decentralized autonomous organization and 2017 parity wallet attacks exposed the critical fault-lines among Ethereum smart contracts. Currently, there is no security mechanism available for smart contracts after its deployment in blockchain-IoT systems. In order to address these challenges, first we use two artificial intelligence techniques, random forest (RF) and XGBoost that gives full autonomy in decision making capabilities in the proposed security framework. Second, for data load balancing and distributed file storage of IoT data, interplanetary file system is suggested.Finally, we are the first to propose a distributed framework based on fog computing to detect DDoS attacks in smart contracts. The performance of the detection system is evaluated using actual IoT dataset, namely, BoT-IoT. The proposed system is evaluated in terms of accuracy (AC), detection rate (DR), and false alarm rate (FAR). The results confirms the superiority of the proposed framework over some of the recent state-of-art techniques in detecting rare attacks. The proposed framework has achieved DR up to 99.99% using RF by using 10 features of BoT-IoT dataset.
INTRODUCTIONInternet of things (IoT) and blockchain are the two emerging technologies, that has revolutionized the world and made human life more meaningful and productive. IoT is a network of smart devices and sensors that exchange information over the Internet. 1 The applications of IoT are involved in various domain such as smart city, smart home, supply chain system, intelligent transportation system, earthquake detection, agriculture, hospital, a smart grid system, and so on. 2