Cheep assembly language emulator to solve Tenet in HITCON CTF 2020.
Scala.js demo is here: http://y-yu.github.io/tenet-simulator
./sbt run
Note: the problem scenario is much simpler than original.
- A secret random number will be give as
EAX
register value- Other registers are all zero
- Then we'll run arbitrary assembly codes starting with the (1) register state
- When the code execution ends, the system accepts if
EAX
is zero- If
EAX
is not zero, the system will fail
- If
- The system will execute the code that is reverse ordered code executed in (2)
- When the reverse ordered code execution ends, if
EAX
equals to the secret random number in (1) then the system accepts