
Exploiting a Stack Buffer Overflow to Force Program Termination
Machine Problem 1 Group Members: Deen, Ligero, Torres Introduction This machine problem involved analyzing and exploiting a deliberately vulnerable C program. Under normal execution, the program reads a line of input and then enters an infinite loop, preventing it from terminating on its own. The objective of the exercise was to exploit a stack-based buffer overflow vulnerability to force the program to exit with a status code of 1 , without modifying the original source code. Achieving this required constructing a carefully crafted binary payload, commonly referred to as shellcode , that would overwrite the program’s return address on the stack. By redirecting execution to this injected code, the exploit could hijack the program’s control flow at the assembly level and invoke the Linux exit system call directly. The Vulnerable Program The vulnerable program is shown below. Source file: vuln.c #include <stdio.h> void vuln () { char buffer [ 8 ]; gets ( buffer ); } int main () { vuln ()
Continue reading on Dev.to
Opens in a new tab



