📖
NOTES
  • Welcome!
  • Reference
    • Hacking
      • Penetration Testing Resources Bookmarks
        • Research Links
        • Cheat Sheet
        • Learning/Training
        • Tools
        • Payloads
        • Shell
        • AI
        • Reads
        • Podcast
        • Social Engineering
        • Payloads
      • Web/App Pentesting
        • SQL Injection
          • SQL Injection In The URL
          • SQL Injection In The Search Field
          • SQL Injection in Login forms
          • Boolean SQL Injection Blind
          • Time based SQL Injection Blind
          • Bypassing SQL Filters
          • SQL Injection with sqlmap
          • XPath Injection - Authentication Bypass
            • XPath Advanced Data Exfiltration
          • Payloads
        • XSS
          • Payloads
          • XSS Reflected
          • XSS Stored
          • Dom-based
          • Blind
        • Command Injection
          • Payloads
        • File Upload
          • Payloads
          • Bypass Filters
          • File Upload Tricks
        • SSRF
          • Payloads
        • LFI/RFI
          • Payloads
        • LDAP Injection
      • Port Swigger
        • Access control
          • Lab: Unprotected admin functionality
          • Unprotected admin functionality with unpredictable URL
          • User role controlled by request parameter
          • User ID controlled by request parameter, with unpredictable user IDs
          • User ID controlled by request parameter with password disclosure
        • Authentication
          • Username enumeration via different responses
        • Server-side request forgery (SSRF)
          • Basic SSRF against the local server
          • Basic SSRF against another back-end system
        • File Upload Vulnerabilities
          • Remote code execution via web shell upload
        • SQL Injection
          • SQL injection vulnerability in WHERE clause allowing retrieval of hidden data
      • Burp
        • Setting up Macro for intruder
      • ☁️Cloud
        • Tools
        • AWS
          • 🪣S3 Buckets
          • Amazon IAM
          • Dockers
            • Tools
        • Azure
        • GCP
      • Networking
        • Cheat Sheet
      • Hardware Hacking
        • Computer BIOS
    • HTML/CSS/JAVA
      • Tools
      • HTTP Response Status Codes
      • Bootstrap Templates
      • SSL
      • cURL
      • Grep
    • DataBase
      • My SQL
        • Cheat Sheet
        • Tools
    • PYTHON3
      • Code Resources
      • Python Reference Guide
        • Cheat Sheet
      • Code Projects
        • Jiggler Mouse
        • loan calculator
        • Bilnd LDAP Data Exfiltration
    • SEO
      • Tools
      • On-Page SEO
      • Local SEO and Keyword Research
      • Content Optimization
      • Technical SEO
      • Off-Page SEO Tools
      • Google Ads
    • Cloud
      • AWS
        • Light Sail
          • Hosting Website on Light Sail and Namecheap
        • Boto3
      • Azure
      • GCP
    • Files
      • PDF
Powered by GitBook
On this page
  1. Reference
  2. Hacking
  3. Web/App Pentesting

XSS

Overview Cross-Site Scripting (XSS)

  1. Types of XSS Attacks:

    • Stored XSS: Malicious scripts stored on the target server, executed when a user accesses the infected page, commonly found in forums or comment sections.

    • Reflected XSS: Scripts included in URLs or input fields, executed when a user submits the malicious input, often seen in search boxes or contact forms.

    • DOM-based XSS: Vulnerabilities within the website's DOM, occurring when client-side scripts write user-provided data to the DOM without proper sanitization.

    • Blind XSS: Payloads are injected into areas not immediately visible to the attacker, like logs or admin panels, and are executed when these areas are accessed by a legitimate user.

  2. Advanced XSS Detection and Exploitation Techniques:

    • Fuzzing and Automated Scanning: Use tools like Burp Suite for automated scanning with custom payloads to bypass input filtering.

    • Manual Testing and DOM Inspection: Engage in manual testing for complex scenarios and inspect the DOM for JavaScript vulnerabilities.

    • Sophisticated Payload Crafting: Develop context-specific payloads, focusing on filter evasion and exploiting browser peculiarities.

    • Blind XSS Detection: Utilize services like XSS Hunter for identifying blind XSS execution.

  3. Mitigation Strategies and Security Practices:

    • Input Sanitization and Validation: Properly sanitize all user inputs to remove or encode harmful scripts.

    • Content Security Policy (CSP): Implement CSP to specify trusted sources and prevent execution of unauthorized scripts.

    • Escaping Data: Escape user inputs so they are treated as data, not executable code.

    • Use of Secure Frameworks: Employ modern web frameworks with built-in XSS protections.

    • Regular Security Audits: Conduct continuous audits and stay updated on evolving XSS techniques.

  4. Additional Security Considerations:

    • HTTP-only Cookies: Use HTTP-only cookies to prevent script access to sensitive cookies.

    • SameSite Cookie Attribute: Implement this attribute to prevent cookies from being sent along with cross-site requests, mitigating potential CSRF attacks.

  5. Reporting, Remediation, and Ethical Considerations:

    • Detailed Reporting: Provide clear and comprehensive reports detailing vulnerabilities, impacts, and remediation steps.

    • Remediation Strategies: Recommend output encoding, input validation, secure coding practices, and regular security training.

    • Responsible Disclosure: Adhere to ethical guidelines and responsible disclosure processes.

PreviousPayloadsNextPayloads

Last updated 1 year ago