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

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Matthew Stivala

HP OfficeJet 250 Mobile Printer

The HP OfficeJet 250 Mobile Printer is a great device that fits perfectly into my fast paced and mobile lifestyle. My first impression of the printer itself was how incredibly compact and sleek the device was.

Armand Abogado

HP OfficeJet 250 Mobile Printer

Wireless printing from my iPhone was also a handy feature, the whole experience was quick and seamless with no setup requirements - accessed through the default iOS printing menu options.

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?