--- name: attack-surface-xss description: Reconnaissance skill for XSS attack surface — analyzes headers, frameworks, JS libraries, and DOM patterns at a URL to map what makes XSS possible or harder. For ethical hackers preparing for XSS testing. disable-model-invocation: true aliases: - xss-recon - xss-surface - xss-attack-surface version: 0.0.1 author: Herman Stevens tags: [security, xss, reconnaissance, attack-surface, web-security] allowed-tools: [Bash, WebFetch, Read, Grep, Glob] --- # XSS Attack Surface Reconnaissance Map the XSS attack surface of a target URL. Analyze security headers, client-side frameworks, JavaScript patterns, and DOM structure to identify what makes XSS possible, easier, or harder. **This skill does NOT inject payloads or test for XSS.** It performs passive observation only (HTTP requests + source analysis). For active XSS testing, use `/xss-finder`. **Target:** $ARGUMENTS (URL to analyze) ## When to Use This Skill - Before running `/xss-finder` — understand what defenses exist - Scoping an XSS engagement — identify highest-value test targets - Evaluating a site's XSS posture without active testing - Mapping client-side technology stack for exploit development - Identifying which XSS classes (reflected, stored, DOM) are most likely ## Core Capabilities | Capability | Description | |------------|-------------| | Header Assessment | CSP, X-Content-Type-Options, cookie flags, charset | | Framework Detection | React, Angular, Vue, jQuery + version extraction | | Vulnerable Library Detection | Known CVEs per detected library version | | DOM XSS Source/Sink Mapping | innerHTML, eval, location.hash, postMessage | | Input Vector Enumeration | Forms, hidden fields, URL parameter reflection | | Attack Priority Ranking | Ordered list of where to focus XSS testing | ## Workflow ### Phase 1: Fetch Target Retrieve response headers and page content from $ARGUMENTS: ```bash # Response headers (follow redirects) curl -sI -L "$URL" # Full page body (HTML + inline JS) curl -sL "$URL" -o /tmp/xss-recon-body.html ``` Use WebFetch as fallback for JavaScript-rendered content (SPAs that return minimal HTML). **Extract script references:** 1. Parse all `