Pwnable/CTF (2) 썸네일형 리스트형 [BuckeyeCTF] ret4win Write Up pwnable 2번째 문제이다. 구성은 이전문제랑 비슷하다. flag.txt에 flag가 있음. 보호기법도 nx와 relro가 끝이고 문제이름만 봐도 bof로 ret주소 조작하는 문제일것같다. #include #include #include __attribute__((constructor)) void ignore_me() { setbuf(stdin, NULL); setbuf(stdout, NULL); setbuf(stderr, NULL); } void win(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5) { char* cmd = "cat flag.txt"; if (arg0 == 0xdeadbeef && arg1 == 0xcafebabe && a.. [BuckeyeCTF] staff Write Up 주어진 파일들이 꽤 많다. 대충 하나씩 열어보니 서버 실행환경이 우분투 20.04이고 도커이미지가 어떻게 구성되는지 알수있었음. 그리고 중요한것은 여기에 플레그가 있다. 원격서버에 접속해서 sp22.txt 파일에 있는 플레그를 읽으면 될듯. 보호기법을 확인해보면 64비트에 바이너리이며, 보호기법이 죄다 걸려있다. 주어진 소스코드를 확인해보았다. #include #include #include struct Course { char name[0x20]; char instructor[0x20]; int is_staff; }; static void find_instructor(struct Course *courses, int course_count); static void find_course(struct Co.. 이전 1 다음