# Internet of Things and Blockchain Integration: Security, Privacy, Technical, and Design Challenges
## 3 RQ 1 and RQ 2--Current Challenges and Recommendations to Enhance BIoT Integration
### BC-Based Security Issues
#### 3.1.5 Vulnerabilities  
Mining vulnerabilities: The integration of BC with IoT is exposed to miners' attacks. These attackers' miners may control the BC if they dominated the power of the consensus mechanism [85]. The attacker (miner) keeps the mined blocks in a private branch instead of broadcasting them until it becomes longer than the public chain and then releases them once to force the BC to change the public chain and gain the rewards of this process [18, 112]. This kind of attack will cause a waste of resources and may affect the performance of the fog network that uses BC [122, 157]. BIoT applications that use smart contracts are exposed to certain types of software vulnerabilities which can be used by attackers to harm the architecture [34, 50, 74]. Attacks: Although using BC technology enhances the security of IoT applications, BIoT integration is still exposed to certain types of security vulnerabilities. BIoT applications are open to the application-dependent and application-free of attacks [36]. BioT is exposed to the majority attack (also called 51% attack) which will cause the availability to be controlled by the attackers (e.g., Ethereum and Bitcoin) [88; 158]. Several attacks have been identified in the literature and are explained as follows:  
1. The DDoS attack can abuse the process of authentication and trust by harming the system with an out-of-control number of requests to update and insert new records [4]. Latency and, in some cases, the use of low-performance devices in the BIoT applications will make this architecture exposed to race attacks [85]. 2. The smart contract attack occurs when a customer uses the same cryptocurrency for several transactions. In a PoW-based BC, this type of attack is particularly simple to execute since the attacker may take advantage of the interval between the commencement and confirmation of two transactions to start an attack rapidly [88]. 3. Border gateway mechanism (BGP) hijacking is another attack. BGP is a de facto directing mechanism that controls the delivery of IP packets to their final terminus. Attackers either use or modify BGP routing to intercept BC's network traffic [88]. Because of the extreme concentration of some Bitcoin mining pools, BGP hijacking will have a significant impact if they are targeted. The attackers can essentially divide the Bitcoin network or slow down block propagation. 4. Manipulation attacks (i.e., unlawfully intercepting, modifying, or deleting sensitive data while they are being sent or stored) include four types: the eclipse, overlay, man-in-the-middle (MiTM), and tampering attack. (A) The attacker can use the eclipse attack to monopolize the target's outgoing and incoming networks, thereby separating the victim from the others in the network [88; 143]. The attacker can then alter the victim's awareness of the BC or allow the victim to leftover computational resources on outdated perceptions of the BC. In addition, the attacker can use the victim's computational capacity to carry out its harmful operations [10; 159]. (B) The overlay attack, which utilizes the receiver's public key, makes use of BC flaws to maliciously wrap an encrypted quantity to a novel transaction [10]. Addressing this attack can be achieved by verifying the timestamps. As a result, diverse inputs underneath the same dealer can be detected and linked to several transactions. (C) MiTM attacks take advantage of flaws such as private key leaks to spoof two parties' identities and surreptitiously interrupt and manipulate their communications. Some BC frameworks, including Ethereum and Bitcoin, are still vulnerable to this attack [10]. (D) In the tampering attack, the attackers try to change the signed transactions that are being distributed in the network, such as the addresses and other data, before propagating them to the P2P network for validation [10]. Bitcoin, Litecoin, and Monero are PoW cryptocurrency-based ledgers that are particularly vulnerable to this attack. 5.