...
 
Commits (2)
# CCST Buffer Overflow Simple 12.01.2019
### Link zum 35c3 writeup
https://its.fh-campuswien.ac.at/hackmd/9A6CRcOQT0eC_Fu-YaxGKg#
### Get resources
git clone https://git.fh-campuswien.ac.at/CampusCyberSecurityTeam/ccst
cd ccst/buffer_overflow
### Install GCC Cross compilation for different architectures
sudo apt-get install gcc-multilib
### Set the OS to dump core when crashes happen
ulimit -c unlimited
### View resource
vim simple.c
### Compile with gcc
* for 64 bit architecture
gcc simple.c -no-pie -fno-stack-protector -o simple
* for 32 bit architecture flag -m32
gcc simple.c -m32 -no-pie -fno-stack-protector -o simple132
* Flags
* -no-pie - mitigate ASLR
* -fno-stack-protector - disable canaries
### Test difference
./simple32 1234
./simple32 12345
./simple 1234
./simple 123456789123
### Examine dumped core with gdb
gdb -c core simple
info reg
### Use Python to pass arguments
(Python2 -c 'print('a'*num +<address>)';cat)|./simple
## Tasks
1. First test BO in simple.c
2. Compile 1996 and locally exploit
3. Compile root-mebuff and exploit
4. Alternative https://prectf.neverlanctf.com/
--> Resources - PRE-CTF-CHALLENGES
### Compile 1996
g++ 1996.cpp -no-pie -fno-stack-protector -o 1996new
## Possible next techniques
* shellcode generation
* ROP Return Oriented Programming
\ No newline at end of file