Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 3.37 KB

rop.md

File metadata and controls

79 lines (62 loc) · 3.37 KB

Return Oriented Programming (ROP) notes

An exploitation technique typically employed when a stack-based buffer overflow vulnerability exists. This consists of identifying "gadgets", which are simply sets of CPU instructions that end with a ret instruction. By "chaining" together several gadgets, an attacker can achieve arbitrary code execution. A few examples of this technique include:

  • Write data to memory and execute '/bin/bash' with the execve syscall
  • Call a libc function (ret2libc)
  • Use a call <reg> or jmp <reg> instruction to pass execution to shellcode (ret2reg)
  • Use a syscall to map writable memory, write the shellcode the memory region, and then execute it

Introduction to ROP

"Introduction to return oriented programming (ROP)", Code Arcana

Detailed history and exploration of ROP

"Return-Oriented Programming: Systems, Languages, and Applications" - Ryan Roemer, Erik Buchanan, Hovav Shacham, Stefan Savage

A very basic ret2reg example

Note: This is kind of difficult to read because of the screenshots, but is still worth understanding.

"Stack Overflow ASLR bypass using ret2reg", sickness

ROP examples at ropemporium.com

Writing shellcode to a mmap'ed region and executing it

"Exploit Writing Tutorial: ROP with Shellcode", Vincent Dary

Helpful ROP tricks, plus identifying ROP gadgets with radare2

"Basic ROP Techniques and Tricks", Josiah Pierce

ret2libc with an unknown libc at an unknown address

"Binary exploitation: ret2libc + unknown libc", Hugo "flawwan"

Differences between x86 32-bit and 64-bit ROP

"Return Oriented Programming - Part2", Adwaith "adwait1-G" Gautham

Deep dive into ret2libc on x86 64-bit systems

"64-bit Linux Return-Oriented Programming", Ben Lynn

Stack pivoting, frame faking, and other "fancy" ROP techniques

"Fancy ROP"

Bypassing Data Execution Prevention (DEP) on Windows

"Exploit Development: Hands Up! Give Us The Stack! This Is a ROPpery!", Connor McGarr

Walkthrough of a ropemporium challenge

"ROPEmporium: Pivot 32-bit CTF Walkthrough With Radare2", janne808

ROP chain with execve in a x86 64-bit Go application

"Smashing the Stack Part 2 - Building the ROP Chain", Danny "malwaresec" Colmenares

Basic explanations of using ROP to exploit stack-based buffer overflows

one_gadget execve finder tool

"one_gadget", david942j