blockchain/evm-conditions
463 points
Writeup by Aryan
We are given some EVM runtime bytecode, and we need to find the value, in hex, to send in order to make the contract STOP and not self-destruct. The bytecode is quite long.
We can decompile the EVM using Dedaub, giving us some Assembly code.
We can simulate the assembly by hand and create a trivial Python script to get the flag. I won't include the entire process of simulating here because I'm lazy. But basically, the final equation we get is 3 * (0x9 ** 0x7) = 0x4 * 0x690 + 0x1e + CALLVALUE
, and we just re-arrange to find the value of CALLVALUE
that makes the two statements equal.
Attached below is the final equation.
Flag: n00bz{0xdafba0}
Last updated