一、查看文件类型ELF32 有upx壳脱壳后kali中运行二、IDA静态分析1.查看main程序逻辑分析:程序会创建一个管道,然后开启一个子进程进行进程间通信。子进程将 69800876143568214356928753 发送给父进程。父进程要求用户输入一个整数,并且等于子进程的 pid 。后面就会对发送过来的数据进行解码成 flag 输出来。lol() 函数就是解码函数查看lol()用IDA7.6和7.5 F5后都没有程序内容查看汇编窗口发现有内容,可能新版IDA反编译此程序有问题查看WP后发现别人的没有问题三、解题脚本如下:a='69800876143568214356928753' v2=chr(2*ord(a[1])) v3=chr(ord(a[4])+ord(a[5])) v4=chr(ord(a[8])+ord(a[9])) v5=chr(2*ord(a[12])) v6=chr(ord(a[18])+ord(a[17])) v7=chr(ord(a[10])+ord(a[21])) v8=chr(ord(a[9])+ord(a[25]))
1.查壳PE32 有UPX壳运行脱壳2.IDA静态分析(1)mainint __cdecl main(int argc, const char **argv, const char **envp) { int v3; // kr00_4 char Buffer[40]; // [esp+4h] [ebp-2Ch] BYREF memset(Buffer, 0, sizeof(Buffer)); printf("Welcome The System\nPlease Input Key:"); gets_s(Buffer, 0x28u); v3 = strlen(Buffer); if ( (unsigned int)(v3 - 35) <= 2 ) { if ( sub_401090((int)Buffer, v3) == 1 ) printf("Well Done!\n"); else printf("Your Wrong!\n"); }
1.查壳发现有UPX壳脱壳运行回车后程序直接退出2.IDA静态分析int __cdecl main(int argc, const char **argv, const char **envp) { char Str2[14]; // [esp+12h] [ebp-3Ah] BYREF char Str1[44]; // [esp+20h] [ebp-2Ch] BYREF __main(); strcpy(Str2, "HappyNewYear!"); memset(Str1, 0, 32); printf("please input the true flag:"); scanf("%s", Str1); if ( !strncmp(Str1, Str2, strlen(Str2)) ) return puts("this is true flag!"); else return puts("wrong!"); }程序逻辑很简单,f
Norman1z