GuidePoint Security CTF 2021 - Ssxor (crypto)
2 minute read Published:
Writeup for the Guidepoint 2021 CTF Ssxor crypto challenge
Guidepoint Security CTF 2021 - Ssxor (crypto) For this challenge we get an encrypted string and the python script that was used to generate it:
2e1209315c05627148004b3b46160a565858560a16463b4b00487162055c3109122e import binascii flag = 'StormCTF{Crypto4:blahblahblah}' flag_rev = list(flag[::-1]) stuff = zip(flag, flag_rev) x = lambda x,y: chr(ord(x) ^ ord(y)) out = list() out += [x(s[0],s[1]) for s in stuff] final = [str(b, 'ascii') for b in [binascii.hexlify(bytes(x, 'utf-8')) for x in out]] print(''.join(final)) stuff = zip(flag_rev, out) out = list() out += [x(s[0],s[1]) for s in stuff] print(''.