[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DFCX028KBQ2QMD4VG921JA":3,"skill-same:01M7DFCX028KBQ2QMD4VG921JA":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":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7DFCX028KBQ2QMD4VG921JA","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.","Akapi895\u002Fraptix","Akapi895","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F83953516?v=4","01M7DEGNDGERR4F4YETDFVA512","Phạm Anh Tuấn","01M7DEGNEHYZNA920AYM5EH7H8",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\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","master","8e5d356b795eae2edd4a26509a4b8968e2c4c251","packages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fcontracts\u002Fbridge-exploit","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix","https:\u002F\u002Fgithub.com\u002FAkapi895","2026-11-06 17:46:09",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Akapi895\u002Fraptix --skill contracts-bridge-exploit",{"tool":42,"command":43},"bunx","bunx skills add Akapi895\u002Fraptix --skill contracts-bridge-exploit",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Akapi895\u002Fraptix --skill contracts-bridge-exploit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fcontracts\u002Fbridge-exploit\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},"01M7DGM32SRP4FZSPYWY621BKQ","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\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\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},"01M7DGKXXVDTY0KBZZR83VFPZX","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\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\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},"01M7DGKSV77ENX3D6TG2HQX9MK","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\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\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},"01M7DGKJ9R6YTFRFBSEAJRGGKF","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\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\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},"01M7DGKCFZGKK2EQMWZM1A18S8","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\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\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},"01M7DGK76MKZQWBXTZN82W7214","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\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]