Naturally, this countermeasure succeeds as long as the PDF update contains evil objects. So we came up with the idea to attack PDFs with only non-dangerous updates. We achieve this by adding invisible, malicious content when creating the PDF document (before it is signed) and to reveal them after signing.
What are PDF signatures used for and what is the legal status?
The process of digitally signing a contract involves multiple entities and can look as follows: The PDF contract is prepared by the collaborators. The collaborators can be lawyers, designers, typewriters, or members of different companies. Finally, the contract is digitally signed.
PDF Structure and Signature Basics
| A PDF consists of three parts: Body, Xref table, and Trailer |
The PDF is a platform-independent document format. It starts with a Header, to set the version, and is followed by three main parts, as depicted in the figure.
The first part defines the PDF Body. It contains different objects, which are identified by its object number. The most important object is the root object, which is called the Catalog. In the figure, the Catalog has the object identifier 1 0. The Catalog defines the whole PDF structure by linking to other objects in the Body. In the example given, the Catalog links to form object AcroForm, to some PDF MetaData, and to actual PDF Pages. The latter can reference multiple Page objects, which in turn reference, for example, the actual Content, Font, and Images.
The second part of the PDF is the Xref table. It contains references to the byte positions of all objects used in the PDF Body.
The third part is the Trailer. It consists of two further references: one to the byte position at which the Xref table starts, and another link to the identifier of the root object (1 0).
Shadow Attacks
Do the Attacks match a Real-World Scenario?
Different Attack Classes of Shadow Attacks
Shadow Attack: Hide
- Many viewers show warnings if new visible content is added using an Incremental Update. However, they do not warn in most cases if content is removed.
- The objects are still accessible within the PDF. In the example above, the text "You are fired!" can still be detected by a search function. This might be important if an online signing service is used and it reviews the document by searching for specific keywords. We identified two variants of this attack class.
This attack variant uses an Incremental Update to create a new Page object. It contains all previously used objects except for the overlay, for example, the image. This attack variant is depicted on the left side of figure above.
If the viewer application does not accept changes to PDF structuring objects, such as Page, Pages, or Contents, the second attack variant can be applied. This variant directly affects the overlay object. The simplest method for this is to create an Incremental Update, which only updates the Xref table by setting the overlay object to free. However, making this change is interpreted as a dangerous in many viewers (e.g., Adobe) and an error or a warning is thrown. For this reason, we use another approach: we use the same object ID within the Incremental Update, but we define it as a different object type. For example, we change the overlay type Image to XML/Metadata.
When opening this manipulated document, the overlay is hidden because Metadata cannot be shown. Since adding Metadata to a signed PDF using Incremental Update is considered harmless, the signature remains valid.
Shadow Attack: Replace
Replace via Overlay.
This attack targets an interactive feature in PDFs: interactive forms. Forms support different input masks (e.g., text fields, text areas, radio/selection buttons) where users dynamically enter new content and store it in the PDF document. The main idea of the attack is to create a form, which shows one value before (PDF1) and after signing (PDF2), as illustrated on the leftside in the figure below. After the attackers manipulate the PDF and create PDF3, different values are shown in the form (and can be seen on the right side of the figure below). The attack abuses a special property of PDF text fields. A text field can show two different values: the real field value and an overlay value which disappears as soon as the text field is selected. The real value of a form field is contained in an object key named /V. The content of the overlay element is defined within a /BBox object. The /BBox object is comparable to the hint labels known from HTML forms; for example, the hint username to indicate that the username should be entered into a specific login field. In contrast to HTML, in PDF there is no visual difference between the hint and the actual value.
In summary, we can say that this variant allows attackers to manipulate the contents of the text fields for the visible layer arbitrary. As shown in the figure above, this can be used, for example, to maliciously redirect a payment.
Shadow Attack: Hide-and-Replace
In fact, the document contains two independent content paths. One path to show the signer harmless content, and one path with malicious content that replaces the first content after it is signed and activated by the attackers. The figure above visually illustrates the described relationships once again.
This attack variant is the most powerful one since the content of the entire document can be exchanged, including text content, forms, fonts, and annotations. The attackers can build a complete shadow document influencing the presentation of each page and each object.
Evaluation
| Evaluation results. |
Authors of this Post
Christian Mainka
Vladislav Mladenov
Jörg Schwenk
Acknowledgments
- Best Pentesting Tools 2018
- Hacker Tools Apk
- Hacking Tools For Mac
- Pentest Tools Online
- Pentest Tools Tcp Port Scanner
- Pentest Tools Port Scanner
- Hacking Tools 2020
- Hack Tools 2019
- Hacking Tools Hardware
- What Is Hacking Tools
- Hacking Tools Mac
- Hacks And Tools
- Kik Hack Tools
- Hack Tool Apk
- Nsa Hack Tools Download
- Pentest Tools Website
- Hacking Tools Free Download
- Hacking Tools Online
- Best Hacking Tools 2019
- Best Hacking Tools 2019
- Hacking Tools 2019
- Hacker Hardware Tools
- Pentest Tools Alternative
- Hacking Tools Kit
- Hacker Tools For Ios
- Hack Tools For Windows
- Best Hacking Tools 2019
- Pentest Tools Url Fuzzer
- Hacker Tools For Mac
- Nsa Hack Tools
- Free Pentest Tools For Windows
- Pentest Tools Online
- Hack And Tools
- Hack Tools Pc
- Nsa Hack Tools Download
- Hack Tools For Games
- Hacking Tools Hardware
- Hacking Tools And Software
- Pentest Tools Kali Linux
- Pentest Box Tools Download
- Best Hacking Tools 2019
- Pentest Tools Open Source
- Hacking Tools Windows
- Hacking Tools For Pc
- Computer Hacker
- Hacker Tools Software
- Hack Tool Apk No Root
- Hacking Tools For Beginners
- Android Hack Tools Github
- Pentest Tools Windows
- Hacking Apps
- Underground Hacker Sites
- Hacking Tools
- Hacking Tools Free Download
- Hacking Tools For Windows
- How To Install Pentest Tools In Ubuntu
- Hacker Tools For Mac
- Hacker
- Hacking Tools Download
- Pentest Tools List
- Hacking Tools For Windows
- Hacking Tools 2020
- Hacker Tools Apk
- Underground Hacker Sites
- Hacker Tools 2019
- Hacker Tools Mac
- Kik Hack Tools
- How To Install Pentest Tools In Ubuntu
- Tools 4 Hack
- Hacker Tools
- Pentest Tools Alternative
- Hacking Tools Hardware
- Pentest Tools Github
- Kik Hack Tools
- Hacker Tools Free
- Hacker Techniques Tools And Incident Handling
- Hacker Tools Free
- Kik Hack Tools
- Pentest Tools Subdomain
- Pentest Recon Tools
- Hack Website Online Tool
- Pentest Tools Nmap
- Hacking Tools Kit
- Hack Tools For Mac
- Hacker Security Tools
- Hacker Tools Linux
- Hacking Tools Name
- Hacking Tools Online
- Hacker Tools List
- Pentest Box Tools Download
- Hack Tools Online
- Nsa Hacker Tools
- Hacking Tools Hardware
- Hack Website Online Tool
- World No 1 Hacker Software
- Hacking Tools Mac
- Physical Pentest Tools
- Hacker Tools 2019
- Nsa Hacker Tools
- Hacking Tools 2020
- Hacker Tools Free
- Hacker Tool Kit
- Hacking Tools For Windows 7
- Hack Tool Apk
- Hacker Tools Software
- Hacking Tools For Kali Linux
- Best Hacking Tools 2020
- New Hacker Tools
- Pentest Tools For Ubuntu
- Pentest Tools List
- Hack App
- Hacker Tools For Ios
- Pentest Tools Github
- Hacker
- Hack Tool Apk
- How To Hack
- Hacking Tools Mac
- Hacking Tools 2019
- Pentest Tools Website Vulnerability
- Hack Tools For Mac
- Pentest Tools Github
- Hacker Tools List
- Best Hacking Tools 2019
- Usb Pentest Tools
- Hak5 Tools
- Nsa Hacker Tools
- Hak5 Tools
- Hackrf Tools
- Pentest Tools Free
- Hacking Tools And Software
- Hacking Apps
- Hacker Tools Github
- Computer Hacker
- Tools For Hacker
- Hacking Tools For Windows Free Download
- Hacking Tools Usb
- Hacking Tools Kit
- New Hack Tools
- Nsa Hack Tools
- Hack Rom Tools
- Nsa Hack Tools Download
- Hacking Tools For Mac
- Pentest Tools Apk
- Hacking Tools For Windows
- Pentest Tools List
- Pentest Tools Download
- How To Hack
- Game Hacking
- Pentest Box Tools Download
- Bluetooth Hacking Tools Kali
- Pentest Tools Website
- Pentest Box Tools Download
- Pentest Tools Download
- Pentest Tools Tcp Port Scanner
- Hacker Tools List
- Hacker Tools 2019
- Hacking Tools For Windows
- Hacking Tools For Windows
- Hacker Tools Windows
- Pentest Tools Bluekeep
- Beginner Hacker Tools
- Hacker Tools Mac
- Hack Tools Mac
- Hacker Tools 2020
- Hack Tools Mac
- Hacking Tools Mac
- Easy Hack Tools
- Pentest Tools Linux
- Game Hacking
- Hacking Tools Free Download
- Pentest Tools For Android
- Hacker Tool Kit
- Tools Used For Hacking
- Pentest Tools Windows
- Hacker Tools Mac
- Hacker Tools For Pc







