Skip to content

amirrosen1/buffer-overflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Buffer Overflow Exploit – Exercise 1

This repository contains the solution for Exercise 1 – Buffer Overflow from the Cybersecurity Lab (67607) at the Hebrew University.


πŸ“š Overview

The objective of this exercise is to exploit a stack-based buffer overflow vulnerability in a remote C server.
The crafted payload overflows the buffer, overwrites the return address, and injects custom shellcode that executes the script /tmp/success_script with the submitter's ID.


πŸ› οΈ Files Included

File Description
ex1.c Main C program – crafts and sends the buffer overflow payload
shellcode.s Assembly source for the injected shellcode
explanation.txt Detailed explanation of the payload and assembly logic
readme.txt Submitter IDs in the format id1,id2
.gitignore Ignores .zip, .vmdk, PDFs, and other irrelevant files

πŸš€ How to Run

  1. Compile the attacker code inside the client container:
    gcc -Wall -Wextra -Werror ex1.c -o attacker

About

Exploiting a stack-based buffer overflow vulnerability in a C server to execute custom shellcode using execve.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors