We’ve received a PDF document, supposedly carrying a hidden message!
Task sounds pretty straightforward, doesn’t it? Let’s take a look at what we’re dealing with.
First page with question marks, followed by two blank pages.
So… what exactly can we do here? Let’s see if pdfinfo can tell us anything useful!
…nothing much, though it doesn’t seem there’s any JS present. At least this much. So, what to do next? Perhaps we can check if xref-table gives us a hint.
Okay, plenty of things to look at, perhaps we can stumble upon something just checking a few of them.
Hmm… An XObject! ImageB, ImageC, ImageI, Image… what if there was an actual image? You can embed a lot of things into a PDF, what if hidden image was one of the said things? At this point it’s just a wild guess, so let’s see where we’ll get with it. Now the question is, how do we want to inspect a PDF file in a manner that, maybe, could show us if there was a lost image somewhere? That’s where hex-editor may come in handy!
Ha, there it is. A lonesome image!
Turns out inspecting PDF objects got us somewhere! Now, how do we retrieve the image? We’d need to know where its data begins and ends.
Lucikly, good ‘ol wikipedia got us covered.
Great, so now all we need is to copy the hex data starting with “FF D8” all the way until “FF D9”!
Now just to make the data useful to us, in the end we want to find the hidden message!
…and voila!
our elusive hidden message
Now that we’ve found it, although only due to a wild guess, could we find the solution easier and faster, without all the menial work?
Yes, we could’ve. If only I knew Origami came with pdfwalker. How easy it could’ve been?
eh…very easy…