/    Sign up×
Community /Pin to ProfileBookmark

Crazy request: javascript within PDF document to fake page number

I know nothing about coding, but I’m looking to fake the page number of a PDF document so that when you open the PDF in Acrobat Reader, the page counter at the top shows, say, “1 / 50” even though the document has maybe 100 pages total.

Ha. And why might I want to do that?

Let’s just skip the why and jump straight to the more exciting “HOW”.

Like I said, I know nothing coding myself, but I know it’s possible to embed javascript in a PDF document so that when you the open the document, an action is executed.

[QUOTE]

pdfid.py
This tool is not a PDF parser, but it will scan a file to look for certain PDF keywords, allowing you to identify PDF documents that contain (for example) JavaScript or execute an action when opened.

[/QUOTE]

[url]http://blog.didierstevens.com/programs/pdf-tools/[/url]

I also know there’s a line of code within a PDF file that identifies the page count:

[QUOTE]

I re-opened the PDF file to search for object which contained the number of pages used inside the PDF and found the exact count, There are “20” pages inside this malicious PDF file… This was a rather unique trick used by the attacker to encode/decode the malicious JavaScript leveraging the “this.numPages” function.

[/QUOTE]

[url]http://research.zscaler.com/2010/08/pdf-exploit-number-of-pages-is-key.html[/url]

So, would you reckon this is possible?

I realize this may not be the right forum to ask about this (perhaps you can re-direct me?), but I’ll call God whoever can show me a cheat PDF document that has a larger number of pages than the Acrobat Reader page counter shows.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @shbshg spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...