x86 Exploitation

ELF32 ROP

You have hopefully already ROPed on ELF64 binaries (https://pwn.college/program-security/return-oriented-programming/), but can you ROP on ELF32? This module serves as an introduction to the exploitation of 32 bit ELF binaries.

8 challenges

Challenges

CHALLENGE 01

Remember This?

— solves

Overflow a 32-bit binary and redirect execution into the win function.

CHALLENGE 02

Args Everywhere

— solves

Overflow a 32-bit binary and redirect execution into the win function with the correct arguments. Remember, arguments are typically passed differently on x86...

CHALLENGE 03

Single Call

— solves

Overflow a 32-bit binary and redirect execution into system. Setuid has already been called for you!

CHALLENGE 04

Double or Nothing

— solves

Overflow a 32-bit binary and redirect execution into 2 functions.

CHALLENGE 05

Clean Up Time

— solves

Overflow a 32-bit binary and redirect execution into 2 functions with the correct arguments. Remember, arguments have to be manually cleaned up on x86!

CHALLENGE 06

Double Call

— solves

Overflow a 32-bit binary to call setuid and system to obtain a shell.

CHALLENGE 07

GOT Nothing

— solves

Overflow a 32-bit binary to call setuid and system to obtain a shell. Use the PLT to bypass ASLR.

CHALLENGE 08

GOT Problems

— solves

Overflow a 32-bit PIE binary to call setuid and system to obtain a shell. A PIE leak is provided, but no libc leak is given.

Hint: A saved register value on the stack is corrupted when a buffer overflow takes place. This value must be restored correctly when calling the PLT when PIE is enabled. Research System V i386 ABI standard conventions.