What I learned from suffering my first and last XSS attack
livesshattack.net
What I learned from suffering my first and last XSS attack
1–10 of 43 posts
Re: What I learned from suffering my first and last XSS attack
#2- Content-Security-Policy https://developer.mozilla.org/en-US/docs/Web/Security/CSP/In...
- The sandbox attribute on iframes: https://developer.mozilla.org/en/docs/Web/HTML/Element/ifram...
XSS is one of the hardest things to keep under control at scale.
Re: What I learned from suffering my first and last XSS attack
#3Some modern tools to mitigate XSS/make XSS virtually impossible: - Content-Security-Policy https://developer.mozilla.org/en-US/docs/Web/Security/CSP/In... - The sandbox attribute on iframes: https://developer.mozilla.org/en/docs/Web/HTML/Element/ifram... XSS is one of the hardest things to keep under control at scale.
Re: What I learned from suffering my first and last XSS attack
#4Some modern tools to mitigate XSS/make XSS virtually impossible: - Content-Security-Policy https://developer.mozilla.org/en-US/docs/Web/Security/CSP/In... - The sandbox attribute on iframes: https://developer.mozilla.org/en/docs/Web/HTML/Element/ifram... XSS is one of the hardest things to keep under control at scale.
CSP prevents an attacker from executing scripts, but the attacker can still corrupt your HTML.
Re: What I learned from suffering my first and last XSS attack
#5Some modern tools to mitigate XSS/make XSS virtually impossible: - Content-Security-Policy https://developer.mozilla.org/en-US/docs/Web/Security/CSP/In... - The sandbox attribute on iframes: https://developer.mozilla.org/en/docs/Web/HTML/Element/ifram... XSS is one of the hardest things to keep under control at scale.
A much better way to mitigate XSS/HTML injections is not using string functions to generate HTML. CSP prevents an attacker from executing scripts, but the attacker can still corrupt your HTML.
Re: What I learned from suffering my first and last XSS attack
#6Some modern tools to mitigate XSS/make XSS virtually impossible: - Content-Security-Policy https://developer.mozilla.org/en-US/docs/Web/Security/CSP/In... - The sandbox attribute on iframes: https://developer.mozilla.org/en/docs/Web/HTML/Element/ifram... XSS is one of the hardest things to keep under control at scale.
A much better way to mitigate XSS/HTML injections is not using string functions to generate HTML. CSP prevents an attacker from executing scripts, but the attacker can still corrupt your HTML.
Re: What I learned from suffering my first and last XSS attack
#7Some modern tools to mitigate XSS/make XSS virtually impossible: - Content-Security-Policy https://developer.mozilla.org/en-US/docs/Web/Security/CSP/In... - The sandbox attribute on iframes: https://developer.mozilla.org/en/docs/Web/HTML/Element/ifram... XSS is one of the hardest things to keep under control at scale.
There's no excuse to not start new projects off with a CSP rule like that. Doing it from the start means you won't ever have to comb through your codebase later to remove all bits of inline javascript that you depend on to get the benefits.
Re: What I learned from suffering my first and last XSS attack
#8Earlier quoted context omitted.
A much better way to mitigate XSS/HTML injections is not using string functions to generate HTML. CSP prevents an attacker from executing scripts, but the attacker can still corrupt your HTML.
Yep. XSS isn’t at all hard to prevent if you’re using tools that are safe by default. Unfortunately, popular ones like jQuery aren’t. (This, more than any other, is a reason to prefer the DOM API.)
Re: What I learned from suffering my first and last XSS attack
#9Some modern tools to mitigate XSS/make XSS virtually impossible: - Content-Security-Policy https://developer.mozilla.org/en-US/docs/Web/Security/CSP/In... - The sandbox attribute on iframes: https://developer.mozilla.org/en/docs/Web/HTML/Element/ifram... XSS is one of the hardest things to keep under control at scale.
A much better way to mitigate XSS/HTML injections is not using string functions to generate HTML. CSP prevents an attacker from executing scripts, but the attacker can still corrupt your HTML.
Re: What I learned from suffering my first and last XSS attack
#10Some modern tools to mitigate XSS/make XSS virtually impossible: - Content-Security-Policy https://developer.mozilla.org/en-US/docs/Web/Security/CSP/In... - The sandbox attribute on iframes: https://developer.mozilla.org/en/docs/Web/HTML/Element/ifram... XSS is one of the hardest things to keep under control at scale.
https://github.com/paragonie/csp-builder
I'm working this week to integrate it into another project we're developing. (It's MIT licensed, so have fun with it.)