일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- string
- anti
- PMA
- toddler
- practicalmalwareanalysis
- reversing
- rev
- pwnable.kr
- Bug
- shellcode
- CANARY
- format
- BOF
- TUCTF
- pico
- FSB
- Leak
- Rookiss
- writeup
- shellcraft
- CTF
- ASM
- Toddler's Bottle
- picoCTF
- Bottle
- pwn
- Read
- Reverse
- 2018
- pwnable
- Today
- Total
목록strcpy (2)
제리의 블로그
programSource #include #include #include #include #define FLAGSIZE_MAX 64 char flag[FLAGSIZE_MAX]; void sigsegv_handler(int sig) { fprintf(stderr, "%s\n", flag); fflush(stderr); exit(1); } void vuln(char *input){ char buf[16]; strcpy(buf, input); } int main(int argc, char **argv){ FILE *f = fopen("flag.txt","r"); if (f == NULL) { printf("Flag File is Missing. Problem is Misconfigured, please con..
요약이 문제는 c 라이브러리의 rand() 함수의 seed 값을 BOF 를 이용하여 덮어씌우고100개의 rand() 값을 맞추는 문제입니다. 입력받은 name 을 strcpy 로 스택영역에 복사하는데입력 길이 제한이 없기 때문에 overflow 하여 seed 값으로 이용되는 지역변수를 덮어씌워줍니다. 그 후부터는 seed 값을 알게된 셈이므로rand() 값을 100번 인증하면 됩니다. writeup lucky_exploit# nc 167.99.143.206 65031 Hello, there! What is your name? j3rrry I am glad to know you, j3rrry! If you guess the next 100 random numbers I shall give you the f..