# AgriSecure: A Fog Computing-Based Security Framework for Agriculture 4.0 via Blockchain
## 3 Agriculture 4.0 Security Threats in Multi-Layered Paradigm
### Security Risks at Network Layer  
The objective of this layer is to send the generated data by the sensors from the physical layer to the most trustable computational unit, which is the cloud. The most common attacks, which affect the resources used in the network layer, are focused on [58; 59]. The security risks in network layers are:  
Distributed Denial of Service (DDoS): It attempts to affect access to service providers by overburdening the communication link or manipulating protocol flaws, which cause resources, such as CPU and memory collapse [60].  
Due to resource exhaustion brought on by a DDoS attack, the victim server is forced to block connections from new reliable clients. The victim server's buffer capacity or bandwidth may have reached its limit of resources. The overall probability of resource scarcity at the target end is provided by Equation (1) [15].  
\[P_{Attack}=1-(1-P_{Bandwidth})\big{(}1-P_{memory}\big{)} \tag{1}\]  
where,  
\(P_{Attack}\): Probability of total attack,  
\(P_{Bandwidth}\): Probability of Consumption of bandwidth  
\(P_{memory}\): Probability of Consumption of memory  
Attacks on Data Transit: These types of attacks aim to retrieve information shared between network devices in order to obtain confidential information [61]. An adversary could intercept traffic via malicious routers or man-in-the-middle attacks [62]. Interception of traffic reveals confidential data such as private keys, access credentials, or digital signatures.  
Attacks on Routers: They plan to change network routes in order to gain traffic control. Inimical nodes in IoT networks might attempt to reroute communicating paths during theprocess of transmission. As a result of attacks, the receiver might receive information lately, partially, or incorrectly, or not at all [63; 64].  
Malware Injection Attacks: The malware injection attack [34], in which malware is injected by an attacker into a connected computing device. This is a very common attack on smart farming. Malware is a very significant threat in distributed projects because it automatically spreads through the system, making it an appealing target for intruders. Malware damage comes in multiple varieties of sizes. Malware can steal data about farm material usage, buying information for fruits, vegetables, and farm animals, data about farm equipment, and so on. It could hire automated devices to form a botnet that would be used to commit harmful attacks under the influence of an intruder.  
Botnet: At each architectural layer of the precision farming system, there are numerous IoT devices. These machines are vulnerable to attack and could be taken over by a centralized malicious system. This results in a 'Botnet of Things' (BoT) [35]. A mutant farm workforce IoT equipment that is already infected [36] is easily used to infect other networks via various communication links, and thus automated farming could become an internet of destructibility for cyber illegitimates. The security features are not added in many of the Precision agriculture devices, but still, they are used frequently for establishing adequate data security defensive system frameworks.