Tags: crpyto 

Rating:

Challenge info:
Welcome To TheCyberGrabs CTF Buddy :)

flag format: cybergrabs{}

Author: Odin

The challnge provide a text file, and its content is:
```
CipherText :

@$$@@@$$@$$$$@@$@$$@@@$@@$$@@$@$@$$$@@$@@$$@@$$$@$$$@@$@@$$@@@@$@$$@@@$@@$$$@@$$@$$$$@$$@$$$@@@$@$$$@$@$@$$@$@@$@$$$@$@@@@$$@@$$@$@$$$$$@$$@@$$$@@$$@@@@@@$$@@@@@$$@@$@@@$@$$$$$@$$$@$$$@@$$@$@@@$$$@@$@@$$@$$@$@$$$@$@$@$$$@@@@@$@$$$$$@$$@$@@$@$$$@@$$@$$@$$$@@@$@@$$$@$$$@$@@@$@$$$$$@$$@$@@$@$$$@$@@@$$$$$@$
```

It was a little bit confusing at first, because I've never seen an encryption that uses only '@' and '$' signs.

Then, I focused on the number of different characters in the cipher - only 2! The most common encoding that uses only 2 different characters is converting the text to binary!

@ = 0

$ = 1

This python script converts the cipher to binary :
```
#encrypted flag
cipher = """@$$@@@$$@$$$$@@$@$$@@@$@@$$@@$@$@$$$@@$@@$$@@$$$@$$$@@$@@$$@@@@$@$$@@@$@@$$$@@$$@$$$$@$$@$$$@@@$@$$$@$@$
@$$@$@@$@$$$@$@@@@$$@@$$@$@$$$$$@$$@@$$$@@$$@@@@@@$$@@@@@$$@@$@@@$@$$$$$@$$$@$$$@@$$@$@@@$$$@@$@@$$@$$@$@$$$@$@$@$$$
@@@@@$@$$$$$@$$@$@@$@$$$@@$$@$$@$$$@@@$@@$$$@$$$@$@@@$@$$$$$@$$@$@@$@$$$@$@@@$$$$$@$"""

#convert to binary
cipher = cipher.replace('@', '0')
cipher = cipher.replace('$', '1')

#print the binary, and add a space between each char (8 binary digits)
for i, char in enumerate(cipher):
if i != 0 and i % 8 == 0:
print (" ", end="")
print(char, end="")
```

After I got the binary representation, I used this script to decode it:
```
binary = """01100011 01111001 01100010 01100101 01110010 01100111 01110010 01100001 01100010 01110011 01111011
01110001 01110101 01101001 01110100 00110011 01011111 01100111 00110000 00110000 01100100 01011111 01110111 00110100
01110010 01101101 01110101 01110000 01011111 01101001 01110011 01101110 00100111 01110100 01011111 01101001 01110100
01111101"""

#convert binary data to ascii characters, and get the flag
for char in binary.split(" "):
print(chr(int(char, 2)), end="")
```

Output: cybergrabs{quit3_g00d_w4rmup_isn't_it}