pwn
nc_pwnre
一个异或的逻辑, 异或后是一串base64编码,提交解码后的文本就进到shell了
1 | a = [0x44,0x7c,0x5e,0x44,0x41,0x21,0x42,0x57,0x75,0x21,0x74,0x56,0x44,0x57,0x5d,0x67,0x44,0x46,0x29,0x45,0x5d,0x56,0x29,0x67,0x46,0x22,0x25,0x76,0x74,0x6a,0x52,0x69,0x5d,0x47,0x41,0x78,0x76,0x41,0x2d,0x2d] |
1 | TlNTQ1RGe1dFTGMwTV9UMF9wV25fdzByMWQhfQ== |
ret_text
1 | __isoc99_scanf("%d", &v2); |
-2147483648 进行 - 运算后会溢出,满足这个if的约束,能走到下边read,read那有一个栈溢出,覆盖返回地址为backdoor就好了
1 | from pwn import * |
re
test your Debugger
打个断点去内存里面看一下flag就好了
CompileMe!!!
一眼 xtea,尝试编译了一下发现爆内存 vs崩溃了,有一个new ZZZ()的操作跟了一下,发现爆内存的原因是调用栈 栈帧太多了,写一个class zzz,然后再写一个getval的方法,直接把val计算出来就好了。
1 | internal class Program |
一些文本处理的代码
1 | # import re |
1 | # data = """ |
执行后得到flag
1 | using System.Reflection.Metadata.Ecma335; |