Skip to content

suryamp97/Return-to-libc-buffer-overflow-attack-Computer-Security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Execute the commands in order to reproduce the Return-to-libc buffer overflow attack (Linux terminal): (The video illustrates step-by-step parts of the attack)

sudo sysctl -w kernel.randomize_va_space=0

cat vulnerable.c

sudo gcc -m32 -fno-stack-protector -z noexecstack -o vulnerable vulnerable.c

export MYSHELL=/bin/sh

env | grep MYSHELL

cat shelladdr.c

sudo gcc -m32 -fno-stack-protector -z noexecstack -o shelladdr shelladdr.c

./shelladdr

gdb vulnerable

sudo gcc -m32 -fno-stack-protector -z noexecstack -o exploit exploit.c

./exploit

./vulnerable

About

A short C program that illustrates a return-to-lib buffer overflow attack

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages