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

Less Prone favorited Burbia's blog post Journalism as we know it
3 hours ago
Less Prone commented on Less Prone's photo
Thumbnail

Rebuilding Khazaria

"For some reason the original article has been scrubbed, but it still exists in the wayback…"
4 hours ago
Less Prone commented on Less Prone's blog post Pregnancy a Dicease?
"Thanks Doc!. This guy thinks he's a smart cookie, but totally fallen under the indoctrination.…"
4 hours ago
Doc Vega posted blog posts
13 hours ago
cheeki kea posted a photo
16 hours ago
cheeki kea commented on cheeki kea's blog post Southern Lights / Northern Lights engulf entire world.
"It does force one to wonder... All sorts of things. "
18 hours ago
cheeki kea posted a blog post

Southern Lights / Northern Lights engulf entire world.

well, well what do we have here then ! ? They are a long way from home. I wonder if anything Else…See More
19 hours ago
tjdavis posted a photo
yesterday
tjdavis posted a video

Documentary: Making a Killing, The Untold Story of Psychotropic Drugging

PREMIERING 04/07/18 at 6 & 9pm PT. 𝗪𝗔𝗧𝗖𝗛📺 the Scientology Network on the web: http://Scientology.tv, or DIRECTV Channel 320, AppleTV, Roku, fireTV, Chr...
yesterday
Burbia commented on Less Prone's photo
Thumbnail

Rebuilding Khazaria

"Hungarians show highest rate of Ashkenazi genes after Israelis, company…"
yesterday
Doc Vega commented on Less Prone's blog post Pregnancy a Dicease?
"Less so true to maddeningly true! "
yesterday
Doc Vega favorited Less Prone's blog post Pregnancy a Dicease?
yesterday
Burbia posted a video
yesterday
MAC posted a discussion

COVID whistleblowers exposing the experimental mRNA vaccine as part of the globalist depopulation agenda

https://api-assets.infowars.com/2023/06/Hero2.jpeg" style="width: 800px; max-width: 100%; height:…See More
Sunday
tjdavis posted a video

This Is Their ''CHRIST'' They Desperately Wait For! MUST SEE! (2024)

If you want to support my work please visit my Etsy store, thank you:👉🔴My Etsy Shop (STFengraves): https://www.etsy.com/shop/STFengraves?ref=l2-about-shopn...
Saturday
FREEDOMROX posted a video

G4/G5 Geomagnetic Storm has Started! How will Earth's Magnetic Field Hold?

✅ Subscribe to my channel: @StefanBurns 🙏🥇 Become a special member and enjoy access to the Sól Tribe private Telegram channel, ad-free pre-release video...
Friday
Less Prone posted a blog post

Pregnancy a Dicease?

The traditional family unit is a solid foundation of a healthy society. It is the primary place…See More
Friday
FREEDOMROX's blog post was featured
Friday
Doc Vega's 2 blog posts were featured
Friday
cheeki kea's blog post was featured
Friday

© 2024   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