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

Sandy posted a photo
17 hours ago
james will's blog post was featured
yesterday
Less Prone favorited james will's blog post What Is Tubidy? A Complete Beginner’s Guide
yesterday
Roberto Castorena is now a member of 12160 Social Network
Friday
Less Prone favorited tjdavis's photo
Friday
Doc Vega posted a blog post

What They Told Us About Health and Now it’s Completely Reversed?

 Remember growing up that they told us all of these rules of thumb when it came to your…See More
Thursday
tjdavis posted a photo
Thursday
Less Prone commented on Doc Vega's photo
Thumbnail

G99Gt39XEAAyu6Y

"Judges with bad judgement should be working somewhere else. When political affiliation surpasses…"
Thursday
Doc Vega commented on Doc Vega's blog post GROK Acknowledges the Co-existence of Humans and Dinosaurs
"Less Prone, this Carlos guy has a unique artistic approach but it's not proof. There's…"
Wednesday
Doc Vega posted photos
Tuesday
Doc Vega posted blog posts
Tuesday
tjdavis posted a photo
Jan 4
Sandy posted a video

KILL THE MESSENGER - Hero Journalist Featurette - In Theaters Friday

In this featurette “Gary Webb: Hero Journalist,” Jeremy Renner (Webb), director Michael Cuesta, Sue Webb and others explore the real man, investigative journ...
Jan 4
Sandy posted a photo
Jan 4
Less Prone commented on Burbia's blog post A Masterclass Is Being Played Out For Those Who Have The Eyes To See
"Yes. One of their functions is distraction, but they also bring chaos and crime and change…"
Jan 3
Less Prone favorited Burbia's blog post A Masterclass Is Being Played Out For Those Who Have The Eyes To See
Jan 3
Burbia posted a blog post

A Masterclass Is Being Played Out For Those Who Have The Eyes To See

A question can be asked, why do Jews want a multicultural community in a host society? It is to…See More
Jan 3
tjdavis posted a video

City of Joel - Official Trailer

Now Available on Digital - http://bit.ly/2uxDibn50 miles north of New York City, the town of Monroe is a microcosm for a hyper-partisan and divided nation as...
Jan 2
Doc Vega favorited omegamann's photo
Jan 2
Doc Vega commented on Doc Vega's blog post Death Threats for Assisting ICE?
"Less Prone excellent points and I've seen that video too. Very informative! "
Jan 2

© 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