[WUSTCTF2020]level3
步骤:
- 例行检查,64位程序,无壳
- 64位ida载入,找到关键函数
看样子是个base64加密,但又感觉没那么简单,再翻翻左边的函数,找到了base64加密变表的函数
将加密表变换一下写个解密exp
import base64
table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
model = list("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")
s = "d2G0ZjLwHjS7DmOzZAY0X2lzX3CoZV9zdNOydO9vZl9yZXZlcnGlfD=="
for i in range(10):
model[i], model[19-i] = model[19-i], model[i]
model = ''.join(model)
print (model)
table = str.maketrans(model, table)
print (base64.b64decode(s.translate(table)))
用到了python3里的几个函数来制作翻译表
https://www.runoob.com/python3/python3-string-translate.html