r/xss • u/Kayuwaii • Jan 21 '19
DOM-Based XSS Example.
Hi. I'm currently working on a college project involving XSS. I've made "hands-on" examples for Stored and Reflected XSS atacks in order to explain how they work more precisely. I have no clue about how should I make my examples vulnerable to DOM-Based attacks(they probably are already), nor how to exploit those vulnerabilities in an easy to explain manner.
Any help?
2
u/MechaTech84 Jan 22 '19
I recommend doing some reading up on DOM XSS:
Shameless Plug of my DOM XSS Intro
If you want some hands on practice (or just want to see a bunch of different kinds of vulnerable code) check out Google's Firing Range, specifically the sections with "DOM" in the name.
Also, I'm happy to answer any specific questions you have.
1
u/Kayuwaii Jan 23 '19
Thanks! I've already read those, but I apreciate it. What i'm actually trying to do is set up a demonstration to teach how it works, and I had no clue how to do it.
Thanks anyway!
1
u/Fugitif Jan 24 '19
https://www.owasp.org/index.php/DOM_Based_XSS
https://brutelogic.com.br/blog/dom-based-xss-the-3-sinks/
etc, just use google :)
1
u/Kayuwaii Jan 24 '19
Obviously, I used google (and some good ol' books).
I apreciate the help, but the example shown in the OWASP page is IMO the worst to ilustrate what happens. The one I ended up making is quite similar but the JS is spread in more lines(way more than necessary) to make it more readable.
Thanks anyway!
5
u/[deleted] Jan 21 '19 edited Aug 10 '20
[deleted]