New Method Could Hide Malware In PDFs, No Further Exploits Needed
Trailrunner7 writes "A security researcher has managed to create a proof-of-concept PDF file that executes an embedded executable without exploiting any other security vulnerabilities. The PDF hack, when combined with clever social engineering techniques, could potentially allow code execution attacks if a user simply opens a rigged PDF file. With Adobe Reader, the only thing preventing execution is a warning. Disabling JavaScript will not prevent this."
If only some great pdf/security teacher would take these poor code monkeys who have no future and teach them how to fix this.
We don't use the bloated Adobe viewer any more. There are several alternatives; we like this one.
That's a big red vulnerability named PDF.
There's no warning at all. It just runs.
Best Slashdot Co
Who the hell thought it was a good idea to have dynamic content in a document description language?
Notice you never hear about exploits-of-the-week like this for LaTeX !
"This cannot be patch because it isn't a vulnerability." Uhh yes it can, and sure it is. There are millions of bugs that were entirely by design and the designs adapted to eliminate them. I will grant that they might have to break the PDF spec' to fix it but frankly it is the right thing to do for everyone concerned.
You open the .pdf. On page 1 you see: "Hey you! Close this file, rename it to end with '.exe', and then double click it! There's, uh, boobs! Yeah lots of boobies."
Okay so that's not entirely accurate, and at least one .pdf reader requires no social engineering at all other than getting them to open the pdf itself. Why would you make it so that you can't (normally) embed executables in the .pdf, but then allow .pdfs to launch arbitrary commands?
The enemies of Democracy are
I'm willing to bet this concern isn't a Linux and/or BSD problem.
Poor Mac OS X and Linux users are left out again.
What happens on *nix versions of Adobe Reader - OS/X, Solaris, Linux, etc?
I don't understand how someone can say that it doesn't exploit a reader to operate. That implies that opening the file in, say, a text editor will somehow trigger the exploit. I find that claim highly dubious. What about a hex editor? Running 'cat'?
At some point, in order for the exploit to trigger, some executable must operate on the data enclosed in the file. It is therefore an exploit in an executable, and thus it is important to know which executables are vulnerable. Saying anything else is disingenuous and nothing but rampant fear mongering.
Culture is more than commerce
Explaination
Video
Demo PDF file (as .zip)
PDF apparently has (stupidly) a capability to launch an executable program which is run when the PDF file is opened. There's a warning message. All the exploit does is put in some text like "To view the encrypted message in this PDF document, select "Do not show this message again" and click the Open button." into the warning dialog box.
Incidentally, SumatraPDF doesn't do this, but that seems to be a bug; the test file produces "Synchronization file cannot be opened".
I find Adobe proprietary apps like pdf viewer and flash to be very annoying. I would love a nice rain to wash that mud away.
- Things are the way they are because they're coded that way -
Chrome integration of one buggy plugin deserves another, right?
I had it with PDF exploits a few weeks back, so decided to try evince.
Current version 2.28.0 on vista (yes i know) and doesn't seem vulnerable to the file on the linked site.
Someone else please confirm.
Oh and its free.
For 98% of people, Reader is unnecessary and just opens up a ton of security holes.
Easy replacement:
1) Install Google Chrome
2) Install this extension which opens up all PDFs in Google Docs.
3) Enjoy your new, safe browsing and PDF-viewing environment.
It means "exploit" a reader as in "take advantage of a bug in", not "make use of in any way". In other words, a perfectly coded pdf reader with zero bugs whatsoever would still be vulnerable. So the answer to which executables is "All of them" At least if they're implemented correctly, which is a very different circumstance than usual and worth making note of.
By your usage of exploit, then they'd have to say this: "This method exploits a PDF reader, a computer operating system, a computer, the electrical grid, the planet earth and its star, Sol, and the laws of physics."
Oh but it does make some difference which reader you are using. Some throw up a warning dialogue (whose content can apparently be controlled to an extent) and at least one doesn't. Foxit is apparently a reader you should avoid.
The enemies of Democracy are
If you're really a nerd, you'll want to scroll through the PDF Reference section 8.5 ("Actions"). Be careful though, as it may hurt a little.
Instead of simply jumping to a destination in the document, an annotation or outline item can specify an action (PDF 1.1) for the viewer application to perform, such as launching an application, playing a sound, or changing an annotation's appearance state. [...] In addition, the optional OpenAction entry in a document's catalog (Section 3.6.1, "Document Catalog") may specify an action to be performed when the document is opened.
It's actually very well-defined, and creating a document that implements this part of the specification should be trivial.
I was reading a technical forum (used by a few dozen people, I'm in a niche market) with Chrome, when a PDF popped up containing nonsense text.
Ofcourse I wasn't happy about it, so I contacted the owner of the site and scanned my laptop with McAfee's antivirus. Didn't find anything, but 2 weeks later I received a mail that my passwords had been reset for my own website because of suspicious activity. As it turned out, someone had installed a virus similar to the one that got me, on my contact page. Great.
This is with a laptop running Chrome, Windows Vista with UAC enabled, McAfee security suite. I didn't even get a warning.
I used Malwarebytes' Anti-malware to find and remove the stuff that got installed. At least, I'm hoping it got removed - but nothing is certain :P The strange thing is now, that when i need to access a fishy site I use Internet Explorer because it caught the drive-by download the next time I visited. Sort of a complete reversal of policy for me.
Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
Does anyone know if Sumatra PDF is vulnerable?
but it's a PDF...
Sumatra appears to not support this "feature". Windows only sadly.
But it is a likely choice for those who have the pdf creation software, are familiar with using it, and want the flexibility of a single form that can be: printed blank and filled out on paper; filled out on screen then printed; or filled out and submitted online.
This isn't new, hiding viruses in .pdf files have been going on for years, maybe even a full decade. I remember doing this with Subseven a long time ago. Nothing new.
So Sandboxie for my Web Browser and pdf files?
Okay. So the PDF standard has the potential for launching external (or even embedded) files. In Adobe Reader this will create a warning dialog with the following text: "The file and its viewer application are set to be launched by this PDF file. The file may contain programs, macros, or viruses that could potentially harm your computer. Only open the file if you are sure it is safe. If this file was placed by a trusted person or program, you can click Open to view the file." That seems perfectly clear to me. There is really no reason to change this behavior. This is not an exploit.
Does anyone know if Sumatra PDF is vulnerable?
I stopped using Foxit because of its frequent crashes and annoying updater, and I only use Acrobat for printing.
There is a command in the PDF language that says "execute the following command-line!" I thought having that ability in the scripting language was dumb. But it's actually available in the document description format? What possible purpose could that server? I don't want a message box added, or a security setting -- just remove that command entirely from the implementation!
How did this come about when they were designing the PDF format?
"Let's make it support bold, italic, underline, and execute."
One of the above does not fit with the others.
How is this new?? Since he couldn't find a vulnerability he just uses an old one and uses social engineering as the final key in,wow,just wow.
Jack of all trades,master of none
Someone came up with a better test file, here:
http://seclabs.org/fred/docs/sstic09/samples/actions/launch/calc.pdf
The first test file contained code essentially saying "if you're on a windows box, run cmd.exe". This one says "if you're on windows, run calc.exe, and if you're on Unix, run xcalc, and if you're on MacOS, run Calculator.app". So regardless of platform, if you load this PDF and see a calculator come up, well, you've learned something.
As it happens, the PDF also contains real content that describes expected behaviors with a couple of readers. Apple's "Preview" isn't vulnerable because it doesn't implement the /Launch command at all! But Adobe's reader on MacOS is vulnerable.
see http://blog.didierstevens.com/2010/03/29/escape-from-pdf/ for more information and screenshots
"... competition going on in Adobe to see if the Flash or Acrobat teams can collect the most security advisories?"
.PDF files than the older versions. When we talked to people at Adobe about that, we got evasive replies.
There seems to be a social breakdown at Adobe. There are a lot of issues that aren't being managed well. For example, we bought Adobe Creative Suite 3 (before CS4 was released). The CD had an old version. To get the newest version it was necessary to download a 320 Megabyte file, on the same week that Adobe shipped the CD.
The new Acrobat takes longer to make
Comment removed based on user account deletion
The strange thing is now, that when i need to access a fishy site I use Internet Explorer because it caught the drive-by download the next time I visited. Sort of a complete reversal of policy for me.
That's because to attack a Chrome user's system, you have to find a way to circumvent security. With IE, you can pop up a message "This program will steal your computer, continue?" and the user will run the malware to make the message go away.
NB: this is just a lame joke, I mean no harm.
My webcomic
Are Evince, Okular and the like vulnerable, or do they not implement the full PDF standard that is being exploited here?
...with a bit of clever social engineering I can get you to open my malware executable directly.
With Adobe Reader, the only thing preventing execution is a warning.
The only thing preventing your browser from executing a binary executable is a warning.
Evince does not open cmd.exe. Evince runs on Windows.
"Persistence is annoying success." - ghee22 11:28:1999 - 10:53:PM
If you got nailed by the PDF, IE vs chrome should be irrelevant. Once the PDF is handed off to the external viewer, the browser stops having anything to do with it.
I use Docu-Track.com's PDF-Xchange viewer as the default PDF app (including embedded in browser) and it warns that the PDF is attempting to run a program.
fencepost
just a little off
Microsoft, Adobe etc are all guilty of this, they create applications, they add some useful and lots of not so useful stuff, they turn on all features by default and then system administrator run around like mad to fix security holes, disable features, explain to users that that "oh so good feature" is bad, patch, update instead of doing work that would make some dollars.
to code or not to code, that is the question.
has had this functionality for months now...
http://www.metasploit.com/modules/exploit/windows/fileformat/adobe_pdf_embedded_exe
Now, it's entirely possible that he found this on his own. But it's not exactly a new development...
Also, before anyone goes and claims to have found a way to get Java applets to execute arbitrary code as well:
http://www.metasploit.com/redmine/projects/framework/repository/entry/modules/exploits/multi/browser/java_signed_applet.rb
"All we have is logic and love on our side."
I verified that Acrobat Reader on Linux has this vulnerability, but none of KPDF, eVince, or GhostView have this flaw, probably because they all derive from the Poppler library. (So does Okular but I haven't tested it.)
What kind of dumb PDF keyword is "Launch" anyway? Why would anyone implement such a feature? That's almost as retarded as Microsoft's "Your Email Reader Will Launch Any Software On Command" Outlook feature, way back when we were telling all the non-geeks that there is no such thing as an email virus and "Good Times" is a hoax. Good job, Adobe. What's next in your newest PDF spec, the Format Hard Drive feature?
404555974007725459910684486621289147856453481154 in hex is "You sank my Battleship?"
[GPG key in journal]
Another alternative to Adobe Reader and Foxit Reader is PDF-XChange Viewer:
http://www.docu-track.com/product/pdf-xchange-viewer
It behaves like Adobe Reader in that it shows you a warning, unlike Foxit. Given this fact I recommend switching to it from Foxit (at least for the time being).
It's lightweight, fast, and has lots of nice features. It even allows you to save filled forms!
It means "exploit" a reader as in "take advantage of a bug in", not "make use of in any way".
In other words, a perfectly coded pdf reader with zero bugs whatsoever would still be vulnerable..
You contradicted yourself from one sentence to the next. I'm not trying to be a Grammar Nazi here, I'm just honestly wondering if it was intentional, because the only thing I've gathered from your comment is "don't use Foxit." The rest doesn't make much sense.
So I work for Microsoft.. most hated software company, right?
Not always, apparently. Thanks to competition like Adobe, we're going to have to up our game.
Without going into too many details, a friend of mine was a Microsoft developer that was in a position where he was trading email with an extenal ISV as part of a formal MS program. So there was this stream of question and answer emails between them about how to use what we were working on to address this ISV's particular business problems. Anyway, at the end of one of this ISV's emails back to us, he says
"PS: Can you guys somehow crush Adobe Corporation? I honesly and truly hate them."
So there you go. That day, we lost. Adobe was the more hated company. We resolved to work harder to be #1 again.
My opinions are my own, and do not necessarily represent those of my employer.
I found two occurences of "Launch" and changed both and Foxit 3.0 fired up and read PDFs just fine.
I come here for the love
IE doesn't hand off the PDF to the viewer just without asking. Chrome does. That's in this case the difference between "download?? what download? CANCEL" or "what just happened on my screen? OMG!".
Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
Doesn't work on Linux and on Windows - and yes, Evince runs on Windows
Heres the registry keys to fix this issue for Reader, Standard and Pro
for both versiond 8 and 9.
Enjoy.
HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\8.0\Originals
Name: bAllowOpenFile
Type: REG_DWORD
Data: 0
HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\8.0\Originals
Name: bSecureOpenFile
Type: REG_DWORD
Data: 1
HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\Originals
Name: bAllowOpenFile
Type: REG_DWORD
Data: 0
HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\Originals
Name: bSecureOpenFile
Type: REG_DWORD
Data: 1
HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\8.0\Originals
Name: bAllowOpenFile
Type: REG_DWORD
Data: 0
HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\8.0\Originals
Name: bSecureOpenFile
Type: REG_DWORD
Data: 1
HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\9.0\Originals
Name: bAllowOpenFile
Type: REG_DWORD
Data: 0
HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\9.0\Originals
Name: bSecureOpenFile
Type: REG_DWORD
Data: 1