Ready Gladiator 0
Author: LT 'syreal' Jones | 100 points
Description
Can you make a CoreWars warrior that always loses, no ties? Your opponent is the Imp. The source is available here.
If you wanted to pit the Imp against himself, you could download the Imp and connect to the CoreWars server like this: nc saturn.picoctf.net ***** < imp.red
Solution
We are given a 'player' file named imp.red
as shown below:
This challenge is a play on the game CoreWars. If you are not familiar with the game, look here for a really good beginners guide.
The TLDR is, CoreWars is a computer programming game where two assembly programs try to destroy one another in the memory of a simulated computer. If you don't know much about assembly, this can be a good introduction to low level computing.
The Imp is the most basic warrior in CoreWars. It is made up of a single instruction, mov 0,1
, which copies the current instruction (itself) to the next location in memory (a step ahead). This creates an infinite loop in which the program continuously adds instructions infront of itself.
To break the instruction down more, the whole instruction is made up of the following
So we are told to come up with a warrior who always loses to the Imp. This is so simple that my first try I did got the flag on accident. Below is my warrior.
Since this does nothing to preserve itself, it is quickly overwritten by the Imp program
Flag
The flag for this challenge is given to us after we lose to the Imp picoCTF{h3r0_t0_z3r0_4m1r1gh7_e1610ed2}
Last updated