## 3 Prototype Description and Implementation
### Security Threat Analysis
These agents are (a) the UAV that is used in this proposal for data collection and transmission on the one hand (specifically, images and videos) and surveillance and monitoring flights on the other hand (that, as has been previously mentioned, can be either guided with an operator or autonomous), (b) the CGS (which in the deployment that has been developed for the manuscript is a laptop with all the required hardware and software components) and (c) the IPFS network that will be used to share the information and, by doing so, providing security-related features. It must be noted that the laptop used as CGS will also have an IPFS node running with it, so it will be used for both purposes at the same time. Once the hardware-based agents that make the deployment have been described, attention must be put on the boundaries among them so that limits among the components will define what kind of weaknesses can be exploited. There are two boundaries to consider in this case, as they are separating the three agents previously mentioned:  
1. The one between the IPFS network and the CGS. It separates the IPFS nodes which, in the end, are also based on hardware elements, from the CGS elements used to upload missions to the UAV and/or control it during flights. It must be noted that, due to the dual nature of the hardware used in the deployment, the boundary that separates both parts of the deployment effectively goes through the hardware use for CGS and IPFS network. 2. The one between the CGS and the UAV. These two elements are separate entities that will communicate through the wireless 802.11 ac protocol, so that boundary separating the agent and the data traffic that goes through it must be born in mind. Unlike the previous one, the boundaries between these agents are physical and create a separation between the hardware elements of the system. 3. In addition to this, the blockchain network must be included in the security solution to be designed. The presence of such a subsystem proves to be an asset, as it is possible to share the data about the different pieces of information that have been added to the IPFS files included as part of the testing activities with an additional level of security derived from the hash outputs used to characterize each block (since PoW is being used as the consensus algorithm, any tried alteration will demand changing not only the hash output of the block where data is tried to be modified, but also the ones from any other block mined afterwards, requiring an amount of computational power hard to have by any regular user). Finally, the data storage adds another infrastructure element that will have to be taken care of, as the information obtained (that, as mentioned before, will consist mainly of the pictures and videos collected by the camera installed in the UAV). All these considerations have been included in Figure 8. It encases in a graphical way the security threat analysis that has been done to be aware of the potential vulnerabilities or possibilities for an attacker to get into the system. It can be seen how two different boundaries have been set in the system that separate the three domains created by the subsystems:  
1. The UAV subsystem faces threats related to UAV data tampering and UAV hijacking, which will either result in false data being transferred or damaging and/or losing the UAV. The UAV makes use of a wireless interface that is used in this context to send commands from the CGS and acknowledge their reception from the UAV back to the CGS, so security measures must be taken in the wireless interface
2. The CGS has two network data ports that, since they are used for receiving and transmitting data, can be exploited by a spurious party to enter the system. One port is the wireless interface that connects to the UAV, whereas the other is connected to the TCP/IP network that is used to connect the IPFS/blockchain capabilities that the CGS has as a node from these networks to its other distributed peers. 3.