The proliferation of privately-owned Unmanned Aerial Vehicles (UAVs) and the associated potential risks they pose to personal privacy and safe navigation has highlighted the need for an effective system to test UAV cyber security vulnerabilities and develop effective countermeasures. Towards those ends, we present a novel, customizable, and a universal UAV simulation environment utilizing an open-source Linux-based virtual machines (VM) for modeling cyber-attacks and defenses against ArudoPilot-MavLink-based fixed-wing and rotary-wing UAVs. To demonstrate the effectiveness of this simulation environment, the percentage of successful man-in-the-middle and re-broadcasting attacks conducted by a Kali Linux VM’s against a stock ArduPilot UAV were examined. Additionally, the simulation environment was used to develop and test a unique defensive system based on an external SNORT intrusion detection system (IDS) to monitor communications between the simulated UAV and ground control system (GCS). Upon intrusion detection, this system automatically executed pre-planned countermeasures to defeat potential threats. The effectiveness of this system was evaluated based on the reduction of successful cyber-attacks and vulnerabilities and developing effective countermeasures without the time and cost required for physical prototyping using actual UAV assets was effectively demonstrated.