DOM-Based
Last updated
Was this helpful?
Last updated
Was this helpful?
Attackers can inject malicious scripts that execute within the user's browser, potentially leading to data theft, unauthorized actions, or site defacement.
The example below is based on TCM's course.
When an item is added to the below to-do application, no network traffic is generated (Figure 1).
If we try a common JavaScript payload, we get a prompt box back (Figure 2).
We can also use the above attack to redirect the user to another location (Figure 3).
DOM Invader was able to identify a Sink associated with document.write
. We can find more about it when we click the Stack Trace
link (Figure 5.3) as well as exploit it by clicking on the Exploit
button (Figure 5.4).
The response of the application's /product
directory contains an interesting piece of code (Figure 6).
If we manipulate the storeId
parameter, we notice that it ends up within a select
statement (Figure 7).
We can terminate the select
statement and then pass our payload to achieve XSS (Figure 8).
The example below is based on PortSwigger's lab.
We can automatically enumerate Sinks using the extension within Burp's Chromium browser (Figure 4).
The example below is based on PortSwigger's lab.
storeId
parameter.