mollwollfumble said:
Viruses and Trojan horses. What is and isn’t safe these days?
It used to be said that unix was safe from viruses, ditto files with suffix pdf and jpg. But that windows word and excel files, and html files were unsafe.
Since then, I’ve heard about a virus in unix (can’t remember who from) and the latest Cyberwars episode mentioned Trojan horses in pdf and jpg files. On the other hand, Excel file xlsx can’t contain macros, only xlsm can. Ditto docx and docm, perhaps word and excel are safe again.
I figured the following might be the case, but had never seen it stated. According to the following, extensions that appear to be harmless aren’t.
how-hackers-can-disguise-malicious-programs-with-fake-file-extensions
File extensions can be faked – that file with an .mp3 extension may actually be an executable program. Dubbed the “Unitrix” exploit by Avast after it was used by the Unitrix malware, this method takes advantage of a special character in Unicode to reverse the order of characters in a file name, hiding the dangerous file extension in the middle of the file name and placing a harmless-looking fake file extension near the end of the file name.
The Unicode character is U+202E: Right-to-Left Override, and it forces programs to display text in reverse order. While it’s obviously useful for some purposes, it probably shouldn’t be supported in file names. For example, a filename that appears as “Awesome Song uploaded by RCS.mp3”, a harmless mp3 file, may actually be “Awesome Song uploaded by 3pm.SCR”, a dangerous screensaver file.
The most common dangerous file extensions are .exe, .bat, .cmd, .com, .lnk, .pif, .scr, .vb, .vbe, .vbs, .wsh, .jar.
For risks specifically associated with .pdf files, see what-are-the-security-risks-associated-with-pdf-files
There is the general risk associated with any type of file: that whatever application is used to read it will have a bug that can be exploited by certain byte sequences within the file, thus executing arbitrary code. PDF files can contain javascript (JS), what risks does that pose? Or is it well locked down for all major PDF viewers/editors (Adobe Reader, PDF-XChange, Sumatra, Foxit, Nitro, as well as the internal viewers in Firefox and Chrome)?
One PDF-specific risk is that Adobe and third-party reader extensions are supported: your PDF viewer may have extra modules loaded, or may require them to open certain documents. Examples include: Adobe LiveCycle Rights Management ES4 and Time limited PDFs for which there are commercial products. PDFs can contain attachments, though not all readers support this. These can be any type of file. PDF security features such as no-copy, no-print, no-edit are not enforced by some viewers. Files can be simultaneously PDF, native binary executable, .jar and .html by using similar “slack” in those formats. External malware could then turn the pdf into a virus.