Wednesday, February 02, 2005

Time-limited Acrobat documents

I recieved some great security standards documents in Acrobat PDF format through a course I attended last year. I went to access them recently only to find that document text had been blacked out and a message telling me that the document had expired. I don't think so!

I could find the same information on the web but this was now a personal challenge.

So how to access the document? I changed the date back a year on the system clock, Bingo! Unprotected doc. Hmm... Adobe security maybe? So I removed the Adobe document protection, set the date back to today - back to the black screen and the message.

OK, I turned to my copy of Solid PDF Converter, sure enough it spat out a nicely formatted Word document. Cool, so the document wasn't encrypted.

Googling for once turned out to be relatively fruitless, until I found someone on a forum asking for a piece of Javascript to do exactly what my document was doing. Of course! Here's me the security dude with programming experience and I didn't think of the obvious.

Open Acrobat, Edit->Preferences->Select JavaScript->Uncheck "Enable Acrobat JavaScript". Time-limited Acrobat PDF document neutered! The only drawback was a nag screen about JavaScript being disabled everytime I accessed the document.

This lead to further investigation... why do I want a PDF executing JavaScript in the first place?
Anyway to cut a now boring story short, if you want to permanently kill off JavaScript in Acrobat go to the c:\Program Files\Adobe\Acrobat X.X\Reader\plug_ins directory where X.X is the version of Acrobat that you have installed and rename or delete the EScript.api file. No more JavaScript in Acrobat.

I have now taken this one step further and renamed the entire plug_ins directory. This results in NO plug ins loading and Acrobat loads in under a second compared to about 8 seconds with all the plug ins loading.

There has been no noticeable adverse effects on the rendering of PDF documents, although I have since had to recreate the plug ins directory and copy the search.api file to re-enable the searching of PDF documents.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?