write-up/pwnable.kr
[toddler's bottle] mistake
ㅋㅋ 이 문제 개웃김 ㅋㅋ 이게 실제 현장에 있었던 취약점이라는게 놀랍다 ㄷㄷ; #include #include #define PW_LEN 10#define XORKEY 1 void xor(char* s, int len){ int i; for(i=0; i 0)){ printf("read error\n"); close(fd); return 0; } char pw_buf2[PW_LEN+1]; printf("input password : "); scanf("%10s", pw_buf2); // xor your input xor(pw_buf2, 10); if(!strncmp(pw_buf, pw_buf2, PW_LEN)){ printf("Password OK\n"); system("/bin/cat flag\n");..
2018. 11. 30. 20:08