[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EHYVPXJP3RH4HVBYGGWAES":3,"skill-same:01M7EHYVPXJP3RH4HVBYGGWAES":51},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7EHYVPXJP3RH4HVBYGGWAES","contracts-bridge-exploit",null,"Cross-chain bridge attack — message-validation bypass (Wormhole class), validator key compromise (Ronin \u002F Harmony class), reentrancy on token-bridge claim, Merkle-proof forgery on optimistic bridges, signature replay across chains. Bridges have lost >$2B; understand why.","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\u002Fcontracts\u002Fbridge-exploit\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: contracts-bridge-exploit\ndescription: \"Cross-chain bridge attack — message-validation bypass (Wormhole class), validator key compromise (Ronin \u002F Harmony class), reentrancy on token-bridge claim, Merkle-proof forgery on optimistic bridges, signature replay across chains. Bridges have lost >$2B; understand why.\"\nallowed-tools: Bash Read Write\nmetadata:\n  when_to_use: \"bridge cross-chain wormhole ronin harmony nomad multichain anyswap layerzero axelar relayer validator merkle optimistic\"\n  subdomain: contracts\n  tags: defi, bridge, cross-chain, validator\n  mitre_attack: T1190, T1565\n---\n\n# Cross-Chain Bridge Attack\n\nBridges hold large pooled assets and execute messages from a separate trust layer. Architecturally fragile.\n\n## Bridge taxonomy\n\n| Type | Trust model | Past exploits |\n|---|---|---|\n| **Lock-and-mint** | Trusted validators sign mint events | Wormhole ($325M), Ronin ($600M), Harmony ($100M) |\n| **Burn-and-redeem** | Same | Multichain\u002FAnyswap ($126M) |\n| **Optimistic** | Fraud proof window | Nomad ($190M) |\n| **Light-client \u002F zk** | Cryptographic | (Fewer hacks, but newer) |\n| **Liquidity-network (Hop, Connext)** | Routers + relayers | Smaller individual exploits |\n\n## Attack classes\n\n### 1. Validator-signature bypass (Wormhole, Feb 2022, $325M)\nThe Solana-side `verify_signature` function trusted the caller to provide a \"verified\" sigset account. Attacker passed a sysvar that wasn't a real sigset → unauthorized mint of 120k wETH.\n\n**Lesson:** any verify function whose input is a struct fetched by address is bypassable if address-trust is missing.\n\n### 2. Validator key compromise (Ronin, March 2022, $600M)\n9-of-9 validators, 5 of which were operated by one entity. Sky Mavis got phished → attacker controlled 5 keys → arbitrary mint.\n\n**Lesson:** validator decentralization isn't math, it's operational. Count distinct legal entities and key-storage methods, not just keys.\n\n### 3. Merkle-proof forgery (Nomad, August 2022, $190M)\nAfter an upgrade, the zero-hash was set as a \"valid root\" — any proof against root = 0 passed. The first attacker withdrew real funds; then thousands of others copy-pasted the same tx with their own address. ~$190M total.\n\n**Lesson:** check initialize \u002F upgrade scripts for accidental defaults — `bytes32(0)`, `address(0)`, `1` (often the most-tested value) becoming the trusted value.\n\n### 4. Replay across chains (Multichain class)\nBridge tx signed for chain A is replayed on chain B because chainId wasn't bound into the signed message:\n\n```solidity\nfunction claim(bytes32 nonce, uint256 amount, bytes calldata sig) external {\n    bytes32 hash = keccak256(abi.encode(nonce, msg.sender, amount));   \u002F\u002F ⚠ no chainId\n    require(ecrecover(hash, ...) == validator);\n    token.transfer(msg.sender, amount);\n}\n\u002F\u002F On chain A: legit claim\n\u002F\u002F On chain B (same validator, same token): replay the same sig\n```\n\n### 5. Reentrancy on bridge claim\nClaim transfers tokens THEN updates nonce-used mapping:\n\n```solidity\nfunction claim(...) external {\n    token.transfer(msg.sender, amount);       \u002F\u002F attacker token w\u002F callback\n    used[nonce] = true;                        \u002F\u002F updated AFTER\n}\n\u002F\u002F ERC777 \u002F ERC1363 \u002F malicious ERC20 callback → re-enter claim same nonce\n```\n\n### 6. Liquidity-pool draining via fee oracle (Hop \u002F Across class)\nBridges using a quote-and-relay model price slippage via oracle. Manipulate the oracle → arbitrage drains liquidity:\n\n```\nStep 1: Borrow large position on chain A\nStep 2: Manipulate underlying spot price oracle that bridge fee uses\nStep 3: Initiate cross-chain transfer at the manipulated rate\nStep 4: Repay loan, profit = bridge fee discount on a large transfer\n```\n\n## Bridge audit checklist (the bugs that broke real bridges)\n\n1. **`verify_signature` trust chain**: from where does the verifier load its trust roots? Can the caller spoof them?\n2. **Validator set update**: is there a quorum check on changing validators? Can a 51% rotate themselves out and stay in?\n3. **Nonce vs chainId binding**: does the signed message include destChainId?\n4. **Claim state machine**: nonce-used mapping written BEFORE external token call?\n5. **Default values**: any `address(0)`, `bytes32(0)`, `1` in initialize that becomes a trusted value?\n6. **Pause \u002F rescue functions**: are they gated by a multisig that's actually distributed?\n7. **Relayer trust**: does the bridge trust relayer-provided data, or re-verify on-chain?\n8. **Fee\u002Frate oracle**: TWAP or spot? Manipulable?\n\n## Tooling\n\n```bash\n# Foundry test against a fork — simulate the exact bridge flow\nforge test --fork-url $RPC --match-contract Bridge --fork-block-number 17000000\n\n# Slither — finds reentrancy + signature-replay heuristics\nslither \u003Cproject>\n\n# Echidna — fuzz the bridge claim function with arbitrary calldata\nechidna-test test\u002FBridge.t.sol --config echidna.yaml\n\n# Tenderly — live simulation against deployed bridge contracts\n```\n\n## OPSEC \u002F scope\n\n- Bridge attacks are direct financial theft. **Never** test against live bridges without explicit ownership\u002Fwritten authorization.\n- Bug bounty bridges (Immunefi top payouts) are the legitimate channel — read the Immunefi scope, then test on a private fork.\n- Disclose responsibly — bridge maintainers may need 24-72h to drain liquidity to a safe vault.\n\n## References\n\n- Rekt.news — every major bridge hack post-mortem\n- Trail of Bits \"Cross-Chain Bridge Architecture\" deep dive\n- Wormhole \u002F Ronin \u002F Harmony \u002F Nomad post-mortems (official)\n- \"How to Build a Secure Cross-Chain Bridge\" — Chainlink Labs research\n","# Cross-Chain Bridge Attack\n\nBridges hold large pooled assets and execute messages from a separate trust layer. Architecturally fragile.\n\n## Bridge taxonomy\n\n| Type | Trust model | Past exploits |\n|---|---|---|\n| **Lock-and-mint** | Trusted validators sign mint events | Wormhole ($325M), Ronin ($600M), Harmony ($100M) |\n| **Burn-and-redeem** | Same | Multichain\u002FAnyswap ($126M) |\n| **Optimistic** | Fraud proof window | Nomad ($190M) |\n| **Light-client \u002F zk** | Cryptographic | (Fewer hacks, but newer) |\n| **Liquidity-network (Hop, Connext)** | Routers + relayers | Smaller individual exploits |\n\n## Attack classes\n\n### 1. Validator-signature bypass (Wormhole, Feb 2022, $325M)\nThe Solana-side `verify_signature` function trusted the caller to provide a \"verified\" sigset account. Attacker passed a sysvar that wasn't a real sigset → unauthorized mint of 120k wETH.\n\n**Lesson:** any verify function whose input is a struct fetched by address is bypassable if address-trust is missing.\n\n### 2. Validator key compromise (Ronin, March 2022, $600M)\n9-of-9 validators, 5 of which were operated by one entity. Sky Mavis got phished → attacker controlled 5 keys → arbitrary mint.\n\n**Lesson:** validator decentralization isn't math, it's operational. Count distinct legal entities and key-storage methods, not just keys.\n\n### 3. Merkle-proof forgery (Nomad, August 2022, $190M)\nAfter an upgrade, the zero-hash was set as a \"valid root\" — any proof against root = 0 passed. The first attacker withdrew real funds; then thousands of others copy-pasted the same tx with their own address. ~$190M total.\n\n**Lesson:** check initialize \u002F upgrade scripts for accidental defaults — `bytes32(0)`, `address(0)`, `1` (often the most-tested value) becoming the trusted value.\n\n### 4. Replay across chains (Multichain class)\nBridge tx signed for chain A is replayed on chain B because chainId wasn't bound into the signed message:\n\n```solidity\nfunction claim(bytes32 nonce, uint256 amount, bytes calldata sig) external {\n    bytes32 hash = keccak256(abi.encode(nonce, msg.sender, amount));   \u002F\u002F ⚠ no chainId\n    require(ecrecover(hash, ...) == validator);\n    token.transfer(msg.sender, amount);\n}\n\u002F\u002F On chain A: legit claim\n\u002F\u002F On chain B (same validator, same token): replay the same sig\n```\n\n### 5. Reentrancy on bridge claim\nClaim transfers tokens THEN updates nonce-used mapping:\n\n```solidity\nfunction claim(...) external {\n    token.transfer(msg.sender, amount);       \u002F\u002F attacker token w\u002F callback\n    used[nonce] = true;                        \u002F\u002F updated AFTER\n}\n\u002F\u002F ERC777 \u002F ERC1363 \u002F malicious ERC20 callback → re-enter claim same nonce\n```\n\n### 6. Liquidity-pool draining via fee oracle (Hop \u002F Across class)\nBridges using a quote-and-relay model price slippage via oracle. Manipulate the oracle → arbitrage drains liquidity:\n\n```\nStep 1: Borrow large position on chain A\nStep 2: Manipulate underlying spot price oracle that bridge fee uses\nStep 3: Initiate cross-chain transfer at the manipulated rate\nStep 4: Repay loan, profit = bridge fee discount on a large transfer\n```\n\n## Bridge audit checklist (the bugs that broke real bridges)\n\n1. **`verify_signature` trust chain**: from where does the verifier load its trust roots? Can the caller spoof them?\n2. **Validator set update**: is there a quorum check on changing validators? Can a 51% rotate themselves out and stay in?\n3. **Nonce vs chainId binding**: does the signed message include destChainId?\n4. **Claim state machine**: nonce-used mapping written BEFORE external token call?\n5. **Default values**: any `address(0)`, `bytes32(0)`, `1` in initialize that becomes a trusted value?\n6. **Pause \u002F rescue functions**: are they gated by a multisig that's actually distributed?\n7. **Relayer trust**: does the bridge trust relayer-provided data, or re-verify on-chain?\n8. **Fee\u002Frate oracle**: TWAP or spot? Manipulable?\n\n## Tooling\n\n```bash\n# Foundry test against a fork — simulate the exact bridge flow\nforge test --fork-url $RPC --match-contract Bridge --fork-block-number 17000000\n\n# Slither — finds reentrancy + signature-replay heuristics\nslither \u003Cproject>\n\n# Echidna — fuzz the bridge claim function with arbitrary calldata\nechidna-test test\u002FBridge.t.sol --config echidna.yaml\n\n# Tenderly — live simulation against deployed bridge contracts\n```\n\n## OPSEC \u002F scope\n\n- Bridge attacks are direct financial theft. **Never** test against live bridges without explicit ownership\u002Fwritten authorization.\n- Bug bounty bridges (Immunefi top payouts) are the legitimate channel — read the Immunefi scope, then test on a private fork.\n- Disclose responsibly — bridge maintainers may need 24-72h to drain liquidity to a safe vault.\n\n## References\n\n- Rekt.news — every major bridge hack post-mortem\n- Trail of Bits \"Cross-Chain Bridge Architecture\" deep dive\n- Wormhole \u002F Ronin \u002F Harmony \u002F Nomad post-mortems (official)\n- \"How to Build a Secure Cross-Chain Bridge\" — Chainlink Labs research\n",{"name":5,"metadata":24,"description":7,"allowed-tools":29},{"tags":25,"subdomain":26,"when_to_use":27,"mitre_attack":28},"defi, bridge, cross-chain, validator","contracts","bridge cross-chain wormhole ronin harmony nomad multichain anyswap layerzero axelar relayer validator merkle optimistic","T1190, T1565","Bash Read Write","main","d6bfd87ad9f910cfff715da04c804638990a8538","packages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fcontracts\u002Fbridge-exploit",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":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add a18268941610-crypto\u002FDecepticon-shentou --skill contracts-bridge-exploit",{"tool":43,"command":44},"bunx","bunx skills add a18268941610-crypto\u002FDecepticon-shentou --skill contracts-bridge-exploit",{"tool":46,"command":47},"pnpm","pnpm dlx skills add a18268941610-crypto\u002FDecepticon-shentou --skill contracts-bridge-exploit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fcontracts\u002Fbridge-exploit\u002FSKILL.md",true,[],[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"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":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"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":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"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":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"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":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"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":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"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",[],[]]