IDA查看源代码
src长度32,encrypt函数加密,工4个参数,_FFFC双击,可以看到是个长度为7的固定值FnTest!
加密函数将4个参数又重新命名,混淆视听,但是还是可以看到是嵌套循环,动态调试直接看结果可以发现,函数将32个字符分成7个一组,每组分别异或这个7长度的字符串 。根据异或的性质
enc = [0x20, 0x0c, 0x30, 0x57, 0x43, 0x47, 0x14, 0x77, 0x0c, 0x66, 0x54, 0x17, 0x43, 0x19, 0x71, 0x59,0x67, 0x53, 0x17, 0x45, 0x18, 0x77, 0x5c, 0x36, 0x5d, 0x45, 0x42, 0x45, 0x22, 0x08, 0x35, 0x57
]
s = "FnTest!"decrypted = ''.join(chr(enc[i] ^ ord(s[i % 7])) for i in range(len(enc)))
print(decrypted)
flag: fbd20351b21d787736d1912b866ddfa2