The Fog: PDF Exploit Cleaning

With the fog creeping in, cleaning exploits from pdf’s becomes more important, and as necessity is the mother of invention, solutions appear:

What is PDFCleaner?

PDF files are dangerous. We regularly see new Adobe Acrobat PDF vulnerabilities being exploited in the wild. Adobe usually takes a while to patch these flaws, and during that time, all Acrobat users are vulnerable. PDFCleaner is designed to remove unknown exploits from PDF files. After the exploit has been removed, opening the file in an unpatched PDF reader should be safe. Note that PDFCleaner is experimental. It is probably possible to design an exploit that would survive PDFCleaner’s removal process, so please don’t rely on it for absolute security.

How Does it Work?

PDFCleaner converts your PDF file to PostScript format, and then converts it back into a PDF file. The process of interpreting the PDF file, converting it to a different format, and converting that back into PDF ensures that any PDF-specific exploits are not transferred to the new PDF file. Postscript is a file format can do everything that PDF can do, so in most cases, the resulting PDF file will look exactly the same.

[…]

PDF Exploit Sanitizer and Cleaner – Remove exploits from PDF files – Defuse Cyber-Security

Problem

The problem with this online tool is that not all can see the code inside, and even when having access to the code, in my experience, hidden code can be hard to find. And if it was clean yesterday, is it clean today? Will it clean instead of make dirty? For many a trust issue, for some others, a lot of work in terms of checking.

Apart from that, the approach does work. It’s a known approach too. Even locked pdf’s become partly accessible when converting to postscript and back.

Pdf2ps and ps2pdf

The pdf2ps tool is based on Ghostscript, a PostScript interpreter. It is a thin shell script wrapper around the “gs” tool.

Usage pdf2ps

pdf2ps [options] input.pdf [output.ps]


If you don’t specify the output file name, the name from the input file is used.

The pdf2ps man page is minimalistic, but noteworthy is the option -dLanguageLevel=3.  Running pdf2ps -h also gives this info.

The tool is based on Ghostscript, so you can also use other options that “gs” accepts. Fonts are converted to bitmap fonts (at a pretty high resolution by default, but configurable with the -r option, for example -r 300 to set the resolution to 300 dpi).

Usage ps2pdf

ps2pdf [options] input.[e]ps [output.pdf]


ps2pdf is a small command script that invokes ghostscript,  selecting a special “output device” called pdfwrite. Read more here.

The pdf to ps conversion can take quite some time and the resulting file can be huge, putting a burden on subsequent conversion of the file to pdf. And pdf2ps can in case aggressively crop to bounding boxes.

pdftops

The pdftops tool comes with Xpdf or Poppler as part of the “poppler-utils” package. The conversion takes less time, the resulting file is smaller, and fonts are better preserved.

Usage pdftops

pdftops [options] input.pdf [output.ps]

The pdftops man page explains a lot of options and pdftops -h gives a short version.

pdftops provides additional options like -eps to generate an .eps file, -f and -l to limit the page range to convert, and options to control/change the page size: -origpagesizes, -nocrop , -expand, -noshrink.

The poppler-utils package provides some more interesting tools: pdfinfo (pdf document information extractor), pdfimages (pdf image extractor), pdftohtml (pdf to html converter), pdftotext (pdf to text converter), and pdffonts (pdf font analyzer).

The Fog: PDF Exploit Cleaning | Lilith Lela

Comment

You need to be a member of #Anonymous #AntiSec #LulzSec #OWS to add comments!

Comment by truth on July 16, 2015 at 2:21pm

The Fog: PDF Exploit Cleaning

"Destroying the New World Order"

TOP CONTENT THIS WEEK

THANK YOU FOR SUPPORTING THE SITE!

mobile page

12160.info/m

12160 Administrators

 

Latest Activity

Doc Vega commented on Doc Vega's blog post So you Don't Think Communist China is Buying Off the Democrat Party?
"Tragically funny how easily patriotism dissolves when money is involved! "
yesterday
Doc Vega favorited tjdavis's blog post The Islamization of Texas and the Rest of the States
yesterday
Doc Vega commented on tjdavis's blog post The Islamization of Texas and the Rest of the States
"Yes and they are at this time allowing Epic City, a muslim wet dream to be constructed near Dallas…"
yesterday
Doc Vega posted a blog post
yesterday
Burbia commented on tjdavis's blog post The Islamization of Texas and the Rest of the States
"Muslim celebration at Grand Prairie water park canceled after Gov. Abbott threatens to pull city…"
Friday
Burbia commented on tjdavis's blog post Reminder: The Bush Family purchased over 100,000 acres of land in Paraguay
"I guess with coming solar flares that sent societies underground before arrives in the near future…"
Friday
Burbia posted a blog post

'Showbiz' Don to Release Xenu Upon the Public

 New York Post says the other files will be released Friday. If there ever was a Disclosure from…See More
Friday
tjdavis posted a blog post
Friday
tjdavis posted a blog post
Wednesday
tjdavis posted a video

Jerusalem Syndrome - Israel/Palestine

August 2006For some, visiting Jerusalem brings them a little too close to God. Dozens of tourists develop 'Jerusalem Syndrome', believing they have a messian...
Wednesday
tjdavis posted photos
Wednesday
Doc Vega posted a blog post

So you Don't Think Communist China is Buying Off the Democrat Party?

California Democrats Just Joined Hands With Communists Funded From ShanghaiPosted on …See More
Tuesday
cheeki kea commented on Doc Vega's photo
Thumbnail

681373888_994247376374814_9118727954735788138_n

"But Wait Folks... There's even more, even more than more in this ugly situation. A story of…"
Tuesday
Doc Vega posted a blog post
Monday
Less Prone left a comment for Aristo Kids
"Welcome aboard"
May 3
Aristo Kids is now a member of 12160 Social Network
May 3
Less Prone left a comment for Doc Vega
"Ning is working on theproblem. Their reply: "Hello, Thank you for notifying us.We are…"
May 3
Sandy posted a video

The Day of the Dolphin (1973) Original Trailer [FHD]

Directed by Mike Nichols. With George C. Scott, Trish Van Devere and Paul Sorvino.The Day of the Dolphin Blu-ray : https://amzn.to/3W9bfbxThe Day of the Dolp...
May 3
Sandy posted photos
May 3
Less Prone left a comment for Doc Vega
"I issued a ticked concerning your report. "The rgeular format is not appearing on the…"
May 3

© 2026   Created by truth.   Powered by

Badges  |  Report an Issue  |  Terms of Service

content and site copyright 12160.info 2007-2019 - all rights reserved. unless otherwise noted