getit
type : REV
Source :XCTF
File : Click me
It’s an elf and don’t have pack.
Using IDA Shift+F12 to see the strings.
Navigate to function:
Where the arrow marks is the result of flag encryption:
Write the python script:
s = 'c61b68366edeb7bdce3c6820314b7498'
v5 = 0
t1 = 'SharifCTF{????????????????????????????????}'
t = []
for i in t1:
t.append(i)
for i in range(len(s)):
if v5 & 1:
v3 = 1
else:
v3 = -1
t[v5 + 10] = str(chr(ord(s[v5]) + v3))
v5 = v5 + 1
flag = ''
for i in t:
flag+=i
print(flag)
flag get!