At this week’s Black Hat hacker conference in Las Vegas, cybersecurity researchers showed how drones can help secure wireless networks but also how the flying gadgets can be used in attacks.

The drones have arrived. They’re flying over parks, neighborhoods, and occasionally crashing near the White House lawn.

And as the number of commercial drones is expected to top 7 million by 2020, researchers are working quickly to build new defenses against the potential misuse of unmanned aerial vehicles – and trying to figure out how the flying gadgets can actually bolster cybersecurity.

“Drone tech has been advancing rapidly,” said David Latimer, an analyst at the cybersecurity firm Bishop Fox. “It’s a lot of fun and very exciting, but it’s also the next step for security research.”