Skip to main content

Red Team - Buffer Overflows

In this room, we aim to explore simple stack buffer overflows(without any mitigations) on x86-64 programs. We will use radare2 (r2) to examine the memory layout. You are expected to be familiar with x86 and r2 for this room. (TryHackMe)

Process Layout

When a program runs on a machine, the computer runs the program as a process. Current computer ar...

x86-64 Procedures

A program would usually comprise of multiple functions and there needs to be a way of tracking wh...

Procedures Continued

The explanation assumes that the current point of execution is inside the calc function. In this ...

Endianess

In the above programs, you can see that the binary information is represented in hexadecimal form...

Overwriting Variables

Now that we’ve looked at all the background information, let’s explore how the overflows actually...

Overwriting Function Pointers

For this example, look at the overflow- 2 folder. Inside this folder, you’ll notice the following...

Buffer Overflows

For this example, look at overflow-3 folder. Inside this folder, you’ll find the following C code...

Because life Sucks

My BOF learning journey