PDF files can contains malicious JavaScript , open actions & etc. But what about djvu files ? If djvu can be malicious, then how to detect that manually (without opening malicious file of course)?
3 Answers
Yes, a DjVu file can be dangerous. While, as others have mentioned, it is designed not to have any executable code, a vulnerability in a DjVu parser can be used to exploit the viewer. Many viewers use the same library, making a vulnerability in a single library relevant to large number of viewers. A historical example is CVE-2012-6535, which affected the popular DjVuLibre library, used by many document viewers. The vulnerability, as reported by Microsoft, was a memory corruption bug that allowed for code execution. The CVE details page gives some general information about its impact:
DjVuLibre before 3.5.25.3, as used in Evince, Sumatra PDF Reader, VuDroid, and other products, allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted DjVu (aka .djv) file.
Unfortunately, it is not possible to manually detect a malicious file of this sort. They do not necessarily contain any tell-tale signs such as visible embedded scripts or suspicious strings, and antivirus will rarely be able to detect them. In fact, they usually skip files that are not executable.
This is not at all specific to DjVu. Any file format can be exploited, even ones you don't expect. The best way to reduce the risk of exploitation is to ensure all your software is up to date, so any discovered vulnerabilities are promptly fixed before they can be widely exploited.
- 66,706
- 20
- 212
- 270
By design a djvu file can not contain executable code or scripts. Still, it is possible that an attacker would provide a specially manipulated file which will normally make your viewer to crash. Instead of crashing, if your data execution bit protection is set to off, it is possible to execute code in user space of your user. This is a difficult attack, given the variety of djvu viewers, the attack being usually specific to one version of one viewer.
Any file can be malicious. It's hard to detect it manually as the only thing it may contain is the shellcode. You can run unix strings command on it to see if it contains any malicious URLs or other suspicious strings like paths to windows files.
To lower your chances of exploitation, do not open this file in web browsers nor in the microsoft office suite.
- 2,731
- 1
- 12
- 19
-
Actually opening the file in web browsers is likely safer, as some browsers have very safe sandboxes built in. – forest Jan 28 '18 at 22:23
-
-
ActiveX isn't sandboxed, is it? I was talking more about things like Chrome, not the least secure plugin in one of the least secure browsers. – forest Jan 29 '18 at 23:38
What you say is true, but unrelated to the djvu as being of higher abstraction.
– Feb 02 '18 at 20:12