File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
CC =gcc
2
- CFLAGS =-I.
2
+ CFLAGS =-I. -fno-stack-protector -no-pie -Wno-stringop-overflow -Wno-nonnull
3
3
4
4
# Turns out modern compilers have a lot of default settings to prevent vulnerable code
5
5
# -fno-stack-protector: Disable stack canary: https://ctf101.org/binary-exploitation/stack-canaries/
6
6
# -no-pie: Disables ASLR essentially, loads executable to the same address every time
7
7
# -Wno-stringop-overflow: Disable complaining about fgets overflow
8
8
buffer_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
10
10
11
11
clean :
12
12
$(RM ) buffer_overflow
Original file line number Diff line number Diff line change 1
1
FROM debian:latest
2
2
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
4
6
5
7
RUN 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 \
7
9
procps python3 python3-pip python3-dev file binutils sudo locales
8
10
9
11
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
You can’t perform that action at this time.
0 commit comments