--- name: xss-html-injection description: "Cross-Site Scripting and HTML Injection Testing workflow skill. Use this skill when the user needs Execute comprehensive client-side injection vulnerability assessments on web applications to identify XSS and HTML injection flaws, demonstrate exploitation techniques for session hijacking and credential theft, and validate input sanitization and output encoding mechanisms and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off." version: "0.0.1" category: frontend tags: ["xss-html-injection", "execute", "comprehensive", "client-side", "injection", "vulnerability", "assessments", "web"] complexity: advanced risk: caution tools: ["codex-cli", "claude-code", "cursor", "gemini-cli", "opencode"] source: community author: "zebbern" date_added: "2026-04-15" date_updated: "2026-04-25" --- # Cross-Site Scripting and HTML Injection Testing ## Overview This public intake copy packages `plugins/antigravity-awesome-skills-claude/skills/xss-html-injection` from `https://github.com/sickn33/antigravity-awesome-skills` into the native Omni Skills editorial shape without hiding its origin. Use it when the operator needs the upstream workflow, support files, and repository context to stay intact while the public validator and private enhancer continue their normal downstream flow. This intake keeps the copied upstream files intact and uses the `external_source` block in `metadata.json` plus `ORIGIN.md` as the provenance anchor for review. > AUTHORIZED USE ONLY: Use this skill only for authorized security assessments, defensive validation, or controlled educational environments. # Cross-Site Scripting and HTML Injection Testing Imported source sections that did not map cleanly to the public headings are still preserved below or in the support files. Notable imported sections: Purpose, Inputs / Prerequisites, Outputs / Deliverables. ## When to Use This Skill Use this section as the trigger filter. It should make the activation boundary explicit before the operator loads files, runs commands, or opens a pull request. - This skill is applicable to execute the workflow or actions described in the overview. - Use when the request clearly matches the imported source intent: Execute comprehensive client-side injection vulnerability assessments on web applications to identify XSS and HTML injection flaws, demonstrate exploitation techniques for session hijacking and credential theft, and.... - Use when the operator should preserve upstream workflow detail instead of rewriting the process from scratch. - Use when provenance needs to stay visible in the answer, PR, or review packet. - Use when copied upstream references, examples, or scripts materially improve the answer. - Use when the workflow should remain reviewable in the public intake repo before the private enhancer takes over. ## Operating Table | Situation | Start here | Why it matters | | --- | --- | --- | | First-time use | `metadata.json` | Confirms repository, branch, commit, and imported path through the `external_source` block before touching the copied workflow | | Provenance review | `ORIGIN.md` | Gives reviewers a plain-language audit trail for the imported source | | Workflow execution | `SKILL.md` | Starts with the smallest copied file that materially changes execution | | Supporting context | `SKILL.md` | Adds the next most relevant copied source file without loading the entire package | | Handoff decision | `## Related Skills` | Helps the operator switch to a stronger native skill when the task drifts | ## Workflow This workflow is intentionally editorial and operational at the same time. It keeps the imported source useful to the operator while still satisfying the public intake standards that feed the downstream enhancer flow. 1. Search boxes and query parameters 2. User profile fields (name, bio, comments) 3. URL fragments and hash values 4. Error messages displaying user input 5. Form fields with client-side validation only 6. Hidden form fields and parameters 7. HTTP headers (User-Agent, Referer) ### Imported Workflow Notes #### Imported: Core Workflow ### Phase 1: Vulnerability Detection #### Identify Input Reflection Points Locate areas where user input is reflected in responses: ``` # Common injection vectors - Search boxes and query parameters - User profile fields (name, bio, comments) - URL fragments and hash values - Error messages displaying user input - Form fields with client-side validation only - Hidden form fields and parameters - HTTP headers (User-Agent, Referer) ``` #### Basic Detection Testing Insert test strings to observe application behavior: ```html ``` Monitor for: - Raw HTML reflection without encoding - Partial encoding (some characters escaped) - JavaScript execution in browser console - DOM modifications visible in inspector #### Determine XSS Type **Stored XSS Indicators:** - Input persists after page refresh - Other users see injected content - Content stored in database/filesystem **Reflected XSS Indicators:** - Input appears only in current response - Requires victim to click crafted URL - No persistence across sessions **DOM-Based XSS Indicators:** - Input processed by client-side JavaScript - Server response doesn't contain payload - Exploitation occurs entirely in browser ### Phase 2: Stored XSS Exploitation #### Identify Storage Locations Target areas with persistent user content: ``` - Comment sections and forums - User profile fields (display name, bio, location) - Product reviews and ratings - Private messages and chat systems - File upload metadata (filename, description) - Configuration settings and preferences ``` #### Craft Persistent Payloads ```html

Session Expired - Please Login

Username:
Password:
``` ### Phase 3: Reflected XSS Exploitation #### Construct Malicious URLs Build URLs containing XSS payloads: ``` # Basic reflected payload https://target.com/search?q= # URL-encoded payload https://target.com/search?q=%3Cscript%3Ealert(1)%3C/script%3E # Event handler in parameter https://target.com/page?name="> # Fragment-based (for DOM XSS) https://target.com/page# ``` #### Delivery Methods Techniques for delivering reflected XSS to victims: ``` 1. Phishing emails with crafted links 2. Social media message distribution 3. URL shorteners to obscure payload 4. QR codes encoding malicious URLs 5. Redirect chains through trusted domains ``` ### Phase 4: DOM-Based XSS Exploitation #### Identify Vulnerable Sinks Locate JavaScript functions that process user input: ```javascript // Dangerous sinks document.write() document.writeln() element.innerHTML element.outerHTML element.insertAdjacentHTML() eval() setTimeout() setInterval() Function() location.href location.assign() location.replace() ``` #### Identify Sources Locate where user-controlled data enters the application: ```javascript // User-controllable sources location.hash location.search location.href document.URL document.referrer window.name postMessage data localStorage/sessionStorage ``` #### DOM XSS Payloads ```javascript // Hash-based injection https://target.com/page# // URL parameter injection (processed client-side) https://target.com/page?default= // PostMessage exploitation // On attacker page: ``` ### Phase 5: HTML Injection Techniques #### Reflected HTML Injection Modify page appearance without JavaScript: ```html

SITE HACKED

``` #### Stored HTML Injection Persistent content manipulation: ```html Important Security Notice: Your account is compromised!
Fake login form or misleading content here
``` ### Phase 6: Filter Bypass Techniques #### Tag and Attribute Variations ```html