web-18-dom-clobbering
Installation
SKILL.md
DOM Clobbering — Web Offensive Methodology
Quick Workflow
- Identify where the page reads
window.*ordocument.getElementByIdvalues from DOM - Inject HTML elements with
idornamethat match the variable name - If the variable is used in a security-sensitive context (CSP bypass, form action), clobber it
Detection
Basic Clobbering Vectors
<!-- target.js uses: if (window.config) ... -->
<a id="config"></a> <!-- window.config → <a> element -->
<a id="config" href="data:text/html,<script>alert(1)</script>">