## 2 Related Works  
In this section, we discuss some of the interesting research that has addressed the cybersecurity of UAVs and their communication networks. In [5], the authors applied machine learning models for vulnerability and cyberattack detection. However, this work does not provide any analytical mechanism that can infer the root cause of such kinds of cyberattacks. A convolutional neural network (CNN)-based UAV attitude estimation mechanism was proposed in [6]. However, the authors did not consider cyberattacks on a UAV's attitude control that are caused by jamming or spoofing. Recently, in [8], the authors provided a gap analysis for the security flow of UAV networks. This work does not provide any technical presentation that can reduce the security gap in UAV communication systems. The authors in [16] investigated UAV cyberattacks on a very small scale, such as attack vectors, two jamming and four spoofing attacks, and two communication and two data stream assaults. Here, they prioritized GPS jamming and spoofing over communication and data stream attacks. However, this work concentrated on combating GPS jamming and spoofing by overlooking the attacks on data and control systems. In our work, we are conducting research with an emphasis on attacks on the attitude control system by jamming and spoofing. In [7], the authors pointed out the vulnerability of cybersecurity threats in long-range UAVs in dangerous areas. Numerous threats were discussed, including the possibilities of attacks on ground stations, GPS spoofing and jamming, Wi-Fi attacks, poisoning cellular networks with Denial of Service (DoS), jamming and spoofing, and adversarial attacks in UAV communications. However, they did not give any strong solution to saving long-range UAVs from jamming and spoofing. Rather, they focused on examining the details of security analysis in ground stations. The main aim of the jamming attack is to inhibit communication in the transmission process by interfering with the ability to receive signals [17; 18]. Moreover, following a pattern of continuous radio signal transmission, a jamming model randomly switches between those signals so they can form a mimic model, which is a reactive jammer model that can predict the control of a hacker manipulating the trajectory of a UAV by obtaining information on collision avoidance features. In [19], the authors inspected jamming attacks on sensor networks and how to tackle these attacks. The authors of [19] also showed various attack planning that can be harmful to sensor networks, and after that, they presented two strategies for detecting these attacks. However, they completely ignored that possible attacks on UAVs can be against the attitude sensor system or received signal strength indicator which, in our paper, we will address with our framework. In [20], the authors investigated how a GPS spoofing fault detector can be used in real time to prevent a UAV from being driven to a harmful destination. A simulator, UAVsim, was used for detection of spoofing and jamming attacks in [21]. In our work, we build an analytical framework which can detect an attack on the switching states' received signal strength indicator. The work in [22] presented behavior-rule-based UAV intrusion detection system (IDS) (BRUIDS). In particular, their BRUIDS are capable of detecting intrusions by triggering based on the specifications of the IDS if the UAV is misdirected due to GPS spoofing. Even though these IDSs operate well in attack responses, the boundaries on the control system and the surrounding limits prevent IDS use in UAVs. In [23], the author proposed a classifier framework for identifying intrusions that can attack UAVs. However, this framework, which they named the one-class classifier, needs flight log data for training that must be non-anomalous. The authors used methods such as an SVM, autoencoder neural network, and local outlier factor classifier. In addition, using these models, they found the autoencoder neural network to be promising for GPS spoofing detection.