ctfwriteup.com
Search…
⌃K

Puzzle 6

CALLDATALOAD

Puzzle

############
# Puzzle 6 #
############
00 6000 PUSH1 00
02 35 CALLDATALOAD
03 56 JUMP
04 FD REVERT
05 FD REVERT
06 FD REVERT
07 FD REVERT
08 FD REVERT
09 FD REVERT
0A 5B JUMPDEST
0B 00 STOP
? Enter the calldata:

Solution

From evm.codes:
CALLDATALOAD
CALLDATALOAD(0x00) loads calldata with offset 0 (LSB in this case), and JUMP jumps to this address.
The objective is to jump to address 0x0A, so calldata should be 0x000000000000000000000000000000000000000000000000000000000000000A, where 31 bytes of 0x00 are padded on the left.
Last modified 1d ago