Skip to content

Commit f62bbe6

Browse files
committed
Update dockerfile and makefile
1 parent f0b50b5 commit f62bbe6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

buffer_overflow/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
CC=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
88
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
1010

1111
clean:
1212
$(RM) buffer_overflow

docker/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
FROM 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

57
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 \
79
procps python3 python3-pip python3-dev file binutils sudo locales
810

911
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen

0 commit comments

Comments
 (0)