第一题:Hello,RE!
所以:这道题的flag是flag{Welcome_To_RE_World!}
第二题:ReadAsm2
一篇写的很好的博客:https://blog.youkuaiyun.com/xiangshangbashaonian/article/details/78881498
第三题:Py交易
使用pyc反编译工具:https://tool.lu/pyc/ 得到py源码。
在notepad++上编写py逆向代码
import base64
correct = 'XlNkVmtUI1MgXWBZXCFeKY+AaXNt'
s=base64.b64decode(correct) #Base64解密
print(s)
b=''
for i in range(len(s)):
x=(ord(s[i])-16)^32 #将代码倒过来写
b+=chr(x)
print(b)
运行得:nctf{d3c0mpil1n9_PyC}
只有Python3的好像运行不了。
第四题:WxyVM
用IDA打开 ,main()函数,sub_4005B6() 改变了输入的flag
进入sub_4005B6()
(回到Main()函数)之后,改变了的604B80(flag),又与601060处的比较,如果相等则为正确。
所以,入手点就是 601060处的数据 和 6010C0处的数据 。
解题思路:把 sub_4005B6() 逆向编程,代入 601060 和 6010C0 处数据 编译后 输出。。。
分析程序,发现需要14997Byte的数据(只玩过几行程序的我 惊讶。。。),于是博客一波,Get到 IDC编程 (IDA里的内置脚本语言),可以直接访问地址。
IDC编程推荐博客 —— http://www.cnblogs.com/gwind/p/8250842.html
Shift+F2 打开IDC脚本编译框。
附:ZSky-T 这位的源码 和 flag:nctf{Embr4ce_Vm_j0in_R3}
#include <idc.idc>
static main()
{
auto v0,result,i,v3;
auto addr_fuzhu = 0X6010C0;
for(i = 14997; i >= 0 ; i -= 3)
{
v0 = Byte(addr_fuzhu + i);
v3 = Byte(addr_fuzhu + i + 2);
result = v0;
if(v0 == 1)
{
result = Byte(addr_fuzhu + i +1);
PatchByte(0X601060 + result*4 ,(Byte(0X601060 + result*4) - v3));
}
if(v0 == 2)
{
result = Byte(addr_fuzhu + i + 1);
PatchByte(0X601060 + result*4 , (Byte(0X601060 + result*4) + v3));
}
if(v0 == 3)
{
result = Byte(addr_fuzhu + i + 1);
PatchByte(0X601060 + result*4, (Byte(0X601060 + result*4) ^ v3));
}
if(v0 == 4)
{
result = Byte(addr_fuzhu + i + 1);
PatchByte(0X601060 + result*4, (Byte(0X601060 + result*4) / v3));
}
if(v0 == 5)
{
result = Byte(addr_fuzhu + i + 1);
PatchByte(0X601060 + result*4, (Byte(0X601060 + result*4) ^ Byte(0X601060 + 4*v3)));
}
}
for(i=0 ; i<24 ; i++)
{
Message("%c",Byte(0X601060 + i * 4));
}
}
另一种解法:https://blog.youkuaiyun.com/tu_siji/article/details/80220307 把数据提取出来存放在文件里,再写代码
第五题:maze
第六题:WxyVM2