ROP32 — PicoCTF2019

DESCRIPTION

HINTS

SOURCE

### Gathering

The name and the hint itself pretty clear about what we’re going to do. If you don’t know what is ROP, then I suggest you should research it more about it andread this writeup.

  • eax == 0xb (11 in dec)
  • ebx == address in the memory of the string ‘/bin/sh’
  • ecx == a pointer point to the address of ‘/bin/sh’
  • edx == NULL (\x00)

###HACKING

first i use ROPgadget to find our gadgets and dump it into a file.

  • first we found all the suitable gadgets to trigger the syscall
  • I myself need to specify a clear way to solve this challenge xD
  • Step 1 — Write-what-where gadgets
  • Step 2 — Init syscall number gadgets
  • Step 3 — Init syscall arguments gadgets
  • Step 4 — Syscall gadget
  • Step 5 — Build the ROP chain
  • i’m using the following gadgets to write it:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store