Tuesday, 30 May 2023

Shadow Attacks … The Smallest Attack Vector Ever

In July 2020, we introduced a novel attack class called Shadow Attacks. In our recent research, we discovered a new variant of the attack which relies only on an Incremental Update containing a malicious trailer.
A proof-of-concept exploit working on Foxit (Version: 11.0.1.49938) can be downloaded here.

The story so far ...

Shadow attacks are attacks bypassing the integrity protection of digitally signed PDF documents. The attacks abuse two legitimate features in PDF documents which we briefly explain.

Hiding Content

In PDFs, there are multiple techniques to hide content that is not displayed when the document is opened. We, as attackers, usually hide malicious objects without referencing them in the xref section.

Incremental Updates

New content can be appended to a signed PDF document. This is quite dangerous though. The digital signature in PDFs protects a specific range of bytes. Any appended content does not break the signature verification since it is outside this range. As a result, any new Incremental Update does not violate the cryptographic verification of the digital signature. 
But, Incremental Updates are quite dangerous since they may completely change the displayed content of the document. In 2019, we showed different techniques based on Incremental Updates – the Incremental Saving Attacks.
As a countermeasure, most vendors warn if additional content is added after signing the document. BUT … not always!!!
 
There are meaningful use cases where Incremental Updates in digitally signed documents are allowed. For instance, contracts should be signed by multiple parties and each new signature is applied via additional Incremental Update.
Also, PAdES defines Incremental Updates as part of the long-term validation of digitally signed PDFs.
In summary, Incremental Updates are painful from a security perspective. Currently, vendors are trying to estimate whether an Incremental Update is malicious or not by analyzing its content.

Shadow Attacks

Shadow attacks, in general, deceive the PDF applications that an Incremental Update is not malicious. This can be done by providing an Incremental Update with minimal content.
In 2020, we estimated that appending an xref section and a trailer is sufficient to bypass the detection mechanisms of popular applications such as Adobe Reader and Foxit Reader.

Trailer-based Shadow Attack

Three months ago, we tried to reduce the content of the malicious Incremental Update. Our idea was to use only a malicious trailer and still change the content of the entire document when it is opened. Let's see how this can be done. 


The Signer's view on the document

 If a signer gets the document depicted on the left side, he or she sees the content "Sign the document to get a reward".
The document contains a hidden content depicted as red text – the 4 0 obj containing the text "You are fired. Get out immediately" and an xref section pointing to that object. However, the trailer references another xref section, see (1) and (2). Thus, the red text is never shown.
From the signer's perspective, there is no possibility to detect the hidden content by opening and reviewing the document.
As a result, the signer, for example the company director, signs the document.

The Victim's view on the document

We assume that the attacker receives the signed document and manipulates it.
The attacker appends only a trailer that points to the hidden malicious xref section (the red one). When the victim opens the document, the content "You are fired. Get out immediately" is shown.
However, the digital signature validation does not throw any warning since … well … what could go wrong if only a trailer is appended.
 

Honest vs. Malicious Trailer

There are small differences between the honest and the malicious trailer– the byte position of the xref section. Now, the trailer points to the hidden xref section.
trailer
<<
/Size 23
/Prev 18735
/Root 13 0 R
]>>
Honest trailer
trailer
<<
/Size 23
/Prev 19192
/Root 13 0 R
]>>
Malicious trailer
 
 



Impact and Exploit

We successfully applied the new attack on Foxit Reader (Version: 11.0.1.49938). We promptly reported the vulnerability and provided a Proof-of-Concept (PoC) exploit, known as CVE-2021-40326.
Foxit acknowledged the attack and published a security fix with the new version Foxit Reader 11.1.
 
We are not aware of any further implementations vulnerable to this attack.
If you think that your application might be vulnerable to the attack, then just download the exploit and test on your own.
 

Authors of this post

Vladislav Mladenov

Simon Rohlmann

Christian Mainka

