Pwn - Void

Medium

Description

The room goes dark and all you can see is a damaged terminal. Hack into it to restore the power and find your way out.

Downloads

865KB
Open

Solution

checksec output

The binary is very simple with a vuln() function that has a clear stack buffer overflow.

Looking at the GOT, there is only read available.

GOT
  1. With no win function anywhere

  2. No method like puts to leak a libc address

  3. Relatively big space to hold a payload (read(0, buf, 200))

It suggest that we'll need to do a Ret2dlresolve ROP chain.

Firstly, the code to find the padding needed to control rip.

We find the padding needed to be 72 bytes. We then, proceed with creating the dlresolve ROP chain using pwntools. While the concept is not so straight-forward, the exploit is very easily written with pwntools. The entire exploit code is as simple as such:

Flag: HTB{r3s0lv3_th3_d4rkn355}

Last updated