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
GDB
Comme je n'étais pas hyper convaincu par le cours de TryHackMe, j'ai creusé ailleurs. Quoi qu'il ...
Function HiJack
Pour récupérer l'accès à une fonction, il nous faut : L'adresse de la fonction La taille du padd...
ShellCode Injection
Pour l'injection de shellcode, les étapes sont relativement similaires au détournement de fonctio...
La méthode du trampoline (x86)
Contrairement à la méthode du saut direct que nous avons vu précédemment dans BOF1 sur TryHackMe ...
L'overflow __scanf
On peut commencer par voir les protections associées à notre binaire : ┌──(arthur㉿LAPTOP-KSNUF8N7...