## 3 Prototype Description and Implementation
### Security Threat Analysis
The IPFS/blockchain nodes represent a fully distributed network that operates under a peer-to-peer paradigm. Consequently, they are prone to cyberattacks typical of distributed systems, like the already explained DOS and DDOS, as well as any other attack that works by faking access credentials or tampering information files data into corrupting the content or showing something different from what was obtained from the UAV. Once all the agents present in the system have been described, along with their boundaries and what actions can be prone to having cyberattacks on them, a summary of these issues must be made. For that purpose, Table 7 shows the main security threats faced by the system developed and how they are tackled to avoid unwanted results. As it has been formulated, there are several security threats faced by the proposed framework. Nevertheless, it is also shown how these threats can be solved:  
1. Command monitoring: it refers to the capacity of a spurious third party to obtain information about the commands that are being sent to the UAV, or how information \begin{table}
\begin{tabular}{c c} \hline \hline
**Security Threat** & **Countermeasure** \\ \hline Command monitoring & Data encrypted by means of the wireless communication of choice \\ Command spoofing & Data encrypted by means of the wireless communication of choice \\ Denial of Service & Distributed data storage. Encrypted wireless communications. \\ Distributed Denial of Service & Distributed data storage. Encrypted wireless communications \\ Data Tampering & Distributed data storage \\ UAV hijacking & Secured wireless connection. Security in previous data flow stages \\ CGS credentials exposure & Credentials periodic update. Strengthening mechanisms for providing credentials \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Security threats in the system and how to counter them. Figure 8: Security threat analysis for the proposed system. is being downloaded for the participants in the system in case this spurious party can exploit it to its advantage. It is countered in the proposed system by using the encryption capabilities that the 802.11 ac network provides. 2. Command spoofing: it is referred to the capability of a spurious party to send commands to the UAV without any permission or notification, so that the UAV will perform the actions requested by the spurious party rather than the legitimate ones. The most significant threat about this attack is that the UAV is taken away by the spurious party. Fortunately, it can be countered with the encryption capabilities that are used in the 802.11 ac wireless protocol. 3. Denial of Service: in this case, the spurious party will prevent legitimate users from operating the UAV and/or retrieving the information (pictures and videos) collected by means of it. There are two ways that the proposed solution can be used to counter this threat. On the one hand, the wireless protocol used for communications makes use of encrypted capabilities that will enable a higher level of security to the system. On the other hand, having data stored in a decentralized manner will make possible that it is available even if one of the legitimate parties that is sharing it comes under attack. Such advantage is typical of distributed systems that enable data redundancy of some kind. 4. Distributed Denial of Service: its effects are the same as with the regular Denial of Service attack, but it is performed in a distributed, more sophisticated manner, as it is executed by a plethora of spurious parties (or a single one attacking from different machines) in a network. The countermeasures applied to the previous system are valid for this attack as well. 5. Data tampering: it refers to the possibility of altering the stored information about the livestock collected by the UAV and kept by the IPFS network that contains the blockchain files that store the information collected by the UAV used for monitoring purposes.