CTF WriteupsJoepardy

CipherTextCTF v2 Writeups Crypto

The Eighth Circle Of Hell Encryption – Crypto


After a clumsy search on challenge name “The Eighth Circle Of
Hell Encryption” you will find Malbolge esoteric programming
language ( https://en.wikipedia.org/wiki/Malbolge ) and this table for its
encrypted version :





for i in text:
    if i in malp:

Using your good eyes on the cipher text and the table any one
could figure out that numbers with value less than 9 and the ‘_’
symbol cant be found on the table so they aren’t encrypted!
Other numbers are encrypted using the table. Our alphabets are
26 characters and the cipher text don’t have any ‘Encrypted’
number with result more than 25 so the encryption is done using
a map of 0 to 25 mapped using the table above and 0 to 25
number refer to the 26 alphabet characters so with a little python
code you will solve the challenge. The code is:

then you will get an unfamiliar text that is weird and scary:
so what the heck is this text?

After running a bit of substitution ciphers, Ceaser Cipher (key = 18) in particular, you will get this readable text:

Carmichael – Crypto

Cipher text: gevcyr_qrf_pna_or_qbar_jvgu_nyy_nytbevguzf

Solution 1:

After seeing “code” file content we realize the encryption is done
using Ceaser cipher in “enc” and “dec” functions, triple DES style,
3 keys where used also but the keys are missing.
So, with a fuzzy search on challenge name “Carmichael” we find
this page ( https://en.wikipedia.org/wiki/List_of_OEIS_sequences ) and

And by using first 3 numbers { 561, 1105, 1729 } as keys you can use the code ( enc(dec(enc(c,k[0]),k[1]),k[2]) ) to encrypt anything and by
reversing the code you will get ( dec(enc(dec(c,k[2]),k[1]),k[0]) ) as
decryption and solve it to get the flag:

Solution 2:

To get keys you can also brute force them.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button