Pentagon-sponsored engineers have developed a system to shield unmanned aerial vehicles from cyber-attacks. It sounds the alert if a drone starts doing something that it is not supposed to do.

Called System-Aware Secure Sentinel, the new system detects “illogical behavior” compared to how the aircraft normally operates.

“Detections can serve to initiate automated recovery actions and alert operators of the attack,” said Barry Horowitz, a systems and information engineer at the University of Virginia in Charlottesville, in a statement.

Apparently, the system is meant to prevent embarrassing situations like the loss of a US spy drone in December 2011 to Iran. A CIA RQ-170 Sentinel drone was brought down after what the Iranians claimed to have been a hacker attack as it was flying in the country’s airspace.

READ MORE: Iran says it has finished decoding downed CIA drone

The Iranians said they used a technique called “spoofing” where they sent the drone the wrong coordinates and tricked it into believing it was landing at its home base in Afghanistan when in fact it was landing on Iranian territory.

Various threats were simulated by the researchers during five days of in-flight tests, including cyber-attacks launched from the ground, interference with supply chains and attacks from military insiders.

The attacks focused on four different areas, GPS data, location data, information about imagery, on-board surveillance and control of payloads and took place over five days. In each scenario the system was able to detect cyber-attacks, the team said.

"The inflight testing gauged the effectiveness of the countermeasure technology in hardening the unmanned system's cyber agility and resiliency under attack conditions," the researchers said.

The technology was developed with funds from the US Department of Defense. The project involved collaboration between the Georgia Institute of Technology and the University of Virginia.