“These courses expects a high standard of professionalism from its students with regard to how security testing is conducted. We expect all students to act in good faith at all times […]”
TL;DR Don’t be mean
Marks released… soon???
Feedback released tonight, maybe..
<script>...</script>
<img onerror="..." src="aaa">
document.write(...)
What - User content is rendered as HTML
How - The server unsafely puts user content into the response body of a request. The browser interprets the payload as if it was legitimate HTML
The payload is part of user input
(i.e. URL bar, inside a cookie, etc)
Demo: Reflected XSS
website.com/?q=<img onerror="alert('pwned!')" src="http://google.com">
The payload is stored in some sort of database.
Arguably more dangerous… Anyone who opens a page that returns content from that same database may be victim to a stored XSS attack
Demo: Stored XSS
The client pieces together data which eventually becomes an exploit itself.
i.e.
document.write(...)
Don’t use .innerHTML
or .outerHTML
use .innerText
or .textContent
Demo: DOM XSS
JS Frameworks
X-XSS-Protection
header
Turn it off, it’s broken 🔥 🌊🚒
✅ X-XSS-Protection: 0
"Firefox never supported X-XSS-Protection and Chrome and Edge have announced they
are droppinghave dropped support for it.“
Only allow scripts / images / styles / … from ____
it kinda OP.
Â
Challenges due this Sunday!