Industry News

Uh-oh. How just inserting a USB drive can pwn a Linux box

Remember the notorious Stuxnet worm?

It was a highly-sophisticated piece of malware – developed by the United States and Israeli intelligence – which targeted Iran’s Natanz uranium enrichment facility.

One of the things which made Stuxnet so notable was that it exploited a zero-day vulnerability in Windows, meaning that it could infect a Windows computer (even with Windows AutoRun and AutoPlay disabled) just by plugging in an infected USB stick.

The exploit was in how Microsoft Windows handled .LNK shortcut files, and meant that malicious code could be run on a computer without any user interaction – just inserting the thumb drive was enough.

Of course, this vulnerability was uncovered back in 2010. Nothing like that would ever happen these days… right?

Sadly for Linux users running the KDE Plasma desktop environment, they find themselves now facing a similar scenario. If anything it’s worse, according to a security advisory released late last week.

In short, if a USB memory stick is plugged into a vulnerable computer has a volume label containing the characters `` or $(), the text contained within the characters will be executed as shell commands.

Or, to put it another way, give a USB drive the volume name `rm -rf`, and hand it to a friend who runs KDE Plasma on their Linux box, and they won’t be your friend much longer.

Of course, this isn’t the sort of attack that could be conducted remotely. An attacker needs to have physical access to the vulnerable computer, or maybe sneakily leave it lying around in a car park in the hope that an unsuspecting user will plug it into their computer out of curiosity.

It’s easy to imagine how both malicious attackers and immature pranksters might attempt to abuse this flaw, so make sure that any vulnerable Linux computers under your control are properly protected.

KDE Plasma users are advised to update their systems as soon as possible to version 5.12.0 or later.

Astonishingly, in 2015 it was discovered that Microsoft’s 2010 attempt to patch the USB flaw had been insufficient, and so it had another go.

Let’s hope KDE Plasma has better luck than Microsoft.

About the author

Graham CLULEY

Graham Cluley is an award-winning security blogger, researcher and public speaker. He has been working in the computer security industry since the early 1990s, having been employed by companies such as Sophos, McAfee and Dr Solomon's. He has given talks about computer security for some of the world's largest companies, worked with law enforcement agencies on investigations into hacking groups, and regularly appears on TV and radio explaining computer security threats.

Graham Cluley was inducted into the InfoSecurity Europe Hall of Fame in 2011, and was given an honorary mention in the "10 Greatest Britons in IT History" for his contribution as a leading authority in internet security.

3 Comments

Click here to post a comment

  • The problem here is that in binary distributions you're at the mercy of when the update will be pushed. It's not a matter of just downloading Plasma itself in such an environment – unless you want to cause yourself a load of problems. That however doesn't mean that some distributions won't push a fix even if it's not the same version of Plasma (or whatever software). Of course rm -fr (equivalent to -rf) is definitely a scary one to imagine but I can think of a lot scarier ones than that, at least in theory.

    As for the advisory itself the word 'folder' makes me ill. Well not physically ill but I cringe when Unix (of any kind) users say 'folder' when they should be saying 'directory'. Not as bad as the arbitrary code execution, however…

  • `rm -rf`, LOL. Wow. Is there some kind of label/emoji bullsh*t we could label this as official d*ck move with? Some moron might actually do this to a future former friend.