{"id":19602809,"url":"https://github.com/wtfacademy/wtf-ctf","last_synced_at":"2025-08-10T08:12:42.016Z","repository":{"id":152936821,"uuid":"622474122","full_name":"WTFAcademy/WTF-CTF","owner":"WTFAcademy","description":"Collect CTFs related to evm, and provide solutions, using Foundry. 收集 EVM 类的 CTF 挑战，并提供解决方案。","archived":false,"fork":false,"pushed_at":"2024-05-10T13:03:38.000Z","size":622,"stargazers_count":156,"open_issues_count":2,"forks_count":21,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-07-14T19:15:27.792Z","etag":null,"topics":["blockchain","ctf","ethereum","evm","security","solidity","web3"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WTFAcademy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-02T08:12:19.000Z","updated_at":"2025-07-03T06:49:46.000Z","dependencies_parsed_at":"2024-01-16T20:29:19.130Z","dependency_job_id":"c4771d16-3014-4d1a-89fb-da3b5164c317","html_url":"https://github.com/WTFAcademy/WTF-CTF","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WTFAcademy/WTF-CTF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-CTF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-CTF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-CTF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-CTF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WTFAcademy","download_url":"https://codeload.github.com/WTFAcademy/WTF-CTF/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-CTF/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269693593,"owners_count":24460248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","ctf","ethereum","evm","security","solidity","web3"],"created_at":"2024-11-11T09:26:21.905Z","updated_at":"2025-08-10T08:12:41.993Z","avatar_url":"https://github.com/WTFAcademy.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WTF-CTF [![tests](https://github.com/WTFAcademy/WTF-CTF/actions/workflows/ci.yml/badge.svg?label=tests)](https://github.com/WTFAcademy/WTF-CTF/actions/workflows/ci.yml) ![license](https://img.shields.io/github/license/WTFAcademy/WTF-CTF?label=license) ![solidity](https://img.shields.io/badge/solidity-^0.8.19-green) [![Foundry - ^0.8.0](https://img.shields.io/static/v1?label=Foundry\u0026message=^0.8.0\u0026color=black\u0026logo=ethereum\u0026logoColor=white)](https://book.getfoundry.sh/)\n\n\nCollect CTFs related to evm, and provide solutions, using [Foundry](https://book.getfoundry.sh/). 收集 EVM 类的 CTF 挑战，并提供解决方案。\n\nLead by [flyq](https://github.com/flyq)\n\n## 安装依赖\n\n\n**安装 Rust**\n\n```sh\n$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n并根据提示继续操作。\n\n**安装 svm**\n\n[svm-rs](https://github.com/roynalnaruto/svm-rs) is Solidity Compiler Version Manager\n\n```sh\n$ cargo install svm-rs\n```\n\n**设置 solc 版本**\n```sh\n$ svm install 0.4.26\n\n$ svm use 0.4.26\n\n$ solc --version\n```\n\n**安装 Foundry**\n\n根据 [Foundry 官方文档](https://getfoundry.sh/)配置好运行环境。\n\n## 使用说明\n\n如果需要运行所有的测试：\n```sh\n$ git clone https://github.com/WTFAcademy/WTF-CTF.git\n\n$ cd ./WTF-CTF\n\n$ forge install openzeppelin-contracts-05=OpenZeppelin/openzeppelin-contracts@v2.5.0 openzeppelin-contracts-06=OpenZeppelin/openzeppelin-contracts@v3.4.0 openzeppelin-contracts-08=OpenZeppelin/openzeppelin-contracts@v4.8.3\n\n$ forge install\n\n$ forge test --ffi -vvv \n```\n\n如果只运行某一个挑战的测试(示例)：\n```sh\n$ cd ./WTF-CTF\n\n$ forge test -C ./src/Capture_the_Ether/Warmup/Deploy_a_contract -vvv\n```\n\n## Capture the Ether\n\n- Warmup\n  - **Deploy a contract**: [代码](./src/Capture_the_Ether/Warmup/Deploy_a_contract/DeployChallenge.s.sol) | [文章](./src/Capture_the_Ether/Warmup/Deploy_a_contract/README.md)\n  - **Call me**: [代码](./src/Capture_the_Ether/Warmup/Call_me/CallMeChallenge.t.sol) | [文章](./src/Capture_the_Ether/Warmup/Call_me/README.md)\n  - **Chosse a nickname**: [代码](./src/Capture_the_Ether/Warmup/Choose_a_nickname/NicknameChallenge.t.sol) | [文章](./src/Capture_the_Ether/Warmup/Choose_a_nickname/README.md)\n- Lotteries\n  - **Guess the number**: [代码](./src/Capture_the_Ether/Lotteries/Guess_the_number/GuessTheNumberChallenge.t.sol) | [文章](./src/Capture_the_Ether/Lotteries/Guess_the_number/README.md)\n  - **Guess the secret number**: [代码](./src/Capture_the_Ether/Lotteries/Guess_the_secret_number/GuessTheSecretNumberChallenge.t.sol) | [文章](./src/Capture_the_Ether/Lotteries/Guess_the_secret_number/README.md)\n  - **Guess the random number**: [代码](./src/Capture_the_Ether/Lotteries/Guess_the_random_number/GuessTheRandomNumberChallenge.t.sol) | [文章](./src/Capture_the_Ether/Lotteries/Guess_the_random_number/README.md)\n  - **Guess the new number**: [代码](./src/Capture_the_Ether/Lotteries/Guess_the_new_number/Attacker.sol) | [文章](./src/Capture_the_Ether/Lotteries/Guess_the_new_number/README.md)\n  - **Predict the future**: [代码](./src/Capture_the_Ether/Lotteries/Predict_the_future/Attacker.sol) ｜ [文章](./src/Capture_the_Ether/Lotteries/Predict_the_future/README.md)\n  - **Predict the block hash**: [代码](./src/Capture_the_Ether/Lotteries/Predict_the_block_hash/PredictTheBlockHashChallenge.t.sol) | [文章](./src/Capture_the_Ether/Lotteries/Predict_the_block_hash/README.md)\n- Math\n  - **Token sale**: [代码](./src/Capture_the_Ether/Math/Token_sale/TokenSaleChallenge.t.sol) | [文章](./src/Capture_the_Ether/Math/Token_sale/README.md)\n  - **Token whale**: [代码](./src/Capture_the_Ether/Math/Token_whale/TokenWhaleChallenge.t.sol) | [文章](./src/Capture_the_Ether/Math/Token_whale/README.md)\n  - **Retirement fund**: [代码](./src/Capture_the_Ether/Math/Retirement_fund/RetirementFundChallenge.t.sol) | [文章](./src/Capture_the_Ether/Math/Retirement_fund/README.md)\n  - **Mapping**: [代码](./src/Capture_the_Ether/Math/Mapping/MappingChallenge.t.sol) | [文章](./src/Capture_the_Ether/Math/Mapping/README.md)\n  - **Donation**: [代码](./src/Capture_the_Ether/Math/Donation/DonationChallenge.t.sol) | [文章](./src/Capture_the_Ether/Math/Donation/README.md)\n  - **Fifty years**: [代码](./src/Capture_the_Ether/Math/Fifty_years/FiftyYearsChallenge.t.sol) | [文章](./src/Capture_the_Ether/Math/Fifty_years/README.md)\n- Accounts\n  - **Fuzzy identity**: [代码](./src/Capture_the_Ether/Accounts/Fuzzy_identity/FuzzyIdentityChallenge.t.sol) ｜ [文章](./src/Capture_the_Ether/Accounts/Fuzzy_identity/README.md)\n  - **Public Key**: [代码](./src/Capture_the_Ether/Accounts/Public_Key/PublicKeyChallenge.t.sol) | [文章](./src/Capture_the_Ether/Accounts/Public_Key/README.md)\n  - **Account Takeover** [代码](./src/Capture_the_Ether/Accounts/Account_Takeover/AccountTakeoverChallenge.t.sol) | [文章](./src/Capture_the_Ether/Accounts/Account_Takeover/README.md)\n- Miscellaneous\n  - **Assume ownership**: [代码](./src/Capture_the_Ether/Miscellaneous/Assume_ownership/AssumeOwnershipChallenge.t.sol) | [文章](./src/Capture_the_Ether/Miscellaneous/Assume_ownership/README.md)\n  - **Token bank**: [代码](./src/Capture_the_Ether/Miscellaneous/Token_bank/TokenBankChallenge.t.sol) | [文章](./src/Capture_the_Ether/Miscellaneous/Token_bank/README.md)\n\n## Ethernaut\n\n- **Hello Ethernaut**: [代码](./src/Ethernaut/Hello_Ethernaut/Instance.t.sol) | [文章](./src/Ethernaut/Hello_Ethernaut/README.md)\n- **Fallback**: [代码](./src/Ethernaut/Fallback/Fallback.t.sol) | [文章](./src/Ethernaut/Fallback/README.md)\n- **Coin Flip**: [代码](./src/Ethernaut/Coin_Flip/CoinFlip.t.sol) |  [文章](./src/Ethernaut/Coin_Flip/README.md)\n- **Telephone**: [代码](./src/Ethernaut/Telephone/Telephone.t.sol) |  [文章](./src/Ethernaut/Telephone/README.md)\n- **Token**: [代码](./src/Ethernaut/Token/Token.t.sol) |  [文章](./src/Ethernaut/Token/README.md)\n- **Delegation**: [代码](./src/Ethernaut/Delegation/Delegation.t.sol) |  [文章](./src/Ethernaut/Delegation/README.md)\n- **Force**: [代码](./src/Ethernaut/Force/Force.t.sol) |  [文章](./src/Ethernaut/Force/README.md)\n- **Vault**: [代码](./src/Ethernaut/Vault/Vault.t.sol) |  [文章](./src/Ethernaut/Vault/README.md)\n- **King**: [代码](./src/Ethernaut/King/King.t.sol) |  [文章](./src/Ethernaut/King/README.md)\n- **Re-entrancy**: [代码](./src/Ethernaut/Re-entrancy/Reentrance.t.sol) |  [文章](./src/Ethernaut/Re-entrancy/README.md)\n- **Elevator**: [代码](./src/Ethernaut/Elevator/Elevator.t.sol) |  [文章](./src/Ethernaut/Elevator/README.md)\n- **Privacy**: [代码](./src/Ethernaut/Privacy/Privacy.t.sol) |  [文章](./src/Ethernaut/Privacy/README.md)\n- **Gatekeeper One**: [代码](./src/Ethernaut/Gatekeeper_One/GatekeeperOne.t.sol) | [文章](./src/Ethernaut/Gatekeeper_One/README.md)\n- **Gatekeeper Two**: [代码](./src/Ethernaut/Gatekeeper_Two/GatekeeperTwo.t.sol) |  [文章](./src/Ethernaut/Gatekeeper_Two/README.md)\n- **Naught Coin**: [代码](./src/Ethernaut/Naught_Coin/NaughtCoin.t.sol) |  [文章](./src/Ethernaut/Naught_Coin/README.md)\n- **Preservation**: [代码](./src/Ethernaut/Preservation/Preservation.t.sol) |  [文章](./src/Ethernaut/Preservation/README.md)\n- **Recovery**: [代码](./src/Ethernaut/Recovery/Recovery.t.sol) |  [文章](./src/Ethernaut/Recovery/README.md)\n- **MagicNumber**: [代码](./src/Ethernaut/MagicNumber/MagicNum.t.sol) |  [文章](./src/Ethernaut/MagicNumber/README.md)\n- **Alien Codex**: [代码](./src/Ethernaut/Alien_Codex/AlienCodex.t.sol) |  [文章](./src/Ethernaut/Alien_Codex/README.md)\n- **Denial**: [代码](./src/Ethernaut/Denial/Denial.t.sol) | [文章](./src/Ethernaut/Denial/README.md)\n- **Shop**: [代码](./src/Ethernaut/Shop/Shop.t.sol) |  [文章](./src/Ethernaut/Shop/README.md)\n- **Dex**: [代码](./src/Ethernaut/Dex/Dex.t.sol) |  [文章](./src/Ethernaut/Dex/README.md)\n- **Dex Two**: [代码](./src/Ethernaut/Dex_Two/DexTwo.t.sol) | [文章](./src/Ethernaut/Dex_Two/README.md)\n- **Puzzle Wallet**: [代码](./src/Ethernaut/Puzzle_Wallet/PuzzleWallet.t.sol) |  [文章](./src/Ethernaut/Puzzle_Wallet/README.md)\n- **Motorbike**: [代码](./src/Ethernaut/Motorbike/Motorbike.t.sol) |  [文章](./src/Ethernaut/Motorbike/README.md)\n- **DoubleEntryPoint**: [代码](./src/Ethernaut/DoubleEntryPoint/DoubleEntryPoint.t.sol) |  [文章](./src/Ethernaut/DoubleEntryPoint/README.md)\n- **Good Samaritan**: [代码](./src/Ethernaut/Good_Samaritan/GoodSamaritan.t.sol) |  [文章](./src/Ethernaut/Good_Samaritan/README.md)\n- **Gatekeeper Three**: [代码](./src/Ethernaut/Gatekeeper_Three/GatekeeperThree.t.sol) |  [文章](./src/Ethernaut/Gatekeeper_Three/README.md)\n- **Switch**: [代码](./src/Ethernaut/Switch/Switch.t.sol) | [文章](./src/Ethernaut/Switch/README.md)\n- **HigherOrder**:[代码](./src/Ethernaut/HigherOrder/HigherOrder.t.sol) | [文章](./src/Ethernaut/HigherOrder/README.md)\n- **Stake**: [代码](./src/Ethernaut/Stake/Stake.t.sol) | [文章](./src/Ethernaut/Stake/README.md)\n\n## 参考\n\n* [Capture the Ether](https://capturetheether.com/)\n* [Ethernaut](https://ethernaut.openzeppelin.com/)\n* [Damn Vulnerable DeFi](https://www.damnvulnerabledefi.xyz/)\n* [Paradigm CTF](https://ctf.paradigm.xyz/)\n* [Mr Steal Yo Crypto](https://mrstealyocrypto.xyz/)\n* [QuillCTF](https://quillctf.super.site/)\n* Lists\n  * [Blocksec CTFs](https://github.com/blockthreat/blocksec-ctfs)\n  * [Awesome Ethereum Security](https://github.com/crytic/awesome-ethereum-security)\n  * [CTF Blockchain Challenges](https://github.com/minaminao/ctf-blockchain)\n  * [CTFGym](https://github.com/PumpkingWok/CTFGym)\n\n\n\n## WTF 贡献者\n\u003cdiv align=\"center\"\u003e\n  \u003ch4 align=\"center\"\u003e\n    贡献者是WTF学院的基石\n  \u003c/h4\u003e\n  \u003ca href=\"https://github.com/WTFAcademy/WTF-CTF/graphs/contributors\"\u003e\n    \u003cimg src=\"https://contrib.rocks/image?repo=WTFAcademy/WTF-CTF\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## 使用许可\n[MIT](LICENSE) (c) 2023 WTF.Academy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtfacademy%2Fwtf-ctf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtfacademy%2Fwtf-ctf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtfacademy%2Fwtf-ctf/lists"}