Cross-Site Scripting (XSS): Everything Explained In Details

ross-site Scripting known as (XSS or CSS) is a type of vulnerability mostly found in Web Applications, Cross-site Scripting allows an attacker to inject malicious Javascript or any form of code into the vulnerable web app, by fooling the user to click or execute the malicious script in other to steal and manipulate cookie, gathering information from the user, and executing malicious code from the end user computer. A Penetration tester might called CSS which he meant by Cross-site Scripting and A Web Developer mistaken it for Cascading Style Sheet, :), But to clear everything out, just called it XSS.

Types Of Cross-site Scripting Vulnerability

Stored XSS:- This is the type of XSS injected into the target web server like Database, Visitor log, Comment field, Email clients e.t.c, Stored XSS is also referred to as Persistent XSS.
Reflected XSS:- This is the type of XSS injected through injection points like Username field, Input field, Search result, Address bar e.t.c
To steal a user cookie or gather information, the attacker craft a malicious code and send it to the victim through any means like email, social network and so on. When the user click on the attacker link, the browser of the victim executes it.
This picture below explains How XSS Vulnerability Worksxss attackerXSS can be used to Hijack user account and used to spread Web worm and any form of attacks. XSS can be identified using all inputs in a Web Application by injecting the XSS Payloads into it.
XSS Payloads
Mostly this payload is always sanitize by default, or you can see some Web Application firewall that won’t filter it.
But in case the above code is filtered/sanitize, You can try these two payloads and see
Once you see the above code Popup, it means it’s vulnerable to XSS, but once it didn’t, it means its not vulnerable.
injoo xssAs you can see the image above is vulnerable to XSS. 
Check:  Lexus LS+ Concept, A Model Planned For Introduction By 2020