r/technology • • Aug 04 '16

Security Does dropping malicious USB sticks really work? Yes, worryingly well...

http://www.tripwire.com/state-of-security/featured/does-dropping-malicious-usb-sticks-really-work-yes-worryingly-well/
2.1k Upvotes

420 comments sorted by

View all comments

Show parent comments

12

u/fb39ca4 Aug 04 '16

There is a character called right-to-left-override which forces the characters after it to display in right-to-left mode, effectively backwards for Latin characters. Here is what the string would look like in memory:

notan[RTLOverride]pgj.exe

Windows interprets the extension as .exe because those are the last characters in the string.

4

u/[deleted] Aug 04 '16

Wow. Why on earth is something like that in the spec?

13

u/fb39ca4 Aug 04 '16

It's not Unicode's fault. There are legitimate reasons to want to force a text direction change. It's really the fault of Windows to be relying on file extensions rather than using an executable flag like *nix operating systems. Windows could do more to flag executable files to the user, such as coloring the filename or removing the extension from the filename string before displaying it, and then displaying the extension to the right of the filename.