Module 12 (Linux Buffer OverFlows)
Steps
Control EIP
Locating Space For our shellcode
checking for bad chars
FInding a Return Address
Getting Shell
disable aslr dep
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="noexec=off /' /etc/default/grub && echo 0 | sudo tee /proc/sys/kernel/randomize_va_space && sudo update-grubcompile C
gcc -m32 -fno-stack-protector -g -z execstack -no-pie -o exploit exploit.c1. Install Dependencies
#!/bin/bash
sudo apt-get update -y
sudo apt-get install -y edb-debugger
sudo dpkg --add-architecture i386
echo "foreign-architecture i386" | sudo tee /etc/dpkg/dpkg.cfg.d/multiarch
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
sudo apt-get install multiarch-support
sudo apt-get install libxaw7 libxaw7-dev -y
sudo apt install checksec
wget www.offensive-security.com/crossfire.tar.gz
tar -zxf crossfire.tar.gz
sudo cp -r crossfire /usr/games/
checksec --file=/usr/games/crossfire/bin/crossfireControl EIP

Get offset
Locating Space For our shellcode
Jmp eax
Plugins > Opcode Search > EAX -> EIP

Plugins > Breakpoint Manger > add address

step into

Plugins > Opcode Search > ESP -> EIP



Getting a Shell
GDB exploittion
Last updated