So, today we will create an exploit based on buffer overflow.
A buffer overflow is a phenomenon that occurs when a computer program writes data outside of the buffer allocated in memory!
Working with the script
Let's work with the script, we can take any program, it's best to work with a program in C, C++, C# ( if you have an exe, then I advise you to resort to decompilation ), the UBS v5.0 program is written in Delphi v6, here are the sources:
We have compiled the program!
So, I'll try to use another program in C.
First, let's do a compilation stage in GCC - https://gcc.gnu.org/releases.html, pre-install the sudo apt-get install gcc-multilib library
gcc -g -Wall -Werror -O0 -m32 -fno-stack-protector -z execstack -no-pie -Wl,-z,norelro -mpreferred-stack-boundary=2 -o victim victim.c
A buffer overflow is a phenomenon that occurs when a computer program writes data outside of the buffer allocated in memory!
Working with the script
Let's work with the script, we can take any program, it's best to work with a program in C, C++, C# ( if you have an exe, then I advise you to resort to decompilation ), the UBS v5.0 program is written in Delphi v6, here are the sources:
We have compiled the program!
So, I'll try to use another program in C.
First, let's do a compilation stage in GCC - https://gcc.gnu.org/releases.html, pre-install the sudo apt-get install gcc-multilib library
gcc -g -Wall -Werror -O0 -m32 -fno-stack-protector -z execstack -no-pie -Wl,-z,norelro -mpreferred-stack-boundary=2 -o victim victim.c