Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
29 | 30 |
Tags
- Read
- Rookiss
- PMA
- TUCTF
- reversing
- anti
- BOF
- shellcode
- Toddler's Bottle
- CTF
- pwn
- pwnable
- pwnable.kr
- ASM
- toddler
- 2018
- string
- Bottle
- FSB
- writeup
- format
- shellcraft
- Bug
- rev
- CANARY
- Leak
- Reverse
- practicalmalwareanalysis
- picoCTF
- pico
Archives
- Today
- Total
제리의 블로그
pwnable.kr flag 본문
flag - 7 pt
Papa brought me a packed present! let's open it.
Download : http://pwnable.kr/bin/flag
This is reversing task. all you need is binary
이번 문제는 리버싱 분야입니다.
디버깅해보니 섹션정보도 일반 바이너리와 달랐고
SYS_mmap 로 새로운 메모리 할당하는 것을 보고 패킹을 의심했었고
# strings ./flag
...
UPX!
UPX!
문자열 검사를 해보니
UPX 패킹이 되어있었습니다.
언패킹을 해주면
mov edi, offset aIWillMallocAnd ; "I will malloc() and strcpy the flag there. take it."
call puts
mov edi, 64h
call malloc
mov [rbp+var_8], rax
mov rdx, cs:flag ; "UPX...? sounds like a delivery service :)"
mov rax, [rbp+var_8]
mov rsi, rdx
mov rdi, rax
call strcpy_0
malloc 으로 할당한 다음
flag 를 strcpy 하는 코드였습니다.
'Wargame > pwnable.kr' 카테고리의 다른 글
pwnable.kr random (0) | 2018.08.30 |
---|---|
pwnable.kr passcode (0) | 2018.08.29 |
pwnable.kr bof (0) | 2018.08.24 |
pwnable.kr collision (0) | 2018.08.24 |
pwnable.kr fd (0) | 2018.08.24 |
Comments