rotateKrypton Level 6 β†’ Level 7

The challenge involves a stream cipher that uses a repeating key and a weak "random" number.

cd /krypton/krypton6
ls -la

There are the provided hints:

The README contains the challenge description as always.

And the encrypt binary which will encrypt any string we gave it using the keyfile.dat in the same directory.

Lets test it out:

As shown every 30 character, the cipher text will repeat it self:

Also with other letter:

The same process, where for example the first A and B letters are shifted 4 bytes, where the second A and B are shifted 8 bytes, and the third ones are shifted 2 bytes, and so on.

Knowing that we can easily recover the correct password, using the same method.

We can get how many character a character has been shifted starting from the first one, and we will use the same length of the encrypted flag:

This list contains where each A is shifted depending on its place in the string up to the length of the cipher text.

We will use this list to subtract the cipher text for each character with its index place:

As shown some letters are not capital letters just like the original cipher text, so we need to make sure that if a characters goes under the capital letter 'A' to add 26 to wrap around the alphabet:

Here is the correct password.

Last updated