Finding XSS in web applications:

As mentioned in earlier, XSS occurs when the web application receives user input and embeds it into the client side code without properly validating it. In the next few sections, let us discuss how XSS vulnerabilities can be discovered and exploited.

Finding Cross Site Scripting:

Let us launch Xtreme Vulnerable Web Application (XVWA) and navigate to XSS – Reflected. We can also access this challenge directly using the following URL.   The page looks as follows. A user can enter a message in the text field and the entered text will appear back on the web page as shown in the following figure. Web Applications with features like this can be vulnerable to Cross Site Scripting. Let us check if the application is vulnerable to XSS in this case. A look at the page source shows that the user supplied input is inserted into the html source as highlighted below.           

Enter your message here.               

                
                                           <input class=”form-control” width=”50%” placeholder=”Enter URL of Image” name=”item”>
                    
<button class=”btn btn-default” type=”submit”>Submit Button
               
              
            test