HackMe3 – Buffer overflow

HackMe3:
This password crack should be hacked by buffer overflow.

Download File: HackMe3(Linux)
Download File: HackMe3(Windows)

Theory:
The RAM layout has different virtual address spaces for every single process. The structure of a virtual address space is illustrated in the figure below.
ram
A stack buffer overflow can be for example a “write” in another variable. This is possible due to the stack structure. If we have the following C code.

int main(void)
{
    char Buffer[16];
    int pwValid = 0;
    return 0;
}

The stack looks like this.

stack

With this information if more than 16 letters will be written to the “Buffer” variable the stack will write into the next address space, where in this case the integer value “pwValid” is located. Due to this fact it is possible to change the value of a variable through a so called buffer overflow.

Leave a Reply

Your email address will not be published. Required fields are marked *

*