Cross-Site Scripting: Stored, Reflected, and DOM

XSS testing should only be performed in a lab or on an authorized system. Examine Request/Response, server behavior, Roles, State, and impact, using minimal tests that do not damage data.
Web and API security testing should examine the boundaries of trust, permissions, input, state, and business logic. Every test in this article is intended for a lab, CTF, or a system for which explicit permission has been granted. This article focuses on XSS testing and is intended for Web PT students and developers. The goal is to provide a working method that can be applied in practice, during professional interviews, and in a work environment, without settling for a dictionary definition.
The main challenge is that data is almost always incomplete. Context, encoding, and CSP can indicate a direction, but their meaning depends on time, asset, user, and expected activity. Therefore, we will build the test around an investigative question, required evidence, and clear criteria for completion.
The practical scenario in the article is: Mapping Input-to-Sink in a lab application. All examples are lab data or descriptions of processes. When dealing with Penetration Testing, Web, or Cloud, one must work only with explicit authorization, a defined Scope, and the ability to stop the test.




