Cross Site Scripting (XSS)
sible XSS Payload
Potential Vector
hashchange
String Arithmatic
AngularJS
If the part has ng-app, it is possible to get DOM XSS.
Random Payloads
jQuery anchor href attribute using location.search source

jQuery selector sink using a hashchange event
Payload
XSS with AngularJS
Must have ng-app attribute on HTML element
Payload
Reflected DOM XSS
Under the search got another script that is being run


This request will be sent each time we are searching for something

Payload

Stored DOM XSS
There is this script that will run when displaying the comments

There is a escape HTML function being used

The function is being used at the author portion of the form

Payload

Reflected XSS into attribute with angle brackets HTML-encoded
We will realised that the > and < are HTML encoded


Payload
Just put this in the search bar to trigger the XSS

Stored XSS into anchor href attribute with double quotes HTML-encoded
We can see that whatever we put into the website portion, it will get reflected out, in this case http://test

Payload


Canonical Link Tag
In the source, we can see that there is a rel="canonical" attribute in the source code

We can also add anything behind and it will be reflected

Payload
Just add the accesskey and onclick attribute at the back

Reflected XSS into a Javascript string with single quote and backslash escaped
We can see that any input that we give the search bar, it will be reflected on the source on the page


Payload
We will need to escape the <script> tag to trigger the XSS

Reflected XSS into a JavaScript string with angle brackets HTML encoded
Similar to the previous lab, whatever gets put into the search bar, will be reflected on the source


Payload

Reflected XSS into a JavaScript string with angle brackets and double quotes HTML-encoded and single quotes escaped
Similar to the previous lab, whatever gets put into the search bar, will be reflected on the source


Payload
It needs to escape the string to treat it as a single quote

Stored XSS into onclick event with angle bracket and double quotes HTML-encoded an single quotes and backslash escaped
The website field will reflect out in the onclick attribute

Payload


Reflected XSS into a template literal with angle brackets, single, double quotes, backslash and backticks Unicode-escaped
We can see that the search term gets reflected in the <script> tag below


Payload


Exploiting cross-site scripting to steal cookies
The Comment field is vulnerable to XSS


Payload


Exploiting cross-site scripting to capture password
Same as the previous lab, the Comment section is vulnerable to XSS
Payload


Exploiting XSS to bypass CSRF defenses
Same as the previous lab, the Comment field is vulnerable to XSS
Payload

Last updated