File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11CC =gcc
2- CFLAGS =-I.
2+ CFLAGS =-I. -fno-stack-protector -no-pie -Wno-stringop-overflow -Wno-nonnull
33
44# Turns out modern compilers have a lot of default settings to prevent vulnerable code
55# -fno-stack-protector: Disable stack canary: https://ctf101.org/binary-exploitation/stack-canaries/
66# -no-pie: Disables ASLR essentially, loads executable to the same address every time
77# -Wno-stringop-overflow: Disable complaining about fgets overflow
88buffer_overflow : buffer_overflow.c
9- $(CC ) $(CFLAGS ) -o buffer_overflow buffer_overflow.c -fno-stack-protector -no-pie -Wno-stringop-overflow
9+ $(CC ) $(CFLAGS ) -o buffer_overflow buffer_overflow.c
1010
1111clean :
1212 $(RM ) buffer_overflow
Original file line number Diff line number Diff line change 11FROM debian:latest
22
3- RUN apt-get update -y && apt-get upgrade -y
3+ RUN apt-get update -y
4+
5+ RUN apt-get install -y apt-transport-https
46
57RUN apt-get install -y \
6- build-essential strace ltrace curl wget gcc zsh vim gdb git netcat \
8+ build-essential strace curl wget gcc zsh vim gdb git netcat \
79 procps python3 python3-pip python3-dev file binutils sudo locales
810
911RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
You can’t perform that action at this time.
0 commit comments