-
dreamhack - Kind kid list writeup TOP NEW
[dreamhack] Kind kid list writeup 1. 문제 Kind kid list 일기를 거짓으로 쓴 것을 산타할아버지가 알게되었어요... 그래서 나쁜 아이 목록에 제 이름을 쓰셨어요... 제 이름을 지워주실 수 있나요? 😈 취약점을 찾아 flag를 획득하세요. 플래그 형식은 DH{…} 입니다. https://dreamhack.io/wargame/challenges/730 2. 풀이 int intro() { int i; // [rsp+Ch] [rbp-4h] for ( i = 0; i <= 99; ++i )... Read More
-
dreamhack - XOR Board writeup TOP NEW
-
dreamhack - newstrcmp writeup TOP NEW
[dreamhack] newstrcmp writeup 1. 문제 newstrcmp 드림이가 strcmp 함수를 직접 구현하며 기능을 추가했어요. 주어진 바이너리와 소스 코드를 분석하여 익스플로잇하고 플래그를 획득하세요! 플래그는 flag 파일에 있습니다. https://dreamhack.io/wargame/challenges/980 2. 풀이 _DWORD *__fastcall newstrcmp(const char *str1, __int64 str2, _DWORD *a3) { int indicator; // edx _DWORD *result; // rax... Read More
-
dreamhack - Repeat Service writeup TOP NEW
[dreamhack] Repeat Service writeup 1. 문제 Repeat Service Repeat Service는 문자열을 입력해주면 반복해서 출력해주는 편리한 서비스입니다. 반복하고 싶은 문구가 있다면 한 번 사용해보세요! 문자열을 계속 출력하다보면 플래그를 얻을 수 있을지도...? https://dreamhack.io/wargame/challenges/1149 2. 풀이 #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string... Read More
-
dreamhack - cpp_container_1 writeup TOP NEW
[dreamhack] cpp_container_1 writeup 1. 문제 cpp_container_1 이 문제는 서버에서 작동하고 있는 서비스(cpp_container_1)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾아 flag를 획득하세요! 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/62 2. 풀이 #include <iostream> #include <vect... Read More
-
dreamhack - mining game writeup TOP NEW
-
dreamhack - Bypass IO_validate_vtable writeup TOP NEW
[dreamhack] Bypass IO_validate_vtable writeup 1. 문제 Bypass IO_validate_vtable Exploit Tech: Bypass IO_validate_vtable에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/365 2. 풀이 #include <stdio.h> #include <unistd.h> FILE *fp; void init() { setvbuf(stdin, 0, 2, 0); setvbuf(stdout, 0, 2, 0); } ... Read More
-
dreamhack - iofile_aw writeup TOP NEW
[dreamhack] iofile_aw writeup 1. 문제 iofile_aw 이 문제는 서버에서 작동하고 있는 서비스(iofile_aw)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 get_shell 함수를 실행시키세요. 셸을 획득한 후, 'flag' 파일을 읽어 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/55 2. 풀이 #include <stdio.h> #include &l... Read More
-
dreamhack - _IO_FILE Arbitrary Address Read writeup TOP NEW
[dreamhack] _IO_FILE Arbitrary Address Read writeup 1. 문제 _IO_FILE Arbitrary Address Read Exploit Tech: _IO_FILE Arbitrary Address Read에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/366 2. 풀이 #include <stdio.h> #include <unistd.h> #include <string.h> char flag_buf[1024]; FILE *fp; void in... Read More
-
dreamhack - checkflag writeup TOP NEW
[dreamhack] checkflag writeup 1. 문제 checkflag 이 문제는 플래그를 입력하면 정답 여부를 확인하는 바이너리를 통해 플래그를 추출하는 문제입니다. 플래그는 DH{...} 형식이며, printable ASCII 문자(0x20-0x7e)로만 이루어져 있습니다. https://dreamhack.io/wargame/challenges/97 2. 풀이 int __cdecl main(int argc, const char **argv, const char **envp) { __int64 count; // rcx char *v4;... Read More
-
dreamhack - Master Canary writeup TOP NEW
[dreamhack] Master Canary writeup 1. 문제 Master Canary Exploit Tech: Master Canary에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/359 2. 풀이 #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> void giveshell() { execve("/bin/sh", 0, 0); } void init() { setv... Read More
-
dreamhack - Tcache Poisoning writeup TOP NEW
[dreamhack] Tcache Poisoning writeup 1. 문제 Tcache Poisoning Exploit Tech: Tcache Poisoning에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/358 2. 풀이 #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main() { void *chunk = NULL; unsigned int size; int idx; setvbuf(stdin,... Read More
-
dreamhack - struct person_t writeup TOP NEW
[dreamhack] struct person_t writeup 1. 문제 struct person_t I created a program with my own structure, struct person_t! 🧑🦱 https://dreamhack.io/wargame/challenges/1866 2. 풀이 #include <stdlib.h> #include <stdio.h> #include <unistd.h> struct person_t { char nationality[32]; char name[56]; ... Read More
-
dreamhack - Period writeup TOP NEW
[dreamhack] Period writeup 1. 문제 Period Period, about Time or just Punctuation? https://dreamhack.io/wargame/challenges/1375 2. 풀이 ssize_t __fastcall writeln(__int64 a1) { int i; // [rsp+1Ch] [rbp-4h] for ( i = 0; ; ++i ) { write(1, (const void *)(i + a1), 1uLL); if ( *(_BYTE *)(i + a1) == 46 ) ... Read More
-
dreamhack - blindsc writeup TOP NEW
[dreamhack] blindsc writeup 1. 문제 blindsc 주어진 바이너리를 분석하여 익스플로잇하고 플래그를 획득하세요! 플래그는 flag 파일에 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/1018 2. 풀이 int __cdecl main(int argc, const char **argv, const char **envp) { __int64 v3; // rbx __int64 v4; // rbx __int64 v5; // rbx __int64 v... Read More
-
dreamhack - stb-lsExecutor writeup TOP NEW
-
dreamhack - randerer writeup TOP NEW
[dreamhack] randerer writeup 1. 문제 randerer rand() canary! https://dreamhack.io/wargame/challenges/1531 2. 풀이 int win() { return system("/bin/sh"); } void init_canary() { unsigned int v0; // eax __int64 v1; // rbx int i; // [rsp+Ch] [rbp-14h] v0 = time(0LL); srand(v0); for ( i = 0; i <= 7; ++i ) {... Read More
-
dreamhack - dowell writeup TOP NEW
[dreamhack] dowell writeup 1. 문제 dowell We all do well to get shell! https://dreamhack.io/wargame/challenges/1568 2. 풀이 int __cdecl main(int argc, const char **argv, const char **envp) { char *s[2]; // [rsp+0h] [rbp-10h] BYREF s[1] = (char *)__readfsqword(0x28u); setvbuf(stdin, 0LL, 2, 0LL); setvbuf(stdout, 0... Read More
-
dreamhack - Dream's Notepad writeup TOP NEW
[dreamhack] Dream’s Notepad writeup 1. 문제 Dream's Notepad 드림이가 메모장 프로그램을 만들었어요! 취약점을 찾아 드림이가 숨겨둔 메모인 플래그를 읽어보세요! https://dreamhack.io/wargame/challenges/405 2. 풀이 #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> void Initalize(){ setvbuf(stdin, (char *)NULL... Read More
-
dreamhack - Cat Jump writeup TOP NEW
[dreamhack] Cat Jump writeup 1. 문제 Cat Jump 고양이가 방해물을 피해 옥상으로 올라갈 수 있도록 도와주세요! 플래그 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/701 2. 풀이 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #define CAT_JUMP_GOAL 37 #define CATNIP_PROBABILITY 0.1 #defin... Read More
-
dreamhack - stacknote writeup TOP NEW
[dreamhack] stacknote writeup 1. 문제 stacknote usually notes are stored in the heap, but this time it's stored in the stack. https://dreamhack.io/wargame/challenges/1997 2. 풀이 int __fastcall create_note(__int64 buf) { __int64 i; // [rsp+18h] [rbp-8h] for ( i = 0LL; ; ++i ) { if ( i > 9 ) return puts... Read More
-
dreamhack - MSNW writeup TOP NEW
-
dreamhack - _IO_FILE Arbitrary Address Write writeup TOP NEW
[dreamhack] _IO_FILE Arbitrary Address Write writeup 1. 문제 _IO_FILE Arbitrary Address Write Exploit Tech: _IO_FILE Arbitrary Address Write에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/367 2. 풀이 #include <stdio.h> #include <unistd.h> #include <string.h> char flag_buf[1024]; int overwrite_me;... Read More
-
dreamhack - environ writeup TOP NEW
[dreamhack] environ writeup 1. 문제 environ 이 문제는 작동하고 있는 서비스(environ)의 바이너리와 소스코드가 주어집니다. Environ ptr 기법을 통해 스택 주소를 유출하고 익스플로잇해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/31 2. 풀이 #include <stdio.h> #include <... Read More
-
dreamhack - send_sig writeup TOP NEW
[dreamhack] send_sig writeup 1. 문제 send_sig 서버로 signal을 보낼 수 있는 프로그램입니다! 프로그램의 취약점을 찾고, 익스플로잇해 flag를 읽어보세요. flag는 home/send_sig/flag.txt에 있습니다. https://dreamhack.io/wargame/challenges/145 2. 풀이 void __noreturn start() { setvbuf(stdout, 0LL, 2, 0LL); setvbuf(stdin, 0LL, 1, 0LL); write(1, "++++++++++++++++... Read More
-
dreamhack - SigReturn_Oriented-Programming writeup TOP NEW
[dreamhack] SigReturn_Oriented-Programming writeup 1. 문제 SigReturn Oriented-Programming Exploit Tech: SigReturn-Oriented Programming에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/364 2. 풀이 #include <unistd.h> int gadget() { asm("pop %rax;" "syscall;" "ret" ); } int main() { char buf[16]... Read More
-
dreamhack - Overwrite _rtld_global writeup TOP NEW
[dreamhack] overwrite rtld writeup 1. 문제 Overwrite _rtld_global Exploit Tech: _rtld_global에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/360 2. 풀이 #include <stdio.h> #include <stdlib.h> void init() { setvbuf(stdin, 0, 2, 0); setvbuf(stdout, 0, 2, 0); } int main() { long addr; long data; ... Read More
-
Dockerfile 기반 환경 세팅 TOP NEW
System Hacking - Dockerfile 기반 환경 세팅 1. Dockerfile CTF 문제를 풀다보면 서버와 같은 환경을 쉽게 맞춰주기 위해 Dockerfile이 제공된다. 이걸 기반으로 서버와 동일한 환경에서 exploit을 연습할 수 있다. 2. 환경 세팅 2.1. Docker image 빌드 먼저 docker 이미지를 빌드하자. docker build -t [image name] . 2.2. Docker 컨테이너 실행 docker run -d -p 9999:9999 --name [container name] [image name] 여기서 각 옵션은 아래와 같다. -d: ... Read More
-
dreamhack - rtld writeup TOP NEW
[dreamhack] rtld writeup 1. 문제 rtld 이 문제는 작동하고 있는 서비스(rtld)의 바이너리와 소스코드가 주어집니다. 프로그램의 취약점을 찾고 rtld overwrite 공격 기법으로 익스플로잇해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/35 2. 풀이 #include <stdio.h> #in... Read More
-
dreamhack - bypass_seccomp-1 writeup TOP NEW
-
dreamhack - seccomp writeup TOP NEW
-
dreamhack - tcache_dup2 writeup TOP NEW
-
dreamhack - tcache_dup writeup TOP NEW
[dreamhack] tcache_dup writeup 1. 문제 tcache_dup 이 문제는 작동하고 있는 서비스(tcache_dup)의 바이너리와 소스코드가 주어집니다. Tcache dup 공격 기법을 이용한 익스플로잇을 작성하여 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/60 2. 풀이 #include <stdio.h... Read More
-
dreamhack - master_canary writeup TOP NEW
[dreamhack] master_canary writeup 1. 문제 master_canary 이 문제는 서버에서 작동하고 있는 서비스(master_canary)의 바이너리와 소스 코드가 주어집니다. 카나리 값을 구해 실행 흐름을 조작해 셸을 획득하세요. 셸을 획득한 후 얻은 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/58 2. 풀이 #include <stdio.h> #include &... Read More
-
dreamhack - validator writeup TOP NEW
[dreamhack] validator writeup 1. 문제 validator 취약한 인증 프로그램을 익스플로잇해 flag를 획득하세요! Hint: 서버 환경에 설치된 5.4.0 이전 버전의 커널에서는, NX Bit가 비활성화되어 있는 경우 읽기 권한이 있는 메모리에 실행 권한이 존재합니다. 5.4.0 이후 버전에서는 스택 영역에만 실행 권한이 존재합니다. https://dreamhack.io/wargame/challenges/94 2. 풀이 __int64 __fastcall main(int a1, char **a2, char **a3) { c... Read More
-
dreamhack - uaf_overwrite writeup TOP NEW
[dreamhack] uaf_overwrite writeup 1. 문제 uaf_overwrite Exploit Tech: Use After Free에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/357 2. 풀이 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> struct Human { char name[16]; int weight; long age; }; struct... Read More
-
dreamhack - fho writeup TOP NEW
[dreamhack] fho writeup 1. 문제 fho Exploit Tech: Hook Overwrite에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/355 2. 풀이 #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main() { char buf[0x30]; unsigned long long *addr; unsigned long long value; setvbuf(stdin, 0, _IONBF... Read More
-
dreamhack - basic_exploitation_002 writeup TOP NEW
[dreamhack] basic_exploitation_002 writeup 1. 문제 basic_exploitation_002 이 문제는 서버에서 작동하고 있는 서비스(basic_exploitation_002)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/4 2. 풀이... Read More
-
dreamhack - rop writeup TOP NEW
[dreamhack] rop writeup 1. 문제 rop Exploit Tech: Return Oriented Programming에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/354 2. 풀이 #include <stdio.h> #include <unistd.h> int main() { char buf[0x30]; setvbuf(stdin, 0, _IONBF, 0); setvbuf(stdout, 0, _IONBF, 0); // Leak canary puts("[1] ... Read More
-
dreamhack - Return to Library writeup TOP NEW
[dreamhack] Return to Library writeup 1. 문제 Return to Library Exploit Tech: Return to Library에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/353 2. 풀이 #include <stdio.h> #include <unistd.h> const char* binsh = "/bin/sh"; int main() { char buf[0x30]; setvbuf(stdin, 0, _IONBF, 0); setvbuf(std... Read More
-
dreamhack - ssp_001 writeup TOP NEW
[dreamhack] ssp_001 writeup 1. 문제 ssp_001 이 문제는 작동하고 있는 서비스(ssp_001)의 바이너리와 소스코드가 주어집니다. 프로그램의 취약점을 찾고 SSP 방어 기법을 우회하여 익스플로잇해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/33 2. 풀이 #include <stdio.h> #includ... Read More
-
dreamhack - Return to Shellcode writeup TOP NEW
[dreamhack] Return to Shellcode writeup 1. 문제 Return to Shellcode Exploit Tech: Return to Shellcode에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/352 2. 풀이 #include <stdio.h> #include <unistd.h> void init() { setvbuf(stdin, 0, 2, 0); setvbuf(stdout, 0, 2, 0); } int main() { char buf[0x50]; ... Read More
-
dreamhack - basic_rop_x86 writeup TOP NEW
[dreamhack] basic_rop_x86 writeup 1. 문제 basic_rop_x86 이 문제는 서버에서 작동하고 있는 서비스(basic_rop_x86)의 바이너리와 소스 코드가 주어집니다. Return Oriented Programming 공격 기법을 통해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/30 2. 풀이 #... Read More
-
dreamhack - basic_rop_x64 writeup TOP NEW
[dreamhack] basic_rop_x64 writeup 1. 문제 basic_rop_x64 이 문제는 서버에서 작동하고 있는 서비스(basic_rop_x64)의 바이너리와 소스 코드가 주어집니다. Return Oriented Programming 공격 기법을 통해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/29 2. 풀이 #... Read More
-
dreamhack - basic_exploitation_000 writeup TOP NEW
[dreamhack] basic_exploitation_000 writeup 1. 문제 basic_exploitation_000 이 문제는 서버에서 작동하고 있는 서비스(basic_exploitation_000)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/2 ... Read More
-
dreamhack - Stupid_gcc writeup TOP NEW
-
dreamhack - cpp_type_confusion writeup TOP NEW
[dreamhack] cpp_type_confusion writeup 1. 문제 cpp_type_confusion 이 문제는 서버에서 작동하고 있는 서비스(cpp_type_confusion)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾아 flag를 획득하세요!. 'flag' 파일을 읽어 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/65 2. 풀이 #include <iostream> #inc... Read More
-
dreamhack - iofile_vtable writeup TOP NEW
[dreamhack] iofile_vtable writeup 1. 문제 iofile_vtable 이 문제는 서버에서 작동하고 있는 서비스(iofile_vtable)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 get_shell 함수를 실행시키세요. 셸을 획득한 후, 'flag' 파일을 읽어 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/56 2. 풀이 #include <stdio.h... Read More
-
dreamhack - mmapped writeup TOP NEW
-
dreamhack - cpp_string writeup TOP NEW
[dreamhack] cpp_string writeup 1. 문제 cpp_string 이 문제는 서버에서 작동하고 있는 서비스(cpp_string)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾아 flag를 획득하세요! 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/64 2. 풀이 #include <iostream> #include <fstream> #include ... Read More
-
dreamhack - __environ writeup TOP NEW
-
dreamhack - awesome-basics writeup TOP NEW
[dreamhack] awesome-basics writeup 1. 문제 awesome-basics Stack Buffer Overflow 취약점이 존재하는 프로그램입니다. 주어진 바이너리와 소스 코드를 분석하여 익스플로잇하고 플래그를 획득하세요! 플래그는 flag 파일에 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/835 2. 풀이 #include <stdio.h> #include <stdlib.h> #include <signal.h>... Read More
-
UAF (Use After Free) TOP NEW
System Hacking - UAF (Use After Free) 1. UAF란 프로그램이 해제된 (free) 메모리를 다시 사용하는 경우에 발생하는 취약점이다. 보통 free함수를 통해 해제된 포인터를 다시 참조하거나 사용하는 코드가 존재할 때 발생하며, 이 메모리를 공격자가 악의적으로 제어 가능한 데이터로 덮어쓰면 프로그램 흐름이 조작되거나 정보를 유출할 수 있다. 발생 조건은 아래와 같다. 동적으로 할당된 메모리를 free함수로 해제한 후, 해당 포인터를 다시 사용할 경우 2. 예시 코드 #include <stdio.h> #include <stdlib.h> #includ... Read More
-
Linux Mitigation TOP NEW
System Hacking - Linux Mitigation 1. checksec을 통한 확인 리눅스에서는 바이너리에 대해 다양한 보호기법을 가지고 있다. 이러한 보호기법은 checksec이라는 프로그램을 통해 확인할 수 있는데 아래와 같이 직접 설치하거나, pwntools를 설치하면 함께 설치되어 사용할 수 있다. sudo apt install checksec ubuntu@instance-20250406-1126:~/dreamhack/level1/cherry$ checksec chall [!] Could not populate PLT: Cannot allocate 1GB memory to run Unicor... Read More
-
dreamhack - cherry writeup TOP NEW
[dreamhack] cherry writeup 1. 문제 cherry 주어진 바이너리와 소스 코드를 분석하여 익스플로잇하고 플래그를 획득하세요! 플래그는 flag.txt 파일에 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/959 2. 풀이 #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <unistd.h> #include <string.h> #include &... Read More
-
dreamhack - pwn-library writeup TOP NEW
[dreamhack] pwn-library writeup 1. 문제 pwn-library 드림이가 오랜만에 도서관에 왔습니다! 원하는 책을 읽어볼까요? 플래그는 /home/pwnlibrary/flag.txt에 있습니다. https://dreamhack.io/wargame/challenges/118 2. 풀이 #include <stdio.h> #include <string.h> #include <stdlib.h> struct bookstruct{ char bookname[0x20]; char* contents; }; ... Read More
-
dreamhack - Format String Bug writeup TOP NEW
-
dreamhack - basic_heap_overflow writeup TOP NEW
[dreamhack] basic_heap_overflow writeup 1. 문제 basic_heap_overflow 이 문제는 서버에서 작동하고 있는 서비스(basic_heap_overflow)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/66 2. 풀이 ... Read More
-
dreamhack - memory_leakage writeup TOP NEW
[dreamhack] memory_leakage writeup 1. 문제 memory_leakage 이 문제는 서버에서 작동하고 있는 서비스(memory_leakage)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/69 2. 풀이 #include <stdio.h> ... Read More
-
dreamhack - off_by_one_001 writeup TOP NEW
[dreamhack] off_by_one writeup 1. 문제 off_by_one_001 이 문제는 서버에서 작동하고 있는 서비스(off_by_one_001)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 get_shell 함수를 실행시키세요. 셸을 획득한 후, 'flag' 파일을 읽어 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/10 2. 풀이 #include <st... Read More
-
dreamhack - ssp_000 writeup TOP NEW
[dreamhack] ssp_000 writeup 1. 문제 ssp_000 이 문제는 작동하고 있는 서비스(ssp_000)의 바이너리와 소스코드가 주어집니다. 프로그램의 취약점을 찾고 SSP 방어 기법을 우회하여 익스플로잇해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/32 2. 풀이 #include <stdio.h> #include <stdlib... Read More
-
dreamhack - cmd_center writeup TOP NEW
[dreamhack] cmd_center writeup 1. 문제 cmd_center IP를 확인할 필요가 없습니다! 혹시 다른 명령어는 못쓰나요? 다른 명령어를 사용했다면 플래그를 획득하세요! https://dreamhack.io/wargame/challenges/117 2. 풀이 #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> void init() { setvbuf(stdin, 0, 2, 0); setvbuf(std... Read More
-
dreamhack - sint writeup TOP NEW
[dreamhack] sint writeup 1. 문제 sint 이 문제는 서버에서 작동하고 있는 서비스(sint)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 get_shell 함수를 실행시키세요. 셸을 획득한 후, 'flag' 파일을 읽어 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/25 2. 풀이 #include <stdio.h> #include <stdlib.h> #i... Read More
-
dreamhack - hook writeup TOP NEW
[dreamhack] hook writeup 1. 문제 hook 이 문제는 작동하고 있는 서비스(hook)의 바이너리와 소스코드가 주어집니다. 프로그램의 취약점을 찾고 _hook Overwrite 공격 기법으로 익스플로잇해 셸을 획득한 후, 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/52 2. 풀이 #include <stdio.h> #include <s... Read More
-
patchelf 사용법 및 libc/ld 개념 TOP NEW
System Hacking - patchelf 사용법 및 libc/ld 개념 1. libc libc란 C 표준 Library를 가리키는 말로, C언어로 작성된 프로그램이 동작하는데 필요한 기본 함수들을 제공한다. 대표적으로 GNU C Library인 glibc가 있고, 우리가 아는 printf, scanf, malloc 등 대다수의 주요 함수들이 포함되어있다고 보면된다. 일반적으로 아래 위치에 존재한다. /lib/x86_64-linux-gnu/libc.so.6 2. ld.so (interpreter) ld.so는 동적 링커 (Dynamic Linker/Loader)를 가리키는 말로, 실행 시 프로그램이 ... Read More
-
GOT and PLT TOP NEW
System Hacking - GOT and PLT 1. GOT와 PLT GOT란 Global Offset Table로서, 라이브러리 함수의 실제 주소를 저장해두는 표이다. 원래 C 프로그램에서 사용되는 함수들은 libc등의 라이브러리에 정의되어있고, 실제 주소는 프로그램 실행 시점에 결정된다. 그러나 컴파일할 때는 함수의 주소를 알 수 없고, GOT를 lookup해서 실제 함수 주소를 구하게 된다. PLT라는 것도 있는데, Procedure Linkage Table이라는 일종의 함수 호출을 위한 중간 점프 테이블이다. 좀 더 자세히 설명하자면, 컴파일된 코드에서는 printf함수의 주소가 없고, 아래와 같... Read More
-
dreamhack - oneshot writeup TOP NEW
[dreamhack] basic_exploitation_003 writeup 1. 문제 oneshot 이 문제는 서버에서 작동하고 있는 서비스(oneshot)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 셸을 획득하세요. 'flag' 파일을 읽어 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/34 2. 풀이 #include <stdio.h> #include <stdlib.h> #in... Read More
-
dreamhack - basic_exploitation_003 writeup TOP NEW
[dreamhack] basic_exploitation_003 writeup 1. 문제 basic_exploitation_003 이 문제는 서버에서 작동하고 있는 서비스(basic_exploitation_003)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 셸을 획득하세요. 'flag' 파일을 읽어 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/5 2. 풀이_1 #include <stdio.h>... Read More
-
dreamhack - out_of_bound writeup TOP NEW
[dreamhack] out_of_bound writeup 1. 문제 out_of_bound 이 문제는 서버에서 작동하고 있는 서비스(out_of_bound)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 셸을 획득하세요. 'flag' 파일을 읽어 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/11 2. 풀이 전역 변수로 설정된 name에 16bytes만큼 입력을 받고, 임의의 숫자 값 idx를 입력해... Read More
-
dreamhack - rao (Return Address Overwrite) writeup TOP NEW
[dreamhack] rao (Return Address Overwrite) writeup 1. 문제 rao (Return Address Overwrite) Exploit Tech: Return Address Overwrite에서 실습하는 문제입니다. https://dreamhack.io/wargame/challenges/351 2. 풀이 get_shell함수를 실행시키면 쉘을 실행시킬 수 있다. main함수에서는 buf에 scanf함수로 입력을 제한없이 받기 때문에, 리턴주소를 get_shell함수의 주소로 덮으면 될 것이다. 사실상 basic_exploit... Read More
-
dreamhack - basic_exploitation_001 writeup TOP NEW
[dreamhack] basic_exploitation_001 writeup 1. 문제 basic_exploitation_001 이 문제는 서버에서 작동하고 있는 서비스(basic_exploitation_001)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 'flag' 파일을 읽으세요. 'flag' 파일의 내용을 워게임 사이트에 인증하면 점수를 획득할 수 있습니다. 플래그의 형식은 DH{...} 입니다. https://dreamhack.io/wargame/challenges/3 2. 풀이 간단하게 read... Read More
-
dreamhack - baby-bof writeup TOP NEW
[dreamhack] baby-bof writeup 1. 문제 baby-bof Simple pwnable 101 challenge Q. What is Return Address? Q. Explain that why BOF is dangerous. https://dreamhack.io/wargame/challenges/974 2. 풀이 win함수를 실행시키면 flag를 열어서 출력해줄 것이다. 다만, main에서는 win함수를 실행하지않는데, 대신에 win함수의 주소를 준다. name을 먼저 입력 받고, 그뒤에 hex value를 입력 받아... Read More
-
dreamhack - bof writeup TOP NEW
[dreamhack] bof writeup 2025 여름을 맞아서 dreamhack에 있는 워게임을 열심히 풀어보기로 결심했다. 다음 학기에 예정된 CTF 스타일 코스웍 (Gatech CS 6265)이 있기 때문에 미리 선행?하는 겸사겸사 매번 시스템 해킹 공부를 할때마다 모든 것을 잊어버리는 바람에 처음부터 하게되는데, 이번에는 그러지 않기 위해서 블로그 형식으로 기록을 남겨놓고자 한다. 이제 시작! 1. 문제 bof Buffer overflow is one of the basics of pwnable 🐱 The path of the flag file is /home/bof/... Read More