Malicious PDF File Doesn't Need a Software Vulnerability
A security researcher has found a way to run arbitrary code on Windows computers by embedding it in a malicious PDF file.
The code will run when viewed in two popular PDF reader applications, but the author of the hack says it doesn't exploit a software vulnerability.
PDF readers from Adobe Systems and Foxit don't allow embedded executables to run directly, wrote Didier Stevens on his security blog. But Stevens found a way to get an embedded executable to run via a different launch command.
Upon opening the rigged document, Adobe Reader will display a warning message saying that launching code could harm the computer, so a user would need to approve launching an application. But Stevens found he was able to change part of the message, which could be modified to persuade the user to open the executable.
In his example, Reader will launch a harmless calculator program, but that could be replaced with malicious software. Stevens' proof-of-concept code worked using Adobe Reader 9.3.1 on Windows XP SP3 and on Windows 7.
Foxit's PDF reader does not display a warning, but as the proof-of-concept code was originally written, the executable would not run, likely "due to some variation in the PDF language supported," Stevens wrote.
By Wednesday, Stevens had fixed that problem, which allows an executable to be launched in Foxit merely by opening the manipulated PDF.
Stevens has notified the two software companies.
"I've reported it to Foxit Software, and they told me they will issue a fix this week. I don't know what the fix will be, but I assume it will be a warning message, to be in line with the other PDF readers," Stevens said via e-mail.
Stevens hasn't released the proof-of-concept code, but it is possible that someone could figure it out.
However, "it's not easy. To give you an idea without getting too technical: it takes me 5 different steps to execute arbitrary code. The test PDF file I published on my blog contains just the first step," Stevens said.
Adobe could not be immediately reached for comment.