New Method Could Hide Malware In PDFs, No Further Exploits Needed 234
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."
Sad (Score:2, Troll)
Re:Sad (Score:5, Insightful)
But for once Adobe is actually more secure than the better alternative Foxit. Adobe PDF Reader at least warns and asks your permission to run the file, but Fox It does neither one but just happily runs it. That fact made me uninstall Foxit for now at least.
Re:Sad (Score:5, Informative)
That fact made me uninstall Foxit for now at least.
You shouldn't have to wait long.
http://forums.foxitsoftware.com/showthread.php?t=18029 [foxitsoftware.com]
this issue has been confirmed, and a maintenance version will be released within this week.
Re: (Score:3, Informative)
Ummm... Adobe already warns you about it. So less than zero days.
Re:Sad (Score:4, Insightful)
Of course, the average user is known to thoroughly read the warnings and definitely will not click "OK, just get this thing out of my face" within half a second after the dialog box has finished rendering.
Re:Sad (Score:5, Informative)
From the author:
" My PoC PDF requires some changes for Foxit Reader, because ultimately, the executable doesn't run. But that's probably due to some variation in the PDF language supported by Foxit Reader."
Not really a proof of concept since the proof doesn't actually run the code currently. Not that it couldn't but there's no proof that Foxit is less secure since it doesn't actually run the code.
Re:Sad (Score:4, Informative)
http://blog.didierstevens.com/2010/03/31/escape-from-foxit-reader/ [didierstevens.com]
He got it working in Foxit pretty quickly after the first post about the PoC.
Re:Sad (Score:5, Informative)
Also the first comment there says how you can hex edit the .exe to disable this "feature".
If you can live without the /Launch functionality (I can!), edit the executable:
- search for “^@Launch^@” (^@ == null byte, file offset 7040965 in 3.13.1030) in Foxit Reader.exe,
- change it to e.g. “L!unch” (no quotes),
- save AS BINARY,
done.
Comment by Thomas — Wednesday 31 March 2010 @ 12:20
Re: (Score:2)
Re: (Score:2)
Huh, where I work, it stands for "products of conception". I was a little confused when reading the article.
Re: (Score:3, Funny)
...I was thinking PoC meant Piece of Crap which I thought was redundant when referring to a PDF.
In my experience, the proper industry acronym is BFPoC, for Big Fat Piece of Crap, a term allegedly coined by one Artemus Clyde Frog.
Re: (Score:3, Insightful)
PDF is (or was) a good format and standard; it lets you define documents so that they look the same on any platform, and can be printed on any printer and look identical.
The only problem with it is that it was perfected for this purpose long ago, so Adobe kept adding more and more crap to it.
This is one reason open-source is generally better: when an open-source project is done, the developers leave it that way (unless any bugs are found), and go find something else productive to work on. They don't try to
Re:Sad (Score:4, Funny)
This is one reason open-source is generally better: when an open-source project is done, the developers leave it that way (unless any bugs are found), and go find something else productive to work on.
One word: Emacs.
Re: (Score:3, Interesting)
Re:Sad (Score:4, Informative)
Ever since Adobe perfected the basic PDF functionality and needed to keep adding features. Whether they are frills or not, whether they depart from the purpose of PDF or not, Adobe has to do this to justify its marketing. They want their customers to have reasons to keep wanting the latest version. Feature creep, in other words.
With Foxit Reader (Score:5, Interesting)
There's no warning at all. It just runs. [zdnet.com]
Re: (Score:2)
Tried to switch to evince on Windows machines. However, the most recent version doesn't let you print files. That obviously is a problem.
Maybe sometime in the next year or two the developers will post a fix. The last time I looked a few months ago there wasn't a fix, and it looked like the problem had been around for a while. Note to FOSS devs - "fixed in CVS" isn't a fix if there isn't a simple to use free build platform on the target OS.
further proof D. Knuth was right (Score:5, Insightful)
Notice you never hear about exploits-of-the-week like this for LaTeX !
Re: (Score:2)
What dynamic content? This has nothing to do with JavaScript.
With Adobe Reader, the only thing preventing execution is a warning. Disabling JavaScript will not prevent this ( I don’t use JavaScript in my PoC PDF ), and patching Adobe Reader isn’t possible (I’m not exploiting a vulnerability, just being creative with the PDF language specs).
Re: (Score:2)
What dynamic content? This has nothing to do with JavaScript.
Dynamic content != JavaScript.
Dynamic content is a generic name for all manner of executable things, including not only PDFs and JavaScript, but also LaTeX, ActiveX, VBScript, etc. JavaScript is simply one of many different implementations of dynamic content.
In this case it's a "/Launch" command in the PDF syntax that's being exploited.
Re: (Score:2)
PostScript, the basis of PDF, is a full, turing-complete programming language! This has nothing to do with JavaScript!
Re: (Score:2)
You've heard of PostScript, right?
Re:further proof D. Knuth was right (Score:5, Insightful)
I can't decide if you're trying to be ironic, but there are no 'vulnerabilities' in LaTeX because the ability to interact with files and run arbitrary programs are part of the language. The reason LaTeX isn't often exploited is that it is very rare to run LaTeX programs from untrusted sources; you distribute the output from the program, not the program itself.
On a slightly different topic, is there a competition going on in Adobe to see if the Flash or Acrobat teams can collect the most security advisories?
Management breakdown at Adobe? (Score:3, Interesting)
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
Re: (Score:3, Informative)
PDF is the evolved form of PostScript - http://en.wikipedia.org/wiki/PostScript [wikipedia.org] and at the time PS came out, it wasn't that bad of an idea, especially since it enabled us to actually print IMAGES.
Unfortunately, feature creep set in and instead of creating a language actually meant for publishing and sharing documents, Adobe just reimplemented PS in PDF and glossed over the fact that they were using an elephant gun to shoot mosquito. This is coming back around to bite them in their butt. But the actual origi
Re: (Score:2)
Re: (Score:2)
Actually while I was a CS major one of our labs was half NeXTSTEP (http://en.wikipedia.org/wiki/NeXTSTEP) and was aware of graduate students who pranked each other on the lab computers using the fact that the computers used postscript as a display engine.
Re:further proof D. Knuth was right (Score:4, Interesting)
PDF has some superficial syntactic similarities to PostScript. Beyond that, it is not at all like PostScript. The reason the content stream language of PDF is PostScript-like is because it made it easy to print PDF by simply blowing the content stream out as PostScript, accompanied by the appropriate ProcSets. Such usage is deprecated these days -- ProcSets are no longer required to be declared, and modern PDFs can't be printed by blowing the content stream directly to the printer any more.
Even in the areas where PDF looks like PostScript, it's fundamentally different. There is no operand stack. There are no control flow operators. If you start trying to create a PDF under the impression that it's just like PostScript, you'll fail miserably.
Re: (Score:2, Insightful)
Why don't you compile the following document with "tex --shell-escape" as root
\write18{rm -fR /}
Re: (Score:2)
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 !
That's a good question. Someone should be asking the people who put Javascript in Netscape the same thing! I mean, there's absolutely no use cases for having dynamic documents!
"This cannot be patched" (Score:5, Insightful)
"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.
Re: (Score:3, Insightful)
Exactly. To execute code, at some point, the reader is branching into data created or loaded by the pdf. When is that ever a good idea? If it's part of the PDF spec then it's a pretty good part to break compatibility with.
Re: (Score:3, Insightful)
One man's feature is another man's defect.
In the case of security "features", one man's feature is EVERYONE's defect.
Clever social engineering... (Score:3, Interesting)
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?
Re: (Score:2)
Re: (Score:3, Insightful)
If you design a sharp blade into an out-of-the-way spot of a hammer, don't be upset if you get cut while driving nails.
Not every tool is proper for every job. Using PDF as a general-purpose computing language is either mistaken or willfully stupid.
PDF is a document format. It's an output format. It's not a form-entry language. It's not the web. It's not an operating system. It sure as hell shouldn't be able to trigger any open-ended OS action. Its vocabulary of actions and action subjects should be limited.
Re:Clever social engineering... (Score:5, Insightful)
You've never dealt with a marketing department, clearly.
"Hey, you know what would be cool? What if PDF documents could also play videos?"
"Um.. well, it's technically possible but I don't think that-"
"Great! WE MUST HAVE THIS FEATURE! NOW! DROP EVERYTHING AND GET TO IT!"
Re: (Score:2)
It surely should not be.
But it is. Since that is what it is then maybe we should just not be using it at all. If the only thing your company can send me is a fucking PDF then you can print it and mail it to me.
Re:Clever social engineering... (Score:5, Funny)
Re: (Score:2)
I honestly don't know whether to mod this +1 Funny or +1 Insightful.
*nix vulnerable too? (Score:4, Interesting)
Re: (Score:2)
Individual instances of the exploit might be designed for Windows only, but I can't see why Linux would protect you here.
Re: (Score:2)
Re: (Score:2)
Re:*nix vulnerable too? (Score:4, Informative)
It can, although it doesn't mean that Mac and Linux are just as vulnerable as Windows.
If you download this proof of concept which works on Linux, Windows and Mac:
http://seclabs.org/fred/docs/sstic09/samples/actions/launch/calc.pdf [seclabs.org]
you'll discover that although it works in Acrobat Reader on the Mac, the Mac Preview application, which I would hazard is used to open the vast majority of PDFs on Macs, does not support /Launch and thus isn't vulnerable to the attack.
Re: (Score:3, Informative)
Okular and Evince on Linux also do not seem to support /Launch, and they are far more widely used than Acrobat Reader on Linux.
Re:*nix vulnerable too? (Score:4, Interesting)
/F <<
/DOS (C:\\\\WINDOWS\\\\system32\\\\calc.exe)
/Unix (/usr/X11R6/bin/xcalc)
/Mac (/Applications/Calculator.app)
/TheAnswerIs (yeah\\\\i/think\\\\so)
>>
/S
>>
Adobe misfeature (Score:3, Informative)
Explaination [didierstevens.com]
Video [didierstevens.com]
Demo PDF file (as .zip) [didierstevens.com]
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".
Re: (Score:2)
Hey Google, integrate this too! (Score:2, Funny)
Chrome integration of one buggy plugin deserves another, right?
Comment removed (Score:3, Informative)
Re: (Score:2, Insightful)
Yeah, because Google doesn't have enough of your info already.
Re: (Score:2)
Re: (Score:2, Insightful)
With the google doc extension, don't you need to be online? Also, that's assuming you don't mind google caching on the pdf you're opening, right?
Re: (Score:3, Informative)
While I still highly recommend any of the alternatives, I've seen several cases where websites are checking for that specific plug-in, and will not make any attempt to display the PDF, or offer any alternative links to the document, if Reader is not detected. Of course if more people dropped Adobe's crap, this would cease to be an acceptable way to display PDFs, but it should at least be noted that you might find just a few
Re: (Score:2)
4) Click on the 'print' link
In Google Docs, a dialogue prompts you to download the PDF to your local computer to either be opened by a helper application or saved to your hard drive.
Seth
Re: (Score:2)
Re: (Score:2)
Your rant ignores the legitimate cases where people open documents from untrusted sources. The Human Resources department is the often touted example of that. They receive resumes all the time. If they don't want to accept them in Word (maybe they're scared of being labeled Microsoft toadies?) then they will accept them in PDF.
Yup, part of the PDF spec (Score:3, Interesting)
If you're really a nerd, you'll want to scroll through the PDF Reference [adobe.com] 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.
Re: (Score:2)
So it appears that you have found the bug in the spec.
Re: (Score:2)
Re-reading what you quoted, I see no requirement that an implementation be willing to execute any part of the content of the document: just run an "application" that is already installed on the machine. It also seems reasonable that an implemention could refuse to execute code located in the user's home directory.
Old news. I got hacked 4 weeks ago by one of these (Score:5, Informative)
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.
Re: (Score:2)
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.
Tried to read the article (Score:2)
Worst security flaw of the decade (Score:3, Funny)
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.
A better test file. (Score:5, Informative)
Someone came up with a better test file, here:
http://seclabs.org/fred/docs/sstic09/samples/actions/launch/calc.pdf [seclabs.org]
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.
Re: (Score:2)
Re: (Score:2)
Windows XP, Adobe Reader 8; clicking on that link I get an error popup (not a warning) and no calculator.
The original proof of concept PDF does give me the expected warning.
Re: (Score:2)
Re: (Score:2)
Doesn't work on Debian/Sid with Iceweasel (Firefox) 3.5.6 and xpdf 3.02.
screenshots of messages (Score:2, Informative)
Only a warning? (Score:4, Insightful)
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.
Obligatory Adobe Story (Score:3, Interesting)
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.
Re:PDF-XChange (Score:4, Funny)
Do you always refer to yourself with the royal "we"?
Re: (Score:3, Interesting)
Each of us is composed of trillions of eukaryotic cells and even more bacterial cells. Thus, we think it appropriate to use "we" when speaking for us.
Re:PDF-XChange (Score:4, Funny)
I'm pretty sure a substantial minority of your eukaryotes actually prefer Adobe products.
The "we" you're using is just your corporeal ruling elite talking, Man! It's just another example of your neurons keepin' your connective cells and fat tissue down!
Re:PDF-XChange (Score:4, Funny)
To be fair, my fatty tissue is an ass, and my connective tissues jerk me around all the time.
Re:PDF-XChange (Score:4, Funny)
As Mark Twain once said, "Only kings, presidents, editors, and people with tapeworms have the right to use the editorial 'we.'"
Peter does not appear to be a king, is unlikely to be a president, and he's probably not an editor...
Re:PDF-XChange (Score:4, Funny)
Re:PDF-XChange (Score:5, Funny)
Re: (Score:2)
(we are not amused)
Re: (Score:2)
Do you always refer to yourself with the royal "we"?
He's referring to himself, the laptop, his tapeworms, and the infected PDF .
Re: (Score:2)
Yes! And:
It rubs the lotion on its skin. It does this whenever it is told.
Got it? ^^
Re: (Score:3, Interesting)
He says that it works in other PDF Readers (well he mentioned one, Foxit) - because he's not exploiting a vulnerability in any of the applications, but the PDF Language itself.
So, chances are, you are just as vulnerable. He also said he reported it to Adobe, without releasing his proof of concept to the public - so we'll see what comes out of it.
It might just end up that Adobe products become more secure for reading PDFs than the others, and Adobe then has an upper hand.
[tinfoil speculation]
And if thats the
Re: (Score:2)
He says that it works in other PDF Readers (well he mentioned one, Foxit) - because he's not exploiting a vulnerability in any of the applications, but the PDF Language itself.
Technically, I think he's exploiting a common way the spec is implemented. the "/launch" command is supposed to be to a PDF file or be handled as a URI action.
He implements a file including:
By my reading of the spec (which is admittedly not expert) the way things are being handled by the PDF reader are questionable and by the OS is stupid.
In my mind this is simply one more argument for default ACLs and sandboxing for all applications as an integral part of OS design..
Re: (Score:2)
Are you sure that's how he does it? He apparently has a better proof-of-concept that he hasn't posted, only sent to Adobe.
Re: (Score:2)
Are you sure that's how he does it? He apparently has a better proof-of-concept that he hasn't posted, only sent to Adobe.
That certainly seems to be the basis for his attack based upon the data and samples he's presented. It's not the first time this particular part of the spec has been a security problem either.
Re: (Score:2)
the "/launch" command is supposed to be to a PDF file or be handled as a URI action
The PDF spec I'm reading in Table 8.48 (Action types) says:
Action Type: Launch
Description: Launch an application, usually to open a file.
And there are other instances where it clearly states that "A launch action launches an application or opens or prints a document."
Re: (Score:3, Informative)
Yes, that is the summary of what it does, but the spec I'm read ing (1.5) says it is to be implemented via a URI, not call a specific application. That is to say, hand the URI for a .exe file to the OS and let it decide what is registered to open it. The spec lists the variable type as "File" which in turn requires URI and a file location.The only option listed is a new window or not a new window. So if they implemented "Launch" to launch a specific application, it looks like a violation of the spec, or at
Re: (Score:3, Interesting)
While details are hard to come by I think this may run deeper than pdf.
Clearly security issues go beyond this single flaw in PDF and to some of the primary assumptions of OS's in mainstream computing.
The whole idea of "opening a file in a way determined by the OS for that type of file" is poor from a security point of view.
I disagree. That is to say, can't think of any better way. The OS determining what to use makes for a smaller exposure to exploitation because an attacker cannot specify or know what will be used to open a particular data type in most instances.
Opening a file can mean anything from viewing an image in an image viewer (safe unless there is a bug in the image viewer) through opening something like an office document (may or may not be safe depending on office security settings) though to running an executable (unsafe by design).
You provide three examples, but all three could be made quite safe if OS's were designed to do that. Sandbox every application and give i
Re: (Score:2)
Especially if I open it with a viewer that knows no stinkin' JavaScript etc.?
Did you even bother to read the summary?
Disabling JavaScript will not prevent this.
To quote further from the actual article:
With Adobe Reader, the only thing preventing execution is a warning. Disabling JavaScript will not prevent this (I don’t use JavaScript in my PoC PDF), and patching Adobe Reader isn’t possible (I’m not exploiting a vulnerability, just being creative with the PDF language specs).
This has nothing to do with JavaScript or anything else. It has to do with the actual PDF language spec itself. Amazing how you got modded interesting by not even understanding what the issue is.
Re: (Score:2)
This has nothing to do with JavaScript or anything else. It has to do with the actual PDF language spec itself. Amazing how you got modded interesting by not even understanding what the issue is.
Then explain me the issue, please. And not in such weasel words as "it has to do with the specification itself".
Re: (Score:3, Informative)
PDF is basically a specialized subset of Forth. Unlike Postscript, it was presumed to be safe. This, however, may show otherwise.
Postscript is essentially a specialized dialect (not subset) of Forth. It is clearly Turing complete, so a Postscript program might do nearly anything. PDF had been presumed to have been safely neutered. This calls that into question.
P.S.: No, I didn't read the original article. This is all basic background stuff, with a few of my speculations about what this "exploit" mean
Re: (Score:2)
Re: (Score:2)
Foxit Reader for Linux might support it.
Re:No *buggy* executable required? (Score:3, Informative)
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 electrica
Re: (Score:2)
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.
All which correctly implement the PDF spec. Posting before reading the summary is also disingenuous.
Re: (Score:2)
Whoops -- sorry, it's not in the summary. It is, however, in TFA.
Re: (Score:2)
> All which correctly implement the PDF spec.
Which is therefor buggy.
Re: (Score:2)
The PDF spec is buggy in exactly the same way that any language or OS spec is: it provides ways to do things that may be bad. It is certainly arguable that the PDF spec tries to do too many things, and frankly I'd argue that, but given any system that allows sufficiently complex behavior there will be ways to abuse it.