Pwnable (22) 썸네일형 리스트형 [Dreamhack] My Decryption System Write Up 보호되어 있는 글입니다. [Dreamhack] Dream Restaurant Write Up 보호되어 있는 글입니다. [Pwnable] Format String Bug Format String Bug 란? 우리가 흔히 C언어 에서 사용하는 printf, Scanf 등에서 %d, %s 와 같은 것이 바로 Format String 이다. Format Stiring은 출력할 값의 Format(형식)을 지정해 주는 역할을 한다. Format String을 사용하는 함수에서 Format을 제대로 지정해 주지 않을 경우 format String Bug 취약점이 발생하여 공격이 가능하다. 주로 사용되는 Format String 을 대략적으로 정리하자면 다음과 같다. Format String 기능 %d 정수(10진수 int) %c 문자(char) %s 문자열(NULL을 만날 때 까지 출력) %f 실수(float) %lf 실수(double) %p 주소 출력할때 사용, 메모리 크기만큼 .. [Dreamhack] tiny backdoor Write Up 보호되어 있는 글입니다. [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.. [Dreamhack] ssp_001 Write Up 보호되어 있는 글입니다. [Dreamhack] ssp_000 Write Up 보호되어 있는 글입니다. 이전 1 2 3 다음