问题
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?
回答1:
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.
回答2:
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.
回答3:
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.
来源:https://stackoverflow.com/questions/16111471/steganography-in-pdf-files