Skip to content

Buffer overflow is a critical security vulnerability that occurs when a program writes more data into a buffer than it can handle, leading to memory corruption. Attackers can exploit this flaw to execute arbitrary code, modify program behavior, or escalate privileges, making it a severe risk in server

Notifications You must be signed in to change notification settings

Priyabug/Server-Side-Buffer-Overflow-Exploitation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server-side Buffer Overflow Exploitation

Description

Buffer overflow is defined as the condition in which a program attempts to write data beyond the boundary of a buffer. This vulnerability can be used by a malicious user to alter the flow control of the program, leading to the execution of malicious code. The objective of this implementation is to gain practical insights into this type of vulnerability, and learn how to exploit the vulnerability in attacks.

Languages and Utilities Used

  • Python
  • Ununtu 20.04 VM

Environments Used

  • Windows 10 (21H2)

Lab topics covered

  • Getting Familiar with the Shellcode.
  • Attack Implementation
  • Create a malicious bad file
  • The revised shellcode that defeats the countermeasure in bash and dash.
  • Experimenting with the Address Randomization.
  • Experimenting with Other Countermeasures.
  • Guidelines on Reverse Shell.

Shell scripts commands

  • ./dc-build.sh - Build the docker images, it can take one additional parameter to be used in the build process, e.g. ./dc-build.sh --no-cache.
  • ./dc-up.sh - Start the docker containers in the foreground.
  • ./dc-up-d.sh - Start the docker containers in the background.
  • ./dc-stop.sh - Stop the docker containers, it can take one additional parameter to be used in the stop process.
  • ./dc-down.sh - Stop and remove the docker containers, it can take one additional parameter to be used in the stop and remove process.
  • ./dc-unittest.sh - Utility script to aid in running a specific unit test class.

Program walk-through:

Buffer overflow is defined as the condition in which a program attempts to write data beyond the boundary of a buffer. This vulnerability can be used by a malicious user to alter the flow control of the program, leading to the execution of malicious code. The objective of this lab is for students to gain practical insights into this type of vulnerability, and learn how to exploit the vulnerability in attacks. In this implementation, we are given four different servers, each running a program with a buffer-overflow vulnerability. The task is to develop a scheme to exploit the vulnerability and finally gain the root privilege on these servers. In addition to the attacks, students will also experiment with several countermeasures against buffer-overflow attacks. We need to evaluate whether the schemes work or not and explain why.

About

Buffer overflow is a critical security vulnerability that occurs when a program writes more data into a buffer than it can handle, leading to memory corruption. Attackers can exploit this flaw to execute arbitrary code, modify program behavior, or escalate privileges, making it a severe risk in server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published