DOM-XSS
Last updated
Last updated
(DOM) is a web browserβs hierarchical representation of the elements on the page.
Websites can use JavaScript to manipulate the nodes and objects of the DOM.
You Can Know More About DOM from or
As well as their properties. DOM manipulation in itself is not a problem. In fact, it is an integral part of how modern websites work.
DOM-based vulnerabilities arise when a website contains JavaScript that takes an attacker-controllable value, known as a source and passes it into a dangerous function, known as a sink.
it is important to first familiarize yourself with the basics of taint flow between sources and sinks.
A source is a JavaScript property that accepts data that is potentially attacker-controlled.
Common Sources
A sink is a potentially dangerous JavaScript function or DOM object that can cause undesirable effects if attacker-controlled data is passed to it. For example, the eval() function is a sink because it processes the argument that is passed to it as JavaScript. An example of an HTML sink is document.body.innerHTML because it potentially allows an attacker to inject malicious HTML and execute arbitrary JavaScript.
Common Sinks
DOM-based vulnerabilities arise when a website passes data from a source to a sink, which then handles the data in an unsafe way in the context of the clientβs session.
The most common source is the URL, which is typically accessed with the location
object. An attacker can construct a link to send a victim to a vulnerable page with a payload in the query string and fragment portions of the URL.
There is a reason why it has been in OWASP for 2013 and 2017. XSS can have huge implications for a web application and its users. User accounts can be hijacked, credentials could be stolen, sensitive data could be exfiltrated, and lastly, access to your client computers can be obtained.
The majority of DOM XSS vulnerabilities can be found quickly and reliably using Burp Suiteβs web vulnerability scanner. To test for DOM-based cross-site scripting manually, you generally need to use a browser with developer tools, such as Chrome. You need to work through each available source in turn and test each one individually.
You can read my portswigger DOM labs Solutions from my Notes in this
From 29Ep : 35Ep
: Install this Machine and will have a lot of Labs like DVWA, BWAPP, Webgoat, etc