美文网首页
流浪者_攻防世界_RE【1】

流浪者_攻防世界_RE【1】

作者: 火把_033f | 来源:发表于2020-04-06 11:47 被阅读0次

题目描述

下载附件后发现是一个exe,根据图标判断是mfc写的,题目要求输入flag。

解题过程

拖入IDA,查找字符串,发现如下字符串:


查找字符串.png

找到引用KanXue...这个字符串的代码:


image.png

调用了这个函数的函数是:


image.png

所以读懂这两个函数在编写对应的解密算法就可以了

abc='abcdefghiABCDEFGHIJKLMNjklmn0123456789opqrstuvwxyzOPQRSTUVWXYZ'
crypt='KanXueCTF2019JustForhappy'
result=list()
for index in range(len(crypt)):
    this_char=crypt[index]
    char_index=abc.index(this_char)
    result.append(char_index)
print(result)

def getOrigin(input):
    if input>=0 and input<=9:
        return input+48
    if input+87>=91 and  input+87<=122:
        return input+87
    if input+29>65 and  input+29<=90:
        return input+29
    print(str(input)+'error')
result2=''
for ele in result:
    result2=result2+chr(getOrigin(ele))
print (result2)

但是笔者很头疼这种东西。所以打算使用Z3试一试,我也是昨天晚上才知道了Z3这个东西的。

评论

需要一点win32编程的知识。
其余的就没有什么特别需要在意的了。

相关文章

网友评论

      本文标题:流浪者_攻防世界_RE【1】

      本文链接:https://www.haomeiwen.com/subject/hzyvphtx.html