Hello HF members, I'm Kodaz and this will be my first tutorial posted on HackForums. I want to start by saying
I am not responsible of what you use this knowledge for. This tutorial is intended for Educational purposes only.
I am not responsible of what you use this knowledge for. This tutorial is intended for Educational purposes only.
1. Introduction
2. Finding vulnerable websites
3. Testing for Vulnerabilities
4. Types of Exploits you can execute
2. Finding vulnerable websites
3. Testing for Vulnerabilities
4. Types of Exploits you can execute
1. INTRODUCTION
In this tutorial you will learn about a known vulnerability in websites known as XSS.
Let's start off with the definition of Cross Site Scripting known as XSS.
XSS is a security breach that takes advantage of dynamically generated Web pages. In an XSS attack, a Web application is sent with a script that activates when it is read by an unsuspecting user s browser or by an application that has not protected itself against cross-site scripting.
2. FINDING VULNERABLE WEBSITES
Most people find these type of vulnerable websites by using Google dorks or they run scans on certain websites they are paid for to pentest with permission.
Google Dorks are basically search queries on Google that find the type of website you're looking for... For example:
![[Image: 9edA3Nn.png]](https://i.imgur.com/9edA3Nn.png)
As you can see i used the dork “.php?q=” and it came up with website links that finish in what i just Googled. This is an example of how to use Google Dorks.
3. TESTING FOR VULNERABILITIES
Once you get the search results on Google, You can go ahead and test to see if the website is vulnerable to XSS.
![[Image: f4rcWL0.gif]](https://i.imgur.com/f4rcWL0.gif)
Once you enter anything on the search bar you can go ahead and do CTRL+U in your browser and it will open up view source. Or just right click anywhere and select view source.
Keep in note where your search query was placed by doing CTRL+F and searching BTS.
![[Image: 4GxFYlu.gif]](https://i.imgur.com/4GxFYlu.gif)
So now we are going to go ahead and check if the server sanitizes our code or not. So we will type in <"script"> without quotes on the search query and once again check where the input was placed on view source.
![[Image: KZ94nRc.gif]](https://i.imgur.com/KZ94nRc.gif)
Now we can see that the code went through without being blocked by the website. Which means we can go ahead and execute any code we want.
But first, We want to go ahead and make sure that the website is 100% vulnerable so we're just going to type in this on the search bar,
![[Image: qwBowyp.gif]](https://i.imgur.com/qwBowyp.gif)
If it was successful the page will follow up with a pop up that might look like this.
![[Image: 5PBvRa7.gif]](https://i.imgur.com/5PBvRa7.gif)
Now we know the website is completely vulnerable and we can proceed to execute all type of code... Malicious or not. There is also different types of XSS which I'm going to explain now.
Persistent XSS = This type of XSS is when the script entered by the hacker is stored on the server. For example, If a person tries to access the search section it will execute the code you saved on the server on their machine and you can proceed to steal their cookies and stealing their accounts.
Non Persistent XSS = This type of XSS is also known as Reflected XSS, Which is the most common one these days. The code entered will be sent to the server as a HTTP Request, So let me explain... If you search something up on a vulnerable search bar it will come up like "search results for 'word' " If the server fails to block the entered code It will execute the injected script. However this type of XSS is not persistent which means only you can see the executed code.
4. TYPES OF EXPLOITS YOU CAN EXECUTE
Stealing identity and Confidential DataBypassing website restrictions Session Hijacking
Malware attack Website Defacement
DoS attack
Thank you all for reading and I hope I was of help to somebody in the community.
If you liked it please let me know in the comments and i will continue to write more tutorials.



