일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Lazenca
- _IO_FILE Arbitrary Address Write
- seccomp
- master canary
- malware
- __environ
- HackCTF
- ROP
- srop
- DFC 2022
- DreamHack
- tcache
- Reversing
- _IO_FILE
- GOT overwrite
- BOF
- H4CKING GAME
- Android
- RTL
- vtable
- DFB
- heap feng shui
- UAF
- shellcode
- _IO_FILE Arbitrary Address Read
- heap exploit
- heap
- 나뭇잎 책
- Dynamic Analysis
- K-shield Junior
Archives
- Today
- Total
Studying Security
[HackCTF] pwnable: Basic_FSB 풀이 본문
728x90
반응형
Mitigation
Vulnerability Analysis
fgets( [ebp-0x808], 0x400, stdin )
snprintf( [ebp-0x408], 0x400, [ebp-0x808])
[ebp-0x808]을 [ebp-0x408]에 출력 → snprintf함수의 경우 Format String Bug 발생 가능
printf( [ebp-0x408] )
바이너리 파일 실행 (Format String Bug를 이용하기 위해 stack 확인)
flag라는 shell을 따오는 함수가 존재함
→ FSB를 이용해 printf의 got를 flag함수의 주소로 got overwrite 실시
→ printf가 실행되는 대신 flag함수 실행
Exploit code
Result
반응형
'Wargame > HackCTF' 카테고리의 다른 글
[HackCTF] pwnable: x64 Simple_size_BOF 풀이 (0) | 2022.04.08 |
---|---|
[HackCTF] pwnable: x64 Buffer Overflow 풀이 (0) | 2022.04.08 |
[HackCTF] pwnable: 내 버퍼가 흘러넘친다!!! 풀이 (0) | 2022.04.08 |
[HackCTF] pwnable: Basic_BOF #2 풀이 (0) | 2022.04.07 |
[HackCTF] pwnable: Basic_BOF #1 풀이 (0) | 2022.04.07 |
Comments