Latest posts
-
Lab: Exploiting XXE to retrieve data by repurposing a local DTD
This lab has a “Check stock” feature that parses XML input but does not display the result. To solve the lab, trigger an error message containing the contents of the /etc/passwd file. You’ll need to reference an existing DTD file on the server and redefine an entity from it. https://portswigger.net Visit a product page, click “Check…
-
Lab: Clobbering DOM attributes to bypass HTML filters
This lab uses the HTML Janitor library, which is vulnerable to DOM clobbering. To solve this lab, construct a vector that bypasses the filter and uses DOM clobbering to inject a vector that calls the print() function. You may need to use the exploit server to enable your vector to auto-execute in the victim’s browser. https://portswigger.net…
-
Lab: Exploiting DOM clobbering to enable XSS
This lab contains a DOM-clobbering vulnerability. The comment functionality allows “safe” HTML. To solve this lab, construct an HTML injection that clobbers a variable and uses XSS to call the alert() function. https://portswigger.net
-
API testing
APIs (Application Programming Interfaces) enable software systems and applications to communicate and share data. All dynamic websites are composed of APIs, so classic web vulnerabilities like SQL injection could be classed as API testing. In this topic, we’ll teach you how to test APIs that aren’t fully used by the website front-end, with a focus…
-
Reflected DOM XSS Vulnerability Assessment (as a presentation)
-
Lab: Reflected XSS protected by CSP, with CSP bypass
This lab uses CSP and contains a reflected XSS vulnerability. To solve the lab, perform a cross-site scripting attack that bypasses the CSP and calls the alert function. https://portswigger.net
-
Lab: Reflected XSS in a JavaScript URL with some characters blocked
This lab reflects your input in a JavaScript URL, but all is not as it seems. This initially seems like a trivial challenge; however, the application is blocking some characters in an attempt to prevent XSS attacks. https://portswigger.net The lab will be solved, but the alert will only be called if you click “Back to…
-
Lab: Indirect prompt injection
This lab is vulnerable to indirect prompt injection. The user carlos frequently uses the live chat to ask about the Lightweight “l33t” Leather Jacket product. https://portswigger.net Create a user account Test the attack Exploit the vulnerability
-
Lab: Reflected XSS with event handlers and href attributes blocked
This lab contains a reflected XSS vulnerability with some whitelisted tags, but all events and anchor href attributes are blocked. To solve the lab, perform a cross-site scripting attack that injects a vector that, when clicked, calls the alert function. https://portswigger.net Note that you need to label your vector with the word “Click” in order to induce…
-
Lab: Reflected XSS with AngularJS sandbox escape and CSP
This lab uses CSP and AngularJS. To solve the lab, perform a cross-site scripting attack that bypasses CSP, escapes the AngularJS sandbox, and alerts document.cookie. https://portswigger.net The exploit uses the ng-focus event in AngularJS to create a focus event that bypasses CSP. It also uses $event, which is an AngularJS variable that references the event object.…