SKF write-ups
Python - XSS-href

Running the app Docker

$ sudo docker pull blabla1337/owasp-skf-lab:xss-url
$ sudo docker run -ti -p blabla1337/owasp-skf-lab:xss-url
Now that the app is running let's go hacking!

Running the app Python3

First, make sure python3 and pip are installed on your host machine. After installation, we go to the folder of the lab we want to practise "i.e /skf-labs/XSS/, /skf-labs/jwt-secret/ " and run the following commands:
$ pip3 install -r requirements.txt
$ python3 <labname>
Now that the app is running let's go hacking!
Docker image and write-up thanks to !


Step 1

The application invites you to fill a website in the input box, that will be used from the "visit my website!" link to redirect to it.
If we insert, and click on "visit my website!" we will be redirected to the Google website. As we can see in the screenshot below our input is reflected in the page inside an href attribute.

Step 2

The next step is to see if we could include JavaScript that can be executed in the href attribute.
href="javascript:JS PAYLOAD"
Autoescape is disabled by default so every characters will be reflected in the following snippet in the template.
<center> <p style="font-size:2em;">
<div data-gb-custom-block data-tag="autoescape" data-0='false'> <a style="font-size:20px;" href="{{xss}}">visit my website!</a> </div>


Step 1

Now we have seen where the user input is being reflected in the href, we can craft the payload to trigger an alert box and exploit our XSS.
and clicking the button, we achieve what we were looking for.

Additional sources

Please refer to the OWASP testing guide for a full complete description about path traversal with all the edge cases over different platforms!