Steganography in PDF files [closed]
Asked Answered
R

3

7

Can somebody tell me, where is possible to hide some data into PDF file? In other words, steganography in PDF files. Is there any algorithm to do this?

Rundle answered 19/4, 2013 at 18:43 Comment(3)
It should be possible. After all, Adobe provides watermarking capabilities in some of its pdf products.Assess
PDF supports embedding JPEG graphics. And photorealistic pictures in JPEG are very good for steganography, so you have at least 1 easy way to go. And I suspect that other methods (not using graphics) will be too easy to detect.Hooke
Voting to reopen. Too often I have a hard time understanding the rationale behind the close-voting crowds in SO.Midrash
M
4

There are lots of ways to do this, including

  • Embed the info into an image using traditional image steganography tools then embed the image into the PDF
  • Set the text color to white and make sure you are not using a colored background
  • Superimpose a white rectangle over your text.
  • Using the appropriate low level tools, create the text objects of your secret text then mark those objects as deleted. As long as no one tries to compact your PDF (Pitstop is one such compression/cleaning tool), your data will exist.
  • If you're really feeling optimistic, start reading the PDF Specification (I'm not sure if this is the most recent one, it's been a few years). There is/was a cross-ref table that would list the parts of the file that were "currently in use". It would be easy enough to add a few holes to that.
Medallist answered 19/4, 2013 at 18:55 Comment(2)
thanks for your answer. Do you know some diagram or scheme, which can describe process of embending?Rundle
Such a scheme would fill volumes... PDF is so versatile that there are very many ways to hide information in a PDF, too many to conclusively enumerate them.Odaniel
Z
4

The easiest place to hide information is at the beginning of the file before %PDF. Acrobat will allow up to about 1024 bytes of arbitrary data (as long as it doesn't contain %PDF) and still render the file properly.

Zombie answered 19/4, 2013 at 19:0 Comment(3)
That's generally a bad idea - Acrobat may allow this but it's certainly not supported by all PDF readers / consumers. And it's not supported by the ISO standards building on PDF (such as PDF/X, PDF/A...)Whiteley
Yes, not as robust as hidden streams, but definitely fast and simple.Zombie
Can this be considered a steganography? If yes then this would be an extremely simple case of steganography. It is so easy to detect such data in front of %PDF.Cannice
M
2

Going deeper on the last point of Dan Pichelman's answer, you can include stream objects into any PDF file,and add a reference to them in the cross reference table. A stream object can be compressed, or encrypted, and if it is not referenced from any other object of the file, then PDF readers will safely and silently ignore it.

Midrash answered 19/4, 2013 at 19:0 Comment(2)
If you are sure, the PDF won't be cleaned afterwards, you do not even need to add that object to the cross references... probably this would even be "more hidden." ;)Odaniel
But any tool that does a simple garbage collection on the PDF file would easily detect this. I imagine such a tool would just print the byte ranges of unused parts of the file, and there you go.Cobber

© 2022 - 2024 — McMap. All rights reserved.