Damjan Cvetko

Damjan Cvetko

Developer, System Architect, Hacker.

2 minutes read

Challenge: Santa has encoded a secret text in some weird format. Robots couldn’t decode it, let’s hope that humans and other beings can.

Attached to it was a string:

H4sIABgs5V0A/y2NwREAMAjCZuN4sAD7z9Lg9SMNiFUqS27DiGJt8nYRcGoHDrzsgqZTUs+ixFrAGVgc0Fp3ifSW/0cPFLPu/XUAAAA=

The obvious thing is that it’s a base64 encoded.. something. I decoded it into a file and looked at it.. It was binary, but actually mcview told me right away what kind of binary.

AGTACAACTTGACTGAGCATGAGACTCTAG.. What?

After some googling around I realized these (A, C, G, T) could be Nucleobases. Building blocks of DNA. Oh.. So that’s why “not robots” but “humans and other beings”. Ok, now for some research into DNA “encoding”! I have spent hours (in the night, morning and evening) trying all sorts of things: Looking for actual genome tooling. Tried EMBOSS without actually understanding anything…

Various combinations of base4 decoding (A=00, C=01, G=10, T=11). That did not work since 117 characters could not be grouped into 4-plets…

DNA pair rule (A and T, C and G), that did also not pan out, the pairs are just random…

117 can be divided into triplets, so maybe some weird shift of ASCII table by some bits… Garbage and more garbage output..

Research into old CTFs. ctf-katana had this sort of challenge, there was also a decoder table, but I got only garbage back with that one… There were also other lookup tables I found on the net and failed…

In the end I googled “DNA to ASCII” and landed here https://earthsciweb.org/js/bio/dna-writer/. It had yet another lookup table, and luckily an online form to convert thins. I don’t know if I’d try it otherwise. The output was “XMASI W4NT A HIPP0POTAMUS F0R CHR1STMAS”. Omg!

Now just a question of guessing how to transform it into correct formatting, as this form was not accepted by the CTF site. Try it as-is.. Nop.

Change XMAS to small, add {} and change spaces to _. There are no spaces in flags, doh! … Still, Nop.

Well.. let’s try spaces…

Flag: xmas{I W4NT A HIPP0POTAMUS F0R CHR1STMAS}

What did I learn: I wish I could say genetics, but rather, thers an online tool for everything.

Recent posts

See more

Categories

About