- Challenge 5.1: Persisted XSS with Postman
- Challenge 5.2: Persisted XSS with Postman (2)
- Challenge 5.3: Persisted XSS through the UI
- Challenge 5.4: Reflected XSS
- Challenge 5.5: DOM XSS
Cross-Site scripting (XSS) is the injection of malicious code in web applications. It allows attackers to execute JavaScript in the browser of another user. This can lead to session stealing, account takeover or the download of malicious software, as the code of the attacker becomes a part of the HTML source of the application.
HINT: Install Postman if you haven't done yet.
Try to perform a persisted XSS attack by affecting the table of the Users with Postman. Every call of the administration section should alert a dialog with the content xss
.
To perform XSS, use iframe: <iframe src="javascript:alert(`xss`)"/>
.
-
Tip: Try to interact with the users API.
-
Tip: If you have solved Challenge 2.2, you will know how to interact with the users API.
-
Tip: You have to send a POST call.
-
Tip: Consider that there are several parameters that you must pass, although the content of these parameters doesn't matter for your result.
-
Tip: There might be characters you must escape.
Try to perform a persisted XSS attack by affecting the table of the Products with Postman. Every call containing the new product should alert a dialog with the content xss
.
To perform XSS, use iframe: <iframe src="javascript:alert(`xss`)"/>
-
Tip: Try to interact with the products API.
-
Tip: The process is nearly similar to Challenge 5.1, so have a look at the tips for this challenge.
-
Tip: Consider that you need an authorization.
-
Tip: Look about the session token.
Try to perform a persisted XSS attack by affecting the list of the customer feedback. Every call containing customer feedback should alert a dialog with the content xss
.
To perform XSS, use iframe: <iframe src="javascript:alert(`xss`)"/>
-
Tip: Customer feedback can be given here:
http://localhost:3000/#/contact
. -
Tip: You have to modify the iframe element, as the common input won't be rendered as the similar output.
-
Tip: While visiting sites that contain customer feedback, check the sources (tab
Inspector
in Firefox or tabElements
in Chrome) to recognize how the iframe element is embedded in the HTML sources.
Try to perform a reflected XSS attack by finding a suitable input field.
To perform XSS, use iframe: <iframe src="javascript:alert(`xss`)"/>
-
Tip: To find the suitable area, you have to log in first with any account.
-
Tip: Have a look at the options of the account area.
Try to perform a DOM-based XSS attack by finding a suitable input field.
To perform XSS, use iframe: <iframe src="javascript:alert(`xss`)"/>
- Tip: The input field you need here is not hidden at all.