In this walk through, we will be going through the Frame Source Injection (Document Viewer) vulnerability section from Mutillidae Labs. We will be exploring and exploiting Frame Source Injection in Document Viewer and learn how application are affected because of it. So, let’s get started with the Hacking without any delay.

Table of Contents
Security Level: 0 (Hosed)
- Setting the security level to 0 or Hosed.

- The application has a functionality to view documents, we have to choose from the specified documents on the front end and the results will be shown in a box below.

- I intercepted the request and changed the document path to the below payload which generate a pop alert.

<iframe srcdoc='<script src="data:text/javascript,alert(1)"></script>'></iframe>



Also Read: Mutillidae – Cross-Site Scripting (Reflected)
Conclusion:

So, we finally completed all the security levels for the Frame Source Injection (Document Viewer) Vulnerability. We looked into the various ways how application has been set up in various levels and how we can bypass the security controls implemented. Next, we can mitigate the potential Frame Source Injection attacks by using the frame-ancestors
directive in a Content-Security-Policy HTTP response header to indicate whether or not a browser should be allowed to render a page in a <frame>
or <iframe>
. Sites can use this to avoid Clickjacking attacks by ensuring that their content is not embedded into other sites. On that note, i will take your leave and will meet you in next one with another Mutillidae vulnerability writeup, till then “Keep Hacking”.