dreamhack에서
Bypass Pie & Rello파트에서 hook워게임이다.
free hook overwrite를 하면 되는 문제이다.
stdout의 주소를 공짜로 보여주니, libc_base를 얻을 수 있다. 이때 주의점은 libc.symbols["stdout"]이 아니라 libc.symbols["__IO_2_1stdout_"]이다.
readelf -s /lib/x86_64-linux-gnu/libc-2.31.so | grep stdout을 하면 알 수 있다.
./hook가 출력하는 주소의 하위 3바이트를 비교해보면 된다.
함께 실습 에서 나왔던 것과 똑같은 방법이라서 쉽게 했다.
__free_hook에 system주소를 넣으면 된다.
'system hacking > dreamhack(드림핵)' 카테고리의 다른 글
out_of_bound (0) | 2022.04.02 |
---|---|
oneshot (0) | 2022.04.01 |
basic_rop_x86 (0) | 2022.03.21 |
basic_rop_x64 (0) | 2022.03.20 |
Return Oriented Programming (0) | 2022.03.18 |