ASIS 2015 Finals: meow meow (misc75)

Reading time ~13 minutes

We got the following file:

(((_____ << __) + _) << ((((_____ << __) - _) << ____) - _)) - (((((___ << __) - _) << __) + _) << (((((_ << ___) + _)) << _____) + (_ << __))) + (((_______ << _____) - _______) << ((((_ << ____) + _) << ____) + (___ << _))) - (((_ << _______) - ___) << ((((_ << ____) + _) << ____) - ___)) + (((((___ << __) + _) << ____) - ___) << ((_ << ________) + (_ << _))) + (((___ << ______) + _____) << ((((_ << ____) - _) << ____) + _______)) - (((((_ << ____) - _) << ____) - ___) << ((((_ << ____) - _) << ____) - ___)) + (((((___ << __) - _) << _____) + ___) << ((_______ << _____))) + (((_______ << _____) + _) << ((((___ << __) + _) << ____) + (___ << _))) - (((((___ << __) - _) << ___) - ___) << ((((___ << __) + _) << ____) - ___)) + (((((_____ << __) - _) << ____) + ___) << ((___ << ______))) + (((((___ << __) + _) << ___) - ___) << ((___ << ______) - (_ << ___))) + (((___ << ______) + _) << ((((___ << __) - _) << ____) - (_ << _))) - (((((_____ << __) - _) << ____) + ___) << ((_____ << _____) + ___)) - (((_______ << _____) + _____) << ((((_____ << __) - _) << ___) + _)) - (((((___ << __) + _) << ____) - _____) << (((((_ << ___) + _)) << ____))) + (((___ << ______) + _) << ((((_ << ____) + _) << ___) - (_ << _))) - (((((_ << ____) - _) << __) + _) << ((_ << _______) - ___)) + (((((___ << __) + _) << ____) - ___) << ((_______ << ____) + (_ << _))) + (_______ << ((((___ << __) + _) << ___) + ___)) + (((_______ << ____) - ___) << ((___ << _____) - _)) - (((((_ << ____) - _) << __) + _) << ((((___ << __) - _) << ___) - _)) - (((((___ << __) + _) << ___) + ___) << ((_____ << ____) - (_ << _))) - (((((_ << ____) - _) << ___) - ___) << ((((_ << ____) + _) << __) + _)) + (((_____ << ____) + ___) << ((((_ << ____) - _) << __))) + (((_____ << ___) - _) << ((((___ << __) + _) << __) - _)) + (((_______ << ___) + _) << ((_____ << ___))) + (((_ << _____) - _) << ((_ << _____) + (_ << _))) - (((((___ << __) - _) << __) - _) << ((((___ << __) + _) << _))) - (((___ << ___) - _) << ((_____ << __) - _)) + (((_____ << __) + _) << ((___ << __))) + ((((___ << __) + _)) << ______) + _ 

You have to replace the underscore with a number depending how many underscore followed each other. So _ becomes 1, __ becomes 2, etc. Then you get the following expression:

(((5 << 2) + 1) << ((((5 << 2) - 1) << 4) - 1)) - (((((3 << 2) - 1) << 2) + 1) << (((((1 << 3) + 1)) << 5) + (1 << 2))) + (((7 << 5) - 7) << ((((1 << 4) + 1) << 4) + (3 << 1))) - (((1 << 7) - 3) << ((((1 << 4) + 1) << 4) - 3)) + (((((3 << 2) + 1) << 4) - 3) << ((1 << 8) + (1 << 1))) + (((3 << 6) + 5) << ((((1 << 4) - 1) << 4) + 7)) - (((((1 << 4) - 1) << 4) - 3) << ((((1 << 4) - 1) << 4) - 3)) + (((((3 << 2) - 1) << 5) + 3) << ((7 << 5))) + (((7 << 5) + 1) << ((((3 << 2) + 1) << 4) + (3 << 1))) - (((((3 << 2) - 1) << 3) - 3) << ((((3 << 2) + 1) << 4) - 3)) + (((((5 << 2) - 1) << 4) + 3) << ((3 << 6))) + (((((3 << 2) + 1) << 3) - 3) << ((3 << 6) - (1 << 3))) + (((3 << 6) + 1) << ((((3 << 2) - 1) << 4) - (1 << 1))) - (((((5 << 2) - 1) << 4) + 3) << ((5 << 5) + 3)) - (((7 << 5) + 5) << ((((5 << 2) - 1) << 3) + 1)) - (((((3 << 2) + 1) << 4) - 5) << (((((1 << 3) + 1)) << 4))) + (((3 << 6) + 1) << ((((1 << 4) + 1) << 3) - (1 << 1))) - (((((1 << 4) - 1) << 2) + 1) << ((1 << 7) - 3)) + (((((3 << 2) + 1) << 4) - 3) << ((7 << 4) + (1 << 1))) + (7 << ((((3 << 2) + 1) << 3) + 3)) + (((7 << 4) - 3) << ((3 << 5) - 1)) - (((((1 << 4) - 1) << 2) + 1) << ((((3 << 2) - 1) << 3) - 1)) - (((((3 << 2) + 1) << 3) + 3) << ((5 << 4) - (1 << 1))) - (((((1 << 4) - 1) << 3) - 3) << ((((1 << 4) + 1) << 2) + 1)) + (((5 << 4) + 3) << ((((1 << 4) - 1) << 2))) + (((5 << 3) - 1) << ((((3 << 2) + 1) << 2) - 1)) + (((7 << 3) + 1) << ((5 << 3))) + (((1 << 5) - 1) << ((1 << 5) + (1 << 1))) - (((((3 << 2) - 1) << 2) - 1) << ((((3 << 2) + 1) << 1))) - (((3 << 3) - 1) << ((5 << 2) - 1)) + (((5 << 2) + 1) << ((3 << 2))) + ((((3 << 2) + 1)) << 6) + 1 

You can evaluate in this for example in python to this number:

341864076565289913991194230839622826699458146321693262127464374283953336041975703075161723713

Converting this number to ASCII (for example with my JS tools on kt.pe) gives you the flag:

ASIS{981e1ea684c8055f60e3a58cabb4c060}

HITCON CTF 2019 Quals: Reverse - EmojiVM

This challenge was a VM implemented where every instruction was an emoji. For the first part of the challenge we had to reverse a flag ch...… Continue reading

HITCON CTF 2019 Quals: Reverse - CoreDumb

Published on October 19, 2019

HITCON CTF 2019 Quals: Pwn - Crypto in the shell

Published on October 19, 2019