From Dusk Till Down
Challenge description Link to heading
This challenge was part of the European Cyber Week Qualification.
This goal of this challenge is to find the next number which must be print.
Solve Link to heading
After some researches on Google to understand the title of the challenge, it appears that’s the name of a film. On the wikipedia page in the synopsis
part there is a link with Twister. In programmation, twister refers to the mersenne twister generator.
The advantage of this number generator is that it’s a pseudo random generator. So we can predict the next number.
ATTENTION: keep the ssh session open during the operation else the seed will be different and we need to start again.
We connect in ssh to the challenge. Then we launch the challenge. The challenge asks us a number to generate a set of values. We take 10 values and put them in a file input.txt
. Once these values are generated, we need to find a mersenne generator to brute force the seed.
We can use this repo: Untwistter
Then with the following command we can brute force the seed:
./untwister -i input.txt -d 1
It takes a long time (~10 min).
Once the seed is find, we can generate the list of numbers create with this seed. The command is:
./untwister -g 6706650
Then the list appear. As we asked 10 numbers, we take the next one (29732694) and send it on the ssh. Catch the flag and it’s done.