bsides2022 – Crypto 3

17 October 2022 – Written by Valentin Huber – in ascii, crypto, and ctf


Challenge

籯籵籪籰粄类簹籽籽簼籷籽簹籽籱簼籬簹类簼粆

Solution

I first looked at the unicode numbers for the provided chars:

0x7c6f
0x7c75
0x7c6a
0x7c70
0x7c84
0x7c7b
0x7c39
0x7c7d
0x7c7d
0x7c3c
0x7c77
0x7c7d
0x7c39
0x7c7d
0x7c71
0x7c3c
0x7c6c
0x7c39
0x7c7b
0x7c3c
0x7c86

They obviously are very close together. The first thought was that it would just be about the last two chars, but this way, the flag string would start with o, which is wrong.

I then thought it might be a constant offset to ASCII, which turned out to be correct. Python code:

input = "籯籵籪籰粄类簹籽籽簼籷籽簹籽籱簼籬簹类簼粆"
diff = ord(input[0])-ord('f')
print('offset:', hex(diff))
r = ''
for e in input:
    r += chr(ord(e)-diff)

print('flag:', r)                                                                         

Output:

offset: 0x7c09
flag{r0tt3nt0th3c0r3}