Prevention of stamp attacks on PDFs #327
Replies: 1 comment 2 replies
-
|
Hi @eduperottoni, You are on to something :). This is a known issue, and largely due to the fact that DocMDP validation is an extremely nebulous notion that is interpreted differently by various vendors, and even the de-facto "reference implementation" in Acrobat is a moving target in this regard. Of course disallowing page content modifications (duh) and non-signature annotations is easy enough, but there's no interoperable way of preventing new signature fields from being added (other than In general, you can essentially either have cryptographically sound multi-signer workflows or allow signatures to be visually part of the document, but not both. The business world has chosen to prioritise the latter, and seems to have settled for a "well, if push comes to shove, the forgery will be easy to detect in a court of law" kind of approach when it comes to form filling in signed documents. (I've seen that argument play out with, erm, shall we say, "various degrees of civility" at industry conferences ;) ) A couple of years ago (while I still worked for iText) I wrote a few words on the subject: https://itextpdf.com/blog/itext-news-technical-notes/attacks-pdf-certification-and-what-you-can-do-about-them. The status quo hasn't really changed since. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, @MatthiasValvekens!
I was thinking about the attack that can occur in a PDF document when a malicious stamp is inserted in the document. This stamp may have the size of the entire page and replace the real content of the page, deceiving who read this document. Obviously some PDF readers implement features in order to show every revision of the document, wich allows the users to see when the document was maliciously modified, but most of them don't (like browsers).
Reading ISO-32000, I couldn't find a way to prevent this kind of attack. In the application I'm working on, the ideia was to prepare some signature fields, with
append_signature_fieldsAPI function and then disable signature fields creation or any other modifications in the document through a certification signature. But, at this point, if I close the document withNO_CHANGES, I can't perform signatures in the fields I've created earlier. Although, if I use the level 2 of modification (FILL_FORMS), I can't avoid new signature fields creation (in other applications, for example) and consequently can't prevent the mentioned attack.Is there a way to prevent this kind of attack in PDF? Or is there any alternative way to get close to this prevention?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions