(Jarvis Oj)(Re)DD-hello

(Jarvis Oj)(Re)DD-hello

丢到ida中,发现主函数和其调用的函数并没有什么有用的信息
(Jarvis Oj)(Re)DD-hello_第1张图片
这里写图片描述

但是发现了两个奇怪的函数,跟进
(Jarvis Oj)(Re)DD-hello_第2张图片
最后有个Final output猜测这是真正解密的函数。找到内置数据。
(Jarvis Oj)(Re)DD-hello_第3张图片
根据题目逻辑重写解密程序即可

1 #include
2 char cipher[]={0x41,0x10,0x11,0x11,0x1b,0x0a,0x64,0x67,0x6a,0x68,0x62,0x68,0x6e,0x67,0x68,0x6b,0x62,0x3d,0x65,0x6a,0x6a,0x3d,0x68,0x04,0x05,0x08,0x03,0x02,0x02,0x55,0x08,0x5d,0x61,0x55,0x0a,0x5f,0x0d,0x5d,0x61,0x32,0x17,0x1d,0x19,0x1f,0x18,0x20,0x04,0x02,0x12,0x16,0x1e,0x54,0x20,0x13,0x14};
3 long start_addr=0x100000CB0;
4 long dummy_addr=0x100000C90;                                                                                       
5 int main(void){
6     int v2=((start_addr-dummy_addr)>>2)^cipher[0];
7     for(int i=0;i<55;i++){
8         cipher[i]-=2;
9         cipher[i]^=v2;
10         v2++;
11     }
12     printf("%s\n",&cipher[1]);
13   return 0;
14 }

你可能感兴趣的:(re)