Black Hat: How to make and deploy malicious USB keys

Spread them around public places and about half of them will get plugged into victim’s computers

USB keys were famously used as part of the Stuxnet attack on the Iranian nuclear program and for good reason: it’s got a high rate of effectiveness, according to a researcher at Black Hat 2016.

Of 297 keys spread around the University of Illinois Urbana Champaign 45% were not only plugged into victims’ computers but the victims then clicked on links in files that connected them to more malware, says Elie Burstzein, a Google researcher who presented the results.

+More on Network World: Black Hat: 9 free security tools for defense & attacking | Follow all the stories from Black Hat 2016 +

That rate was pretty constant regardless of where the keys were dropped and what they looked like, he says. Keys were left in parking lots, common rooms, hallways, lecture halls and on lawns. Some had no labels but others did that said confidential and exam answers. Some had metal door keys attached on a ring and some had door keys plus a tab with an address and phone number.

More than half of those that were opened were opened within the first 10 hours.

Twenty-one percent of those who plugged in the devices then took a survey to say why they did. Sixty-eight percent said they wanted to return the drives and 18% said they were just curious and the rest had various other reasons.

What were they curious about? Pictures were consistently popular at 33% to 45% depending on the type of key that was picked up. Resumes were about as popular as photos with a spike in interest to 53% for those keys that were unlabeled. Other documents not so much.

Burstzein says building the keys was not trivial. The team he worked with had to figure out how to make a device small enough to fit into a key case, create a mold for the case, pour the resin, figure out how to unmold it so it had a smooth look and trim it to appear professional. It took weeks to perfect the techniques. Each one cost about $40.

The team also spent a lot of time writing code for the keys that could figure out what operating system was running on the machine they were plugged into. One test was a shell script that tried to lock the scroll lock key. If it worked, it was a Windows machine.

It was difficult to test the timing between commands and know they were successfully executed so they used caps-lock toggling as an indicator. When a command was successful, it would toggle the switch as a feedback bit, he says.

The code used reverse shell to get thorough the firewalls, scripting language and obfuscation to avoid antivirus detection, used a payload that delivered a maximum 62.5 keystrokes per second and used metasploit to act as a command and control server.

Preventing USB key attacks isn’t easy. The best methods are to educate users not to plug them in, block their use altogether on machines or restricting use.

He’s posted a how-to on building the keys and the code to load on them.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags black hat

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Tim Greene

Network World
Show Comments

Brand Post

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Andrew Teoh

Brother MFC-L9570CDW Multifunction Printer

Touch screen visibility and operation was great and easy to navigate. Each menu and sub-menu was in an understandable order and category

Louise Coady

Brother MFC-L9570CDW Multifunction Printer

The printer was convenient, produced clear and vibrant images and was very easy to use

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?