Related articles
  1. Hack Rom Tools
  2. Hacker
  3. Hacking Tools 2019
  4. Hacking Tools For Games
  5. Pentest Tools Linux
  6. Hacker Tools For Pc
  7. Hack Tools Online
  8. Hacker
  9. Hack Website Online Tool
  10. Pentest Recon Tools
  11. Pentest Tools Android
  12. Hack Tool Apk No Root
  13. Pentest Tools Url Fuzzer
  14. Hackrf Tools
  15. Hacking Tools Mac
  16. New Hacker Tools
  17. Hacker Tools
  18. Hacker Tools Windows
  19. How To Make Hacking Tools
  20. Bluetooth Hacking Tools Kali
  21. Hacker Tools 2019
  22. Pentest Tools Github
  23. Pentest Tools Android
  24. Hacker Tools Apk
  25. Tools 4 Hack
  26. Hacker Tools Online
  27. Hack Tools Download
  28. Pentest Tools Nmap
  29. Hack Tools Online
  30. Pentest Tools Open Source
  31. Blackhat Hacker Tools
  32. Tools 4 Hack
  33. Hack Tools Github
  34. Hacking Tools For Windows 7
  35. Black Hat Hacker Tools
  36. Hackrf Tools
  37. Pentest Tools Tcp Port Scanner
  38. Hacker Techniques Tools And Incident Handling
  39. Hacker Techniques Tools And Incident Handling
  40. Hacking Tools For Games
  41. Pentest Tools Github
  42. What Is Hacking Tools
  43. Pentest Tools For Windows
  44. Hacker Tools For Windows
  45. Hacker Tools Apk Download
  46. Pentest Tools Subdomain
  47. Hacking Tools Windows 10
  48. Hacker Tools For Ios
  49. Hacker Tools Software
  50. Nsa Hack Tools
  51. Blackhat Hacker Tools
  52. Hacking Tools 2020
  53. Hackers Toolbox
  54. New Hacker Tools
  55. Hack Tools For Windows
  56. How To Hack
  57. Hacking Tools For Windows Free Download
  58. Pentest Tools Free
  59. How To Make Hacking Tools
  60. Hacker
  61. Hacker Tools Software
  62. Wifi Hacker Tools For Windows
  63. Nsa Hacker Tools
  64. Pentest Tools For Ubuntu
  65. Hacking Tools Online
  66. Hacker Tools For Ios
  67. Hacking Tools Online
  68. Best Pentesting Tools 2018
  69. Growth Hacker Tools
  70. Pentest Tools Bluekeep
  71. Hack Apps
  72. Hacker Tool Kit
  73. Beginner Hacker Tools
  74. Pentest Tools Port Scanner
  75. Hacking Apps
  76. Pentest Tools For Ubuntu
  77. Hacker Tools Apk
  78. New Hack Tools
  79. How To Install Pentest Tools In Ubuntu
  80. Hacking Tools Pc
  81. Hack Apps
  82. Hacker Tools Online
  83. Nsa Hack Tools Download
  84. Game Hacking
  85. Physical Pentest Tools
  86. Hak5 Tools
  87. Pentest Tools For Android
  88. Hacker Tools For Mac
  89. Hacking Tools For Beginners
  90. Hack Tools 2019
  91. Pentest Tools Port Scanner
  92. What Is Hacking Tools
  93. Blackhat Hacker Tools
  94. Hackrf Tools
  95. Hack Website Online Tool
  96. Pentest Tools Port Scanner
  97. Hak5 Tools
  98. Pentest Tools For Ubuntu
  99. Easy Hack Tools
  100. World No 1 Hacker Software
  101. Pentest Tools For Android
  102. Pentest Tools Github
  103. Hacker Tools For Ios
  104. Free Pentest Tools For Windows
  105. How To Make Hacking Tools
  106. Top Pentest Tools
  107. Pentest Tools Apk
  108. Best Hacking Tools 2020
  109. Hack App
  110. Hacker Tools Free Download
  111. Black Hat Hacker Tools
  112. Pentest Tools Download
  113. Hacker Tools For Windows
  114. Hacking Tools 2019
  115. Hacking Tools For Windows 7
  116. Hack Tools For Windows
  117. Hack Tools For Mac
  118. Blackhat Hacker Tools
  119. Pentest Tools Download
  120. Hacker Tools For Windows
  121. Hack Tools Mac
  122. Pentest Tools Alternative
  123. Hack And Tools
  124. Tools 4 Hack
  125. Pentest Tools Github
  126. Hacker Tools Linux
  127. Hacker Tools Hardware
  128. Hack Tools Download
  129. Hacking Tools
  130. How To Install Pentest Tools In Ubuntu
  131. Hackrf Tools
  132. Hacking Tools Github
  133. Hacking Tools Free Download
  134. Hacking Tools Github
  135. Hack Tools For Windows
  136. Hacker Search Tools
  137. Hacking Tools Name
  138. Hacking Tools Usb
  139. Pentest Tools Port Scanner
  140. Hacking Tools 2020
  141. Easy Hack Tools
  142. Hacker Tools Apk Download
  143. Hack Tools 2019
  144. Hacker Tools Linux
  145. Nsa Hack Tools Download
  146. Physical Pentest Tools
  147. Hacker Tools List
  148. Pentest Tools Github
  149. Blackhat Hacker Tools
  150. Tools Used For Hacking
  151. Hack Tools 2019
  152. Hacking Tools 2019
  153. Hack Tools Download
  154. Hacker Tools Github
  155. Pentest Tools Windows
  156. Pentest Tools Github
  157. Hacking Tools Mac
  158. Pentest Tools Find Subdomains
  159. Pentest Tools Download
  160. Pentest Tools Apk
  161. Hacker Tools List
  162. Hacking Tools For Kali Linux
  163. Hacker Security Tools
  164. Hacking Tools For Windows
  165. Game Hacking
  166. Github Hacking Tools
  167. Free Pentest Tools For Windows
  168. Hack Tool Apk
  169. Hackers Toolbox
  170. Hacker Tools For Pc
  171. Hacker Tools Linux
  172. Install Pentest Tools Ubuntu
  173. Hack Tools Online
  174. Hacking Tools Download
  175. Hak5 Tools

No comments:

Post a Comment