LOB 페도라 FC3 hell_fire -> evil_wizard
Hacking/FC3(Fedora core)

LOB 페도라 FC3 hell_fire -> evil_wizard



주석에 Got Overwriting 가 명시되어있으므로 Got Overwriting 로 풀어보겠다.

strcpy@plt 를 이용하여 printf@got system 함수의 주소로 한 바이트씩 덮는다.

그리고 printf@plt 를 호출하여 systm 함수를 실행시킬수있다.

그러므로 우리가 구해야할주소는 strcpy@plt, ppr, system@plt, bss영역주소, /bin/sh 주소를 구해야한다.


 

strcpy@plt의 주소는 0x0804894이다.

 

 



ppr의 주소는 0x0804854f



printf@plt : 0x08048424

printf@got: 0x08049884



System: 0x7507c0



c0: 0x8048188



07: 0x08048148



75: 0x8048504



00: 0x08048128



binsh: 0x833603



bss: 0x080498b0

 



Ret strcpy 를 넣고 bss system_1 을 넣으면 ppr이 되어 다음 strcpy로 이동한다.

bss+1 system_2를 넣고 ppr이 되어 다음 strcpy로 이동한다.

반복하면 bss 영역에 system 주소가 다 들어가고 printf@got 부분에 bss(system)주소로 덮는다.

그리고 printf@plt 인자를 /bin/sh 주소로 하면 쉘이 따진다.



비밀번호는 get down like that 이다.