[网鼎杯_2020_青龙组]singal
vm逆向与符号执行angr
经典无壳,IDAF5直接逆向,改几个名字
int __cdecl vm_operad(int *a1yizhi, int a2) |
看上去好复杂,慢慢分析吧
a1yizhi数组是已知的
// aiyizhi[] |
可以看出case7是在检测flag输入的真假
0x22,0x3F,0x34,0x32,0x72,0x33,0x18,0xA7,0xFF,0xFF,0xFF,0x31,0xF1,0xFF,0xFF,0xFF,0x28,0x84,0xFF,0xFF,0xFF,0xC1,0xFF,0xFF,0xFF,0x1E,0x7A
input[0]^0x10-0x05=0x22 ‘7’
input[1]^0x20*0x03=0x3f ‘5’
input[2]-0x02-0x01=0x34 ‘7’
input[3]+1^0x04=0x32 ‘5’
input[4]*3-0x21=0x72 ‘1’
input[5]-2=0x33 ‘5’
input[6]^0x09-0x20=0x18 ‘1’
input[7]+0x51^0x24=0xA7 ‘2’
input[8]=0x31 ‘1’
input[9]*2+0x25=0xf1 ‘f’
input[10]+0x36^0x41=0x28 ‘3’
input[11]+0x20=0x84 ‘d’
input[12]*3+0x25=0xC1 ‘4’
input[13]^0x09-0x20=0x1E ‘7’
input[14]+0x42=0x7A ‘8’
flag{757515121f3d478}
这是手动试出来的,写代码挺麻烦的就算了
Ponce插件符号获取flag
不知道怎么装,
https://github.com/illera88/Ponce
使用python angr符号执行解决
代码
import angr |