-
Notifications
You must be signed in to change notification settings - Fork 0
Ops 401: Class 36
Nicholas Loiacono edited this page Jun 5, 2023
·
1 revision
This topic matters as it relates to what I'm studying in this module because understanding XSS is critical as it's one of the most common web application vulnerabilities. The goal is to understand how such attacks occur, their potential impact, and strategies to prevent them, which directly contributes to the broader aim of protecting digital infrastructure and data.
A cross-site scripting attack is like a puppet master trick. An attacker tricks a website into giving a user's browser malicious instructions. When the user visits the website, these instructions run in the user's browser and make it do things it shouldn't, like revealing personal information or performing unwanted actions.
- Reflected XSS: This is when the attacker tricks a user into clicking a specially crafted link which makes the website respond with malicious instructions.
- Stored XSS: This is when the attacker manages to store the malicious instructions on the website itself. Whenever a user visits that part of the website, they receive the malicious instructions.
- DOM-based XSS: This is when the website's own code unknowingly helps the attacker create malicious instructions. The website reads some data (like the URL or parts of the webpage), and the attacker manipulates this data to produce these instructions.
- Pretend to be the user on the website.
- Perform actions on the website as if they were the user.
- Access the user's data on the website.
- Capture the user's login information.
- Change how the website looks to the user.
- Insert harmful functions into the website.
- Filter input: Only allow expected or valid user inputs to be processed.
- Encode data: When showing user-controlled data on the website, ensure it's shown as plain text and not as active instructions.
- Use response headers: These can tell the user's browser how to interpret the website's responses, helping to avoid confusion.
- Content Security Policy: This is like a safety net that can limit the impact of any cross-site scripting attacks that might still happen.
Things I want to know more about are the exact mechanics of launching XSS attacks, how to conduct penetration testing for XSS vulnerabilities, or advanced defense mechanisms such as sandboxing and the use of secure coding practices.
Cross-site scripting Port Swigger. Retrieved June 04, 2023 from Web Security >> Cross-Site Scripting