Special software from DARPA could do the trick.
As more military weapons and vehicles become autonomous, the more at risk to cyber intrusions they will become. The Defense Advanced Research Projects Agency has developed the High-Assurance Cyber Military Systems program to create technology to secure those things that exist in the cyber and physical realms.
During a recent trial, HACMS software was deployed to protect an unmanned MH-6 Little Bird helicopter from a malware-based hack. The unmanned Little Bird is currently being developed for missions behind enemy lines and it runs on a small amount of code.
"Someone can walk up to the aircraft as a malicious maintainer and he could plug something into the aircraft while we're out on the ramp getting ready to launch," said Jason Graham, software lead of the unmanned Little Bird program at Boeing.
During a practice run of the HACMS program, a red team did just that and infected the helicopter with malware, using a mechanics thumb drive to attempt to kill the mission. Another team then deployed HACMS software to regain control.
To learn more about HACMS trial, check out the video below from DARPA: