Buffer over flow1 [SECCON Beginners CTF 2022] BeginnersBof 1. 개요 Buffer over flow 문제 2. 분석 스텍프레임이 40 으로 생겼고, 40 다 채우고 이후 8바이트를 win() 함수의 주소로 채워서 main 함수 종료시점에 win() 함수가 실행되도록 합니다. #include #include #include #include #include #include #include #define BUFSIZE 0x10 void win() { char buf[0x100]; int fd = open("flag.txt", O_RDONLY); if (fd == -1) err(1, "Flag file not found...\n"); write(1, buf, read(fd, buf, sizeof(buf))); close(fd); } int main() { int len.. 2022. 6. 5. 이전 1 다음