crazymarky/pentest-skills/exploit-xss
Claude Code and agent skill by crazymarky/pentest-skills
- community
Checking that the SKILL.md file is still in the repository.
Cross-site scripting (XSS) vulnerability detection and exploitation. Supports reflected XSS, stored XSS, DOM-based XSS, and blind XSS testing. Use this skill when user mentions XSS, cross-site scripting, script injection, or needs to test JavaScript injection in parameters, forms, headers, or DOM sources.
Install
npx vskill@latest install crazymarky/pentest-skills/exploit-xssSKILL.md
Cross-Site Scripting (XSS) Detection Skill
⚠️ DANGER - Authorization Required
This skill is for AUTHORIZED SECURITY TESTING ONLY.
You must have:
- Written permission from the target system owner
- Legal authorization to test the target
- A defined scope of testing
Unauthorized XSS testing is ILLEGAL and unethical.
Prerequisites
Required Tools
Python Requirements
Optional Tools
Quick Start
Basic URL Testing
POST Request Testing
DOM XSS Testing
Common Scenarios
1. Basic Parameter Testing (Reflected XSS)
Test URL parameters for reflection and injection:
What to check:
- Does the input reflect in the HTML response?
- What is the context (HTML tag, attribute, JavaScript)?
- Are there any filters/encoding applied?
2. POST Request XSS (Form Testing)
Test POST forms for stored/reflected XSS:
Common POST targets:
- Login forms (username, email fields)
- Contact forms (name, message fields)
- Search forms
- Comment forms
- User profile updates
3. Cookie and Header XSS
Test HTTP headers and cookies for injection:
Headers to test:
- User-Agent (check application logs/error pages)
- Referer (check 404 pages, analytics)
- X-Forwarded-For (check IP reflection)
- Cookie (check welcome messages/logs)
4. Reflected XSS Detection
Identify reflection points and test payloads:
Detection techniques:
- Compare response length with/without payload
- Search for payload in response HTML
- Check for encoding/filtering patterns
- Identify HTML context (tag, attribute, JS, CSS)
5. Stored XSS Testing (Database Persistence)
Test for XSS that persists in the database:
Stored XSS targets:
- User profiles (name, bio, location)
- Comments/Reviews
- Forum posts
- Email/contact forms (admin panel XSS)
- File upload metadata
6. DOM XSS Discovery
Find client-side XSS vulnerabilities:
Common DOM sources:
location.hashlocation.searchdocument.cookiedocument.referrerwindow.name
Common DOM sinks:
innerHTMLdocument.write()eval()location.hrefsetTimeout()/setInterval()
7. Blind XSS in Forms (Contact/Admin XSS)
Test XSS in forms that execute in admin panels:
Blind XSS testing tips:
- Use unique payloads per test (to identify which parameter is vulnerable)
- Use Burp Collaborator or interactsh for callbacks
- Test email contact forms (executes when admin opens email)
- Test support ticket systems
8. Context-Aware Payloads
Use payloads specific to the injection context:
Context-specific payloads:
HTML Body/Tag:
HTML Attribute:
JavaScript:
CSS/Style:
9. WAF Bypass Techniques
Evade Web Application Firewalls:
Bypass techniques:
- URL encoding:
%3Cscript%3Ealert(1)%3C/script%3E - Double encoding:
%253Cscript%253E - Unicode encoding:
\u003Cscript\u003E - HTML entities:
<script>alert(1)</script> - Case mixing:
<ScRiPt>alert(1)</sCrIpT> - Comment injection:
<script><!-- anything -->alert(1)</script> - Tab/newline injection:
<script\t>alert(1)</script>
10. Automated Scanning (Batch Testing)
Scan multiple URLs/parameters:
11. Payload Encoding Variations
Test with different encoding schemes:
Common encodings to test:
- Plain:
<script>alert(1)</script> - URL encoded:
%3Cscript%3Ealert(1)%3C/script%3E - Double URL encoded:
%253Cscript%253E - HTML entities:
<script>alert(1)</script> - Hex:
\x3Cscript\x3Ealert(1)\x3C/script\x3E - Unicode:
\u003Cscript\u003Ealert(1)\u003C/script\u003E
12. Polyglot Payloads
Test with payloads that work in multiple contexts:
Famous polyglot payloads:
13. CSP Detection and Bypass
Content Security Policy analysis and bypass testing:
Common CSP bypass techniques:
unsafe-inline- allows inline scriptsunsafe-eval- allows eval(), setTimeout()data:URLs - inline scripts via data URI- Wildcard sources - allows any domain
- Nonce-based bypasses
- Framework-specific bypasses
See references/csp_bypass_guide.md for detailed techniques.
14. Framework-Specific XSS
Test for Angular, React, Vue, and other framework vulnerabilities:
Common framework vectors:
- Angular:
{{constructor.constructor('alert(1)')()}} - React:
dangerouslySetInnerHTML - Vue:
v-htmldirective - jQuery:
.html()manipulation
See references/framework_xss_guide.md for detailed techniques.
15. SVG File Upload XSS
Test for SVG-based XSS in file uploads:
SVG XSS vectors:
<svg onload="alert('XSS')"><svg><script>alert('XSS')</script></svg><svg><foreignObject><iframe src="javascript:alert('XSS')"></iframe></foreignObject></svg>
See references/svg_xss_guide.md for detailed techniques.
16. Mutation XSS (mXSS)
Test for HTML mutation-based XSS:
Mutation XSS vectors:
- Entity decoding mutations:
<→< - Tag parsing mutations:
<xmp>,<listing> - DOM clobbering:
<a id="location"> - Namespace mutations: SVG/MathML
See references/mutation_xss_guide.md for detailed techniques.
17. WebSocket XSS
Test for XSS vulnerabilities in WebSocket connections:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingexploit-xss/SKILL.md
Popularity
- Repository stars
- 216
- Repository forks
- 26
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/crazymarky/pentest-skills/exploit-xss)