In wireless networking, the security of flying ad hoc networks (FANETs) is a major issue, and the use of drones is growing every day. A distributed network is created by a drone network in which nodes can enter and exit the network at any time. Because malicious nodes generate bogus identifiers, FANET is unstable. In this research study, we proposed a threat detection method for detecting malicious nodes in the network. The proposed method is found to be most effective compared to other methods. Malicious nodes fill the network with false information, thereby reducing network performance. The secure ad hoc on-demand distance vector (AODV) that has been suggested algorithm is used for detecting and isolating a malicious node in FANET. In addition, because temporary flying nodes are vulnerable to attacks, trust models based on direct or indirect reliability similar to trusted neighbors have been incorporated to overcome the vulnerability of malicious/selfish harassment. A node belonging to the malicious node class is disconnected from the network and is not used to forward or forward another message. The FANET security performance is measured by throughput, packet loss and routing overhead with the conventional algorithms of AODV (TAODV) and reliable AODV secure AODV power consumption decreased by 16.5%, efficiency increased by 7.4%, and packet delivery rate decreased by 9.1% when compared to the second ranking method. Reduced packet losses and routing expenses by 9.4%. In general, the results demonstrate that, in terms of energy consumption, throughput, delivered packet rate, the number of lost packets, and routing overhead, the proposed secure AODV algorithm performs better than the most recent, cutting-edge algorithms.