From 76ed001352dde2b3600805eea20b2de1cbd156c2 Mon Sep 17 00:00:00 2001 From: six <51x@keemail.me> Date: Tue, 9 Jul 2024 13:43:20 +0200 Subject: [PATCH] Prequalification is live --- .README.md.swp | Bin 0 -> 20480 bytes .../business_dev/README.md | 4 ++- Prequalification_Challenges/entropy/README.md | 8 +++-- .../entry_solidity/README.md | 6 ++-- .../entry_solidity/easy.sol | 32 ++++++++++++++++++ .../gandalf_blockchain/README.md | 28 --------------- README.md | 17 ++++------ 7 files changed, 49 insertions(+), 46 deletions(-) create mode 100644 .README.md.swp create mode 100644 Prequalification_Challenges/entry_solidity/easy.sol delete mode 100644 Prequalification_Challenges/gandalf_blockchain/README.md diff --git a/.README.md.swp b/.README.md.swp new file mode 100644 index 0000000000000000000000000000000000000000..7964da3969a90a24098272e354475e8a2b794b7b GIT binary patch literal 20480 zcmeI4O^h5z6~`M)!bcJVK}5hIsd%N>PIhO;`@KfsIBPq0@Y;*L#EKl)?T_l2&h~Uo zx_fqZ9GpmeNQoflZ~~MFaYo?)r*H-#$RQtyoIyk)B;tw$zgOKoGwUQc0z?Gr(f++V zGu2hE{`KCgdhb=@wH`dPrj{GC4zEu*&b|Xrhljqk-QY_dCuGkotcW|G)fk$9V~?fMsw990byC8T3?g4j$rx5r_@Z61#^DMX#+yMSa!r~9$Metkj6nGM(;1JjkULtAn z1ZaX!gTIjkc@;bg?vR8C_z?+=W1t1T24>WH>iT))yK$5c9mQ)#T{8VRP;N3biB{WM z_f+1AGSy4XBiheZ+E0=wX-}(xZ5QRr(<(}Go$4&-3#Aj&Z+BE^QXbUGH{EVOq5Eb( z(`k0B9OX=CzwPmq=HXz}f6;AQ=PK+c!P`d4`dRKqiR;BOs_i2-jEY#tn9qZe>qRmd zCJ?AmWBXA#^4ZACniq4|-#)*i(=axJrp|rUbJILiZmLxnC3;$U{akwIeWG=csocm! zO&YZsJ!V>gZj?QqGr2xmPBzdgFgjC-$?b#Xb0TBW=fI@fLX(xRV>zVXK^o<`PE^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po79yP;9fspS6=Na5 zkYhu!(~7k3D47zqmXkzvD9ap)|6e5Do*@>O_`j;(|Abioc5n;$&3?yu9;DzcV*EG3 zYsB>D!8x!B?gKxkkDmeQYg+oNUo`_Y12qFR12qFR12qFR12qHx%M3hJhU;XMIC7I{ zkl0ib22^XtnUo~aaW<{GBw*a)AWzO#4(aO`6cLF;?UH;-ZO!MhbV0n#;|4E1yZSO6EjXacKMDo=VsY&jV z?1{}mZf^3Q>TYh1q+D}}TzA!>dpmkJ43CnP;;lS<7)eMhtri_S&LyekNPgL7^lU0? zB1<}vXDVtTQAljq)dcY5X9(hn&I#1gN+kJwTZEIGLue>&5$Je*siYD15ZAi#z#Wn& zkuZudv?I^jEGy46ia@n24Ups_Sh8`_Zqy|)R@4{>#gDY?;z(5Z$V3ey&_2;5!DJ8- zRucP>t?y7{Avr{DR|*t1gE&+>l(KBFC_UI5b&-ncx|0LB_A5)WE!06e?W-hpnHdxc zmRdylql|tzP+4QM<%*z8VB17EF?gA2tO8%HPFu|k)hW_2D(jL}vB9;v{xXOh>{Lf5GF#e2vqdqZRR!IGqSVhfj|?o~m8^{|OU zh%C!}+euNPl2545+I(5mMVuWig%1)}HX~+P-79ceW|o=ofJt+gEP5%@B}reBC&&4S z9-1=6Inlx1YICnDT8n9U{WQ>t7~U}(|0mS7AD4PJ!GCqX|L?^8e*tfRZ-Q@t?-Bn$ z170Kk|2=pNTmcV*%iyQv0G%YgqOnsZ8zD-f>MfGip`Zh&kAqG%7u)|H~hzLP1yS-_8Nr5cD6cBNIJ8(*gC2@+aO+UFxZ3yiyRTf zP28_2>c=)QGNtPK6!w4bR^O+vH$UF}KE+tOBuyn6#nn)`15@5cu$LONI`B^}E*wB3 j<>msBzubefiYdv1KxZVuJbTeoZpUsEX%V@P<2e5S3di|e literal 0 HcmV?d00001 diff --git a/Prequalification_Challenges/business_dev/README.md b/Prequalification_Challenges/business_dev/README.md index afda24c..69886a8 100644 --- a/Prequalification_Challenges/business_dev/README.md +++ b/Prequalification_Challenges/business_dev/README.md @@ -11,12 +11,14 @@ Requirements to be included in the .pdf document to pass: 5. Financial planning for the first year (with strong focus on what products, services will bring income to the project) 6. Roadmap to your self-sustaining project (with strong focus on revenue calculations) +Remember to keep asking yourself: how will this project make money? + We recommend to create a plan for something you want to build during the hackathon. If you already have a team in your mind, you can submit the same plan together, but we will put a way harder scoring on you, as you are not doing that alone. You should be able to solve this challenge in a maximum of 5-8 hours, as we are not requesting a full detailed business plan. It is enough if we see that you understand why/how a project can succeed and stay alive on the market. If you need some help, here is a complete guide: https://www.youtube.com/watch?v=xLH-lNChzI4 Send your ready web3 business plan to contact@cryptoctf.org and you get feedback after we have reviewed it. The flag will be sent as an answer mail. -_Keccak256: 0xd870fd076f038801fbb60ce4e4d63b5cc06867b8bb917b06c5f13237e93a02aa_ +_Keccak256: 0xcbea517b9d896ea084e2978588dd17073adf2eaf2a5a01b8b9123ceb990c38d4_ _Challenge author: six_ diff --git a/Prequalification_Challenges/entropy/README.md b/Prequalification_Challenges/entropy/README.md index f203868..a08a87c 100644 --- a/Prequalification_Challenges/entropy/README.md +++ b/Prequalification_Challenges/entropy/README.md @@ -1,13 +1,15 @@ ## Entropy with Shannon -What is the Shannon Entropy of "DOGE" after turning it into Base64, then to consecutive Hex (no space or any delimiters)? To generate the flag, insert the value with exactly 15 digits after the decimal point, for example: PC{4.325817531314781} +What is the Shannon Entropy of "Web3Mantra" after turning it into Base64, then to consecutive Hex (no space or any delimiters)? To generate the flag, insert the value with exactly 17 digits after the decimal point, for example: PC{4.325817531314781} -Steps: Base64 -> Hex (no delimiters) -> Shannon entropy up to 15 digits +Steps: Base64 -> Hex (None delimiters) -> Shannon entropy up to 17 digits If you have solved this challenge, please send your code along with the registration. Reference: https://en.wikipedia.org/wiki/Entropy_(information_theory) -_Keccak256: 0x513b0aa1dcded5f38352d6b9ef729bb0ae4069489e0c2603dce4b91a3f1433d0_ +Hint: The Cyber Chef is your friend. + +_Keccak256: 0x706fe2c39293c81a414eba40ba10c73a74fbbf1db135976f09eb886c1f25c308_ _Challenge author: six_ diff --git a/Prequalification_Challenges/entry_solidity/README.md b/Prequalification_Challenges/entry_solidity/README.md index 5e22c54..2cc9302 100644 --- a/Prequalification_Challenges/entry_solidity/README.md +++ b/Prequalification_Challenges/entry_solidity/README.md @@ -1,9 +1,7 @@ ## You can figure it out - Entry Solidity challenge -TBA +Find the flag in the smart contract. Easy. -Link to smart contract: TBA - -_Keccak256: _ +_Keccak256: 0x536735665ea9e6c2fe9a103cc8b2a32dcfa1f3c68974a2710425ecb71cc32af3_ _Challenge author: six_ diff --git a/Prequalification_Challenges/entry_solidity/easy.sol b/Prequalification_Challenges/entry_solidity/easy.sol new file mode 100644 index 0000000..4b24f5e --- /dev/null +++ b/Prequalification_Challenges/entry_solidity/easy.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +contract PolkadotCTF { + address public winner; + + event FlagCaptured(address indexed player); + + // Encoded parts of the flag as byte arrays + bytes private part1 = hex"50437b497354686973"; + bytes private part2 = hex"546865466c61674f72"; + bytes private part3 = hex"644e6f747d"; + + // Function to decode the parts and get the full flag + function decodeFlag() public view returns (string memory) { + return string(abi.encodePacked(part1, part2, part3)); + } + + // Function to capture the flag + function captureFlag(string memory _solution) public { + string memory decodedFlag = decodeFlag(); + require(keccak256(abi.encodePacked(_solution)) == keccak256(abi.encodePacked(decodedFlag)), "Incorrect solution"); + winner = msg.sender; + emit FlagCaptured(msg.sender); + } + + // Function to get the flag + function getFlag() public view returns (string memory) { + require(msg.sender == winner, "You are not the winner"); + return decodeFlag(); + } +} diff --git a/Prequalification_Challenges/gandalf_blockchain/README.md b/Prequalification_Challenges/gandalf_blockchain/README.md deleted file mode 100644 index 10e3252..0000000 --- a/Prequalification_Challenges/gandalf_blockchain/README.md +++ /dev/null @@ -1,28 +0,0 @@ -## Implement Gandalf's blockchain (AI related) - -You need to reveal Gandalf's 8 words and create a chain of blocks with them: https://gandalf.lakera.ai/ - -Task is the create a local blockchain (no consensus or networking needed here, just the process of block creation): - - Beat Gandalf AI game, find all the 8 words. Put them in order. Each one of them will be the data in your block. - - Use | as delimiter between the words and the hash. Between the word and the hash, there is a - sign. - - How this looks like: GENESIS|WORD1-HASH|WORD2-HASH|WORD3-HASH - - Use SHA512 for the hashing algo. Start with the word and the delimiter and the first word: "GENESIS|WORD1-" - - Make sure to calculate the dash sign into the next hash. It is part of the block data. You only add the hash from the previous block, not all data! - - Everything is UPPERCASE. - -If you are doing it correctly, you will have the following block hashes, starting from 0, Genesis: -0. 8288b35979d4e5dd5eee89a711ea5f41b04a17e7473a874c2b551844b57c0c24545cdbe7abf8e68dcd8da18a04ca8a1cc5798065ddb4fb32443136a589b3439d -1. 3ee14c107bd6b3e050fac7b0a2ff42a474b10c789830d03f22cdf242a773905a88ac98ebcafdd2e8c0134c3fe285bb58f52f68a1d873290cf2430bb0b22429a7 -2. 058e7624f1d69625f1ecc4cdf41921fc7ffd31a38de10c9dab543986d68f47363974d2ea25832e6eacc5425afd685c11852fdd66793e7547dc9773cffb0431e8 -3. 2990022ea32e47959b83bb7faf36e430c046533da075ca6aabad7269891195480d86d9b76ac29b22268ef1ef419c147291b8ac9fea0f1b737dfce360be384764 -4. ff0dd5196c836fb663b87aa0e8b647e0862646673f8b6eca3a38866e02290e02d95c94df83cd4be1ac3900f9e69d00c1d9ab5a30a5e4f6102a97d25eeab8ecf1 -5. 921be30124a505711224fb6de0955bd7e4c3b518aa4d5f65b6242c73fc1d4d978a8251c7d83f775aa14c00d01a5225085291c5df373a3bc18945b854d12e868f -6. This is secret! You need to insert the correct word plus the hash in order to count the final hash for the 7th block, which will be the flag. - -Now that you solved Gandalf's game and wrote a local blockchain (without networking) it is time for the flag. Create the hash of block number 7 with the following data and hash it: "ICANHAZCHAIN-{PREVIOUS BLOCK}". The hash of this final block will be your flag. - -The flag is the 7th block's sha512sum inserted into the PC{...} format. Pro tip: if you have issues with hash results, check with hexdump. - -_Keccak256: 0xdbd5381511b2b9b20ee59bcefcb7f76650030d20e99886fa03b3c3f5cef47d37_ - -_Challenge author: six_ diff --git a/README.md b/README.md index 6116b18..2c85ded 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,9 @@ The [Polkadot Championship](https://polkadotchampionship.org/) is an open web3/cryptocurrency contest consisting of a qualification phase and a main event. -Two new challenges will be coming next week! - # Qualification -To qualify, you must solve at least 3 challenges from the 5 provided in this repository. +To be able to register and qualify, you must solve at least 2 challenges from the 4 provided in this repository. Please, see the Prequalification_Challenges folder for details. ### The process @@ -14,17 +12,13 @@ Each challenge has its own subfolder in the "Prequalification_Challenges" folder The format of a solution is an ASCII string of the form __PC{...}__, like PC{#\This_Could_be_Flagz/#}. A correct solution is also called a flag. What you are looking for in each challenge is to generate the string between PC{......}. -[Submit your solutions in this web form - coming soon TBA](https://) to ask for an invitation. +[Register and submit your prequalification solutions in this web form](https://www.cognitoforms.com/unconditionalpeace/polkadotchampionship2024prequalification) to ask for an invitation. (If you've played Capture The Flag (CTF) games before, this process should be familiar to you.) ### Offline flag verification -You can verify the correctness of your solutions before submitting the form. The flags have the following respective Keccak-256 hash values: - -``` -TBA Example - 0xdbd5381511b2b9b20ee59bcefcb7f76650030d20e99886fa03b3c3f5cef47d37 -``` +You can verify the correctness of your solutions before submitting the form. The hash value of each pre-qualification challenge can be found in its respective folder. To calculate the Keccak-256 hash of a string, you can, for example, install `keccak256-cli` using `cargo`, and then use the `keccak256` command like so: ``` @@ -34,7 +28,10 @@ echo 'PC{This_Could_be_a_Flag.!}'|keccak256 ## List of prequalification challenges -Medium - TBA - +Easy - Entry Solidity +Medium - Hidden in Rust +Medium - Entropy +Hard - Business Dev # Main event