Symbolic Decimals Ctflearn

Ashutosh Gupta
2 min readMay 22, 2020

--

Hey folks this is my first blog on medium.com. In this I will tell you how to solve a CTF challenge of CTFlearn name “Symbolic decimals”.

This challenge comes in hard but I don’t think so this should be in this criteria as after solving this it was very easy. So I am coming directly to writeup.

When you open this challenge you will see some hint and the cipher.

“Did you know that you can hide messages with symbols? For example, !@#$%^&*( is 123456789!<br /> Now Try: ^&,*$,&),!@#,*#,!!^,(&,!!$,(%,$^,(%,*&,(&,!!$,!!%,(%,$^,(%,&),!!!,!!$,(%,$^,(%,&^,!)%,!)@,!)!,!@% However, this isn't as easy as you might think.”

When you will see the hint you get to know that !=1 and @=2 and #=3 and so on. These are given on the upper numeric pad of keyboard.

But there is twist in cipher as there is comma(,) after two or three characters. But if you will print it with comma you can’t decode it further . So I used space(‘ ‘) instead of comma(,) to decode it. You can do it using pen and paper but I decode it using python :

s="^&,*$,&),!@#,*#,!!^,(&,!!$,(%,$^,(%,*&,(&,!!$,!!%,(%,$^,(%,&),!!!,!!$,(%,$^,(%,&^,!)%,!)@,!)!,!@%"
s1=""
l=len(s)
c=0
l=l-1
while c<=l:
ch=s[c]
if ch=='!':
s1=s1 +'1'
elif ch =='@':
s1=s1+'2'
elif ch =='#':
s1=s1+'3'
elif ch =='$':
s1=s1+'4'
elif ch =='%':
s1=s1+'5'
elif ch =='^':
s1=s1+'6'
elif ch =='&':
s1=s1+'7'
elif ch =='*':
s1=s1+'8'
elif ch =='(':
s1=s1+'9'
elif ch ==')':
s1=s1+'0'
else:
s1=s1+' '
c=c+1
print(s1)

When you will run the program you will get this:

67 84 70 123 83 116 97 114 95 46 95 87 97 114 115 95 46 95 70 111 114 95 46 95 76 105 102 101 125

As you can see this is encoded in decimal. To decode this I used this website

https://v2.cryptii.com/decimal/text

And Boom ! you get the flag:)

CTF{Star_._Wars_._For_._Life}

Thanks, everyone for reading:)

Happy Hacking ;)

--

--

No responses yet