이번에 풀어볼 문제는 Protostar의 Format3이다.
문제는 다음 사이트에서 확인할 수 있다.
old.liveoverflow.com/binary_hacking/protostar/format3.html
Format 3 - LiveOverflow
Solving format1 from exploit-exercises.com with a simple Format String vulnerability, exploited with %n.
old.liveoverflow.com
1. 문제 확인
if(target == 0x01025544) { printf("you have modified the target :)\n");
Format2번과 마찬가지로 target을 맞춰야 하는 문제이다.
일단 abcdefg abcdefg를 format3에 넣어주었더니,
tar get is target is 00000000 :( 이렇게 나온다.
objdump -t ./format3 | grep target 을 해주어서 target의 주소를 알아낸다.
여기서 target 주소는 0x080496f4이다.
그런데 앞에 코드에서 보면,
target == 0x01025544
이렇게 target을 맞춰주어야 하는 것을 확인할 수 있다.
'security > 시스템' 카테고리의 다른 글
Protostar - Heap 0 (0) | 2020.11.08 |
---|---|
Protostar - Fromat 4 (0) | 2020.11.05 |
Protostar - Format 2 (0) | 2020.11.05 |
Protostar - Format 0 (0) | 2020.11.03 |
Protostar - Stack2 (0) | 2020.09.22 |
댓글