Skill 詳細

testing-for-xss-vulnerabilities

Relevant authorized web-security testing specialty.

一致度一致の可能性サイバーセキュリティ 向けにレビュー済み
出典mukul975/anthropic-cybersecurity-skills外部ソース
報告インストール数416人気度の参考値

使用前に確認

自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。

保存された出典プレビュー

SKILL.md

これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。

---
name: testing-for-xss-vulnerabilities
description: Tests web applications for reflected, stored, and DOM-based Cross-Site
  Scripting by injecting JavaScript payloads with Burp Suite (XSS extensions, Active
  Scan++) and browser tools, then bypassing sanitization and CSP to demonstrate session
  hijacking and user impersonation. Use for OWASP WSTG client-side injection testing or
  when evaluating input sanitization and output encoding coverage.
domain: cybersecurity
subdomain: penetration-testing
tags:
- XSS
- cross-site-scripting
- client-side-security
- OWASP-A03
- JavaScript-injection
version: 1.0.0
author: mahipal
license: Apache-2.0
nist_csf:
- ID.RA-01
- ID.RA-06
- GV.OV-02
- DE.AE-07
mitre_attack:
- T1595
- T1190
- T1059
- T1078
- T1055
---
# Testing for XSS Vulnerabilities

## When to Use

- Testing web applications for client-side injection vulnerabilities as part of OWASP WSTG testing
- Evaluating the effectiveness of input sanitization and output encoding across all application features
- Assessing the protection provided by Content Security Policy (CSP) headers against XSS exploitation
- Demonstrating the impact of XSS through session hijacking, credential theft, or phishing overlay to stakeholders
- Testing single-page applications (React, Angular, Vue) for DOM-based XSS in client-side routing and rendering

**Do not use** against applications without written authorization, for deploying persistent XSS payloads that affect real users, or for exfiltrating actual user session tokens from production environments.

## Prerequisites

- Authorized scope defining the target web application and acceptable testing activities
- Burp Suite Professional with XSS-focused extensions (XSS Validator, Reflector, Active Scan++)
- Browser with developer tools and XSS testing extensions (HackBar, XSS Hunter)
- XSS Hunter or Burp Collaborator for out-of-band payload verification
- SecLists XSS payload lists and custom payloads for WAF bypass scenarios


> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

## Workflow

### Step 1: Input and Output Mapping

Map every location where user input enters and is rendered by the application:

- **Reflected inputs**: Test every URL parameter, search field, error message, and HTTP header value that is reflected in the response
- **Stored inputs**: Identify features where input is saved and displayed later: user profiles, comments, forum posts, file names, support tickets, and chat messages
- **DOM inputs**: Identify client-side JavaScript that reads from `location.hash`, `location.search`, `document.referrer`, `window.name`, `postMessage`, or `localStorage` and writes to the DOM
- **Output context identification**: For each reflected input, determine the rendering context:
  - HTML body: `<div>USER_INPUT</div>`
  - HTML attribute: `<input value="USER_INPUT">`
  - JavaScript string: `var x = 'USER_INPUT';`
  - URL context: `<a href="USER_INPUT">`
  - CSS context: `<div style="color: USER_INPUT">`

### Step 2: Reflected XSS Testing

Test reflected injection points with context-appropriate payloads:

- **HTML body context**: `<script>alert(document.domain)</script>`, `<img src=x onerror=alert(1)>`, `<svg onload=alert(1)>`
- **HTML attribute context**: `" onfocus=alert(1) autofocus="`, `" onmouseover=alert(1) "`, `"><script>alert(1)</script>`
- **JavaScript string context**: `';alert(1)//`, `\';alert(1)//`, `</script><script>alert(1)</script>`
- **URL/href context**: `javascript:alert(1)`, `data:text/html,<script>alert(1)</script>`
- **Inside HTML comments**: `--><script>alert(1)</script><!--`
- **Filter bypass payloads** (when basic payloads are blocked):
  - Case variation: `<ScRiPt>alert(1)</sCrIpT>`
  - Event handlers: `<details open ontoggle=alert(1)>`
  - SVG: `<svg><animate onbegin=alert(1) attributeName=x>`
  - En
GitHub で全文を読む (外部ページ)
関連情報

関連する仕事