 (1).png)
.png)
This post was extremely helpful.
` 55 | 56 | Assuming the application doesn't perform any other processing of the data, an attacker can submit a malicious comment like this: 57 | 58 | `` 59 | 60 | Within the attacker's request, this comment would be URL-encoded as: 61 | 62 | `comment=%3Cscript%3E%2F*%2BBad%2Bstuff%2Bhere...%2B*%2F%3C%2Fscript%3E` 63 | 64 | Any user who visits the blog post will now receive the following within the application's response: 65 | 66 | `` 67 | 68 | The script supplied by the attacker will then execute in the victim user's browser, in the context of their session with the application. 69 | {% endhint %} 70 | 71 | #### Methodology 72 | 73 | * **Test every endpoint.** 74 | * Parameters or other data within URL query string and message body 75 | * **Find links between entry and exit points.** 76 | * **Systematically work through all data entry points, submitting a specific value into each one and monitoring the application's responses to detect cases where the submitted value appears.** 77 | 78 | ### DOM Based XSS 79 | 80 | * Manipulating the way the JS interacts with the DOM. Typically only run on the client side. 81 | * Document Object model ⇒ programming interface for HTML documents 82 | * JS execution happens directly in the browser without new pages being loaded 83 | * any variable that an attacker can have control over can be leveraged 84 | * e.g used in Juice Box `