| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
- igoat
- MFT
- XSS
- otter
- Docker
- lord of sql injection
- Volatility
- imageinfo
- dreamhack
- beebox
- Suninatas
- filescan
- elasticsearch
- SQL Injection
- Openstack
- 2018
- 안드로이드
- base64
- frida
- ESXi
- 인시큐어뱅크
- binwalk
- kibana
- vulnhub
- diva
- foremost
- Strings
- InsecureBank
- CTF-d
- ctf
- Today
- Total
Information Security
Stack 1 본문
volatile 4byte int type 변수 modified 선언, char buffer 64byte char type arrary buffer 선언했다.
modfied 값을 0x61626364로 초기화해야 하는 것 같다.

AAAA, BBB를 입력해보았는 데 Try again 메시지를 보여준다.

A를 여러개 입력 해 overflow 발생시켰지만 modified 값이 "0x61626364"로 변경되지 않을 경우 아래와 같은 메시지를 보여준다.

disas mian 명령어를 통해 main 함수를 확인했다. 0x61626364와 modified를 비교해야 하므로 modfied = rbp - 0x4(main+76)이다. buffer는 strcpy의 detination이므로 *main+68이다. rdi가 rax로부터 오므로 rax가 오는 메모리 값 rbp - 0x50이다. modified는 0x40, buffer는 0x50이다. 따라서 연산하면 0x4c(76)이다.

break point main+79 설정 후 A를 76개 입력했다.

modified 위치 $rsp를 보면 0x41이 들어가 있는 것을 알 수 있다.

modified 변수의 값을 수정하기 위해서 76byte의 padding이 필요하고 modified를 "0x61626364"로 대입하면 된다.

