XSS with w3af, DVWA.md - Juan-bit94/Ops401D10 GitHub Wiki

XSS with w3af, DVWA

Why does this topic matter?

  • XSS is a major concern for cybersecurity professionals because it represents a common and exploitable vulnerability that can lead to data breaches, reputation damage, and legal consequences for organizations.
  • By understanding XSS, an organization can implementing effective mitigation strategies are essential components of a robust cybersecurity posture.

Explain how a cross-site scripting attack works in non-technical terms.

  • Cross site scripting attacks essentially tricks the browser into running code that could compromise the visiting website. It could give away information about users of the website or even compromise other computers that are using the site.

What are the three types of XSS attacks?

  • Here are the three types of cross site scripting (XSS) attack:
  1. Reflected XSS: The malicious script comes from the current HTTP request.
  2. Stored XSS: The malicious script comes from the website's database.
  3. DOM-based XSS: The vulnerability exists in client side code rather than server-side code.

If an attacker successfully exploits a XSS vulnerability, what malicious actions would they be able to perform?

  • There are many malicious actions that could be performed if a XSS is successful.
  1. Threat actor could impersonate the victim user.
  2. Carry out any action that the user is able to perform.
  3. Read any data that the user is able to access.
  4. Capture the user's login credentials
  5. Perform virtual defacements on the site and inject trojan functionality into the web site.

What are some security controls that can be implemented to prevent XSS attacks?

  • Here are some ways to prevent XSS attacks
  1. Filer input on arrival: At user input is received, filters are used to only take in what is expected or valid input.
  2. Encode data on output: This prevents user output form being interpreted as active content.
  3. Use appropriate response headers: To prevent XSS in HTTP responses that are not intended to contain any HTML or JavaScript.
  4. Content Security Policy: As a last line of defense, a user content security policy (CSP) can help reduce the severity of any XSS issues.

Things I want to know more about.

  • I would like to know how to prevent XSS on the popular languages such as PHP, Java, and HTML.