[*] '/home/zelas/Desktop/pwn/jarvisoj_test_your_memory/memory' Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled //栈不可执行 PIE: No PIE (0x8048000)
IDA
mem_test()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
int __cdecl mem_test(char *s2) { int result; // eax char s[19]; // [esp+15h] [ebp-13h] BYREF
memset(s, 0, 0xBu); puts("\nwhat???? : "); printf("0x%x \n", hint); puts("cff flag go go go ...\n"); printf("> "); __isoc99_scanf("%s", s); if ( !strncmp(s, s2, 4u) ) result = puts("good job!!\n"); else result = puts("cff flag is failed!!\n"); return result; }
发现系统调用
1 2 3 4
int __cdecl win_func(char *command) { return system(command); }