hunt-dom is a skill for Claude covering client-side DOM vulnerabilities that often never touch the server: DOM clobbering, where HTML markup injection alone overwrites a JavaScript global and later reaches a sink; postMessage hijacking from a missing or weak origin check; same-origin service worker abuse for persistent request interception; CSS injection that exfiltrates a token character by character through attribute selectors; and dangerouslySetInnerHTML and other framework sinks.
The skill names the public research each technique is drawn from, including Gareth Heyes and PortSwigger’s DOM clobbering and DOM-Invader work, Michał Bentkowski’s DOMPurify bypass research, the jQuery htmlPrefilter CVEs, and d0nut’s CSS exfiltration technique, and is explicit that this provenance is not itself proof against a live target. It corrects two common overstatements: that a service worker script can be registered cross-origin, and that CSS exfiltration bypasses a CSP that restricts external resource origins. It is for assets covered by a program or engagement you are authorized to test.
What You Get
- A browser console snippet for probing clobberable global variables and tracing whether they reach a sink
- PostMessage proof-of-concept templates for both a vulnerable listener and a leaking sender, plus a look-alike-origin bypass test for weak string checks
- A corrected same-origin requirement for service worker registration, with the realistic path for getting a script onto the target origin first
- A CSS exfiltration generator script and an explicit correction that it only defeats script-blocking CSP, not a restrictive style-src or connect-src
- A chain table and validation section requiring OOB-confirmed proof for every finding, since a technique that fires in DevTools is not yet a report
Common Use Cases
- Testing whether a clobberable JavaScript global, created by markup-only HTML injection, reaches a sink such as location or innerHTML
- Checking a postMessage handler for a missing or weak origin check, including a look-alike-domain bypass of a naive string match
- Confirming whether a CSS injection point can exfiltrate a CSRF token via attribute selectors, after reading the page’s live CSP to see whether it permits the required external request
What Makes It Unique
The skill names its research provenance by author and publication and states directly that provenance is for technique background, not report evidence. It also corrects two mistakes common in this class: service worker scripts must be same-origin, with no header that changes that, and CSS exfiltration defeats only script-blocking CSP, not a locked-down style-src or connect-src. Both corrections are stated as hard rules.
Under The Hood
The skill is a single SKILL.md of guidance with no bundled scripts. Following it, the agent inspects a target’s JavaScript bundles and live DOM for clobberable globals, postMessage handlers and dangerouslySetInnerHTML-style sinks, writes HTML and JavaScript proof-of-concept files that register a same-origin service worker or drive a postMessage attack from an iframe, and sets up an out-of-band callback host to confirm blind exfiltration. Use it only against assets you are authorized to test.