OSCP – Detail Guide to Stack-based buffer Overflow – 1

1116px Computer system bus.svg 1
OSCP Study materialAll Blogbuffer overflow

There are a lot of good writeups available over the internet, but I realized they are written within a bit of high-level Knowledge. If you are an absolute beginner then it will not easy to understand the entire concept of stack-based buffer overflow exploitation. So In this blog, we will learn about form very basics. Let’s start

Computer Architecture

The central processing unit (CPU), also called a central processor or main processor, within a computer that carries out the instructions of a program by performing the basic arithmetic, logic, controlling, and (I/O) operations specified by the instruction.

The system bus is responsible for handling the CPU, memory, and input/output devices. It combining the functions of a data bus to carry information, an address bus to determine where it should be sent, and a control bus to determine its operation.

A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in the computer, where data is to be processed and instructions required for processing are stored. The memory is divided into a large number of small parts called cells. Each location or cell has a unique address, which varies from zero to memory size minus one. For example, if the computer has 64k words, then this memory unit has 64 * 1024 = 65536 memory locations

In order to understand the Buffer overflow, we need to understand the concept of virtual memory. So whenever a program executed it is overlaid as a process in memory. The way it is laid out is that every process gets laid out( to spread something out, or to arrange things so you can see them easily) in the same virtual memory space – regardless of the actual physical memory location. imagine if you have 2 GB of ram then a new process can be overlaid anywhere in the RAM. However, the OS and CPU together help to maintain this memory abstraction eg. ( which program need what memory location, process etc). Every process feels that it is in the system alone and enjoy all the memory operations.

So How exactly does a process look in memory, What are the CPU components we will see in our next blogs.

Thanks for reading this blog for offensive security training join certcube labs.

Reference Links : –

  1. https://www.tutorialspoint.com/computer_fundamentals/computer_memory.htm
  2. https://en.wikipedia.org/wiki/Central_processing_unit

Leave a Reply

Your email address will not be published.