Buffer Overflow Attacks
Buffer Overflow Attacks
Introduction
A buffer overflow is a form of software vulnerability that arises when a program
during its execution writes more data to a buffer or temporary data storage area than
the buffer is designed to hold. This excessive data can overflow into adjacent
memory spaces and potentially overwriting or corrupting the valid data stored there.
This could cause erratic program behavior including memory access errors or
incorrect results a crash or a breach of system security.
Exploiting a buffer overflow vulnerability can allow malicious actors to execute
arbitrary code and that will cause a potentially gaining unauthorized access or
control over a system specifically with privileges root user .
This is partly because buffer overflows can occur in various ways and the techniques
used to prevent them are often error-prone.
1. Stack-based Buffer Overflow Exploits: These are the most common type of
buffer overflow exploits. They occur when a program writes more data to the
stack than it can handle and causing to an overflow of the stack space. By doing
so attackers can overwrite the return address of a function and point it to
malicious code thus achieving arbitrary code execution or remote code
execution (RCE).
Rapport of research 1
Mitigation Techniques:
1. Non-Executable (NX) Bit Utilization: A significant mitigation strategy within
CPU technology is the deployment of the Non-Executable (NX) bit. Its purpose is
to compartmentalize memory into areas designated for code storage and those
for data storage so activating the NX bit for a particular memory segment implies
that the area is non-executable and creating a protective barrier that hinders the
execution of malicious code even in the event of a buffer overflow.
Rapport of research 2