Portswigger Reflected XSS in canonical link tag

Hacking Truth
0




Lab: Reflected XSS in canonical link tag



This lab reflects user input in a canonical link tag and escapes angle brackets.


To solve the lab, perform a cross-site scripting attack that injects an attribute that calls the alert function.


To assist with your exploit, you can assume that the simulated user will press the following key combinations: Portswigger Reflected XSS in canonical link tag


    ALT+SHIFT+X
    CTRL+ALT+X
    Alt+X


Please note that the intended solution to this lab is only possible in Chrome Or Mozilla .

Canonical Link Tag

 

A canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your site. For example, if you have URLs for the same page (for example: example.com? dress=1234 and example.com/dresses/1234), Google chooses one as canonical.


 

Are canonical tags necessary?
 

You should be adding a canonical tag wherever you have duplicate content on your site. Similar content: Let's say you have an e-commerce store with products that are very similar but may have slight differences between them. In this case, most SEO experts say you should use canonical tags.


 

 

 

Lab Here  :-  Click Me

 



 

Solution


Visit the following URL, replacing your-lab-id with your lab ID:


https://your-lab-id.web-security-academy.net/?%27accesskey=%27x%27onclick=%27alert(1)


This sets the X key as an access key for the whole page. When a user presses the access key, the alert function is called.


To trigger the exploit on yourself, press one of the following key combinations:


    On Windows: ALT+SHIFT+X
    On MacOS: CTRL+ALT+X
    On Linux: Alt+X





Video Tutorial :- 



   

 

Disclaimer


This was written for educational purpose and pentest only.
The author will not be responsible for any damage ..!
The author of this tool is not responsible for any misuse of the information.
You will not misuse the information to gain unauthorized access.
This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!


All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on www.hackingtruth.in is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.


All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.



- Hacking Truth by Kumar Atul Jaiswal



I hope you liked this post, then you should not forget to share this post at all.
Thank you so much :-)


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
Our website uses cookies to enhance your experience. Learn More
Accept !