Objective
Write a basic alert script in the box, like the following and click the search button.
This will pop an alert on the page.
Also if you view the page source you can see our payload.
Write a basic alert script in the box, like the following and click the search button.
This will pop an alert on the page.
Also if you view the page source you can see our payload.
The first step of the payload is to set the location property which is a built-in JavaScript object that represents the URL of the current page, and setting it to a new URL is constructed using a template string that includes the following components...
View the page source and observe that your canary is between the angularJS script. Remember that you are dealing with angularJS sandbox, that means regular attack vectors are not going to work. For being able to deliver a successfull XSS attack you have to bypass the angularJS sandbox.
Try to inject another input to the Website input field. But this time make sure you use single quotes in your input, then observe single quotes has been escaped by backslash.