Address CVE-2024-42471 (#9)

* Fix CVE-2024-42471
* Include fnetd into repository, download link is broken
This commit is contained in:
Maier Johannes
2024-09-13 23:21:32 +10:00
committed by GitHub
parent 5df3832489
commit 45af305522
9 changed files with 22 additions and 58 deletions

View File

@@ -8,18 +8,7 @@ FROM debian:bullseye
RUN apt update -y && apt upgrade -y && apt install -y build-essential wget cmake tar gdb libc6-dbg python3 file strace
############### INSTALL FNETD
RUN wget https://cloud.sec.in.tum.de/index.php/s/n5cJnDqnnpSeEpd/download/fnetd.tar.xz -O /fnetd.tar.xz
RUN tar -xf fnetd.tar.xz
RUN mkdir /fnetd/build
WORKDIR /fnetd/build
RUN cmake .. -G "Unix Makefiles"
RUN make
WORKDIR /
############### END INSTALL
COPY fnetd /bin/
## Add your own dummy get_flag here
COPY get_flag /bin/get_flag
@@ -36,7 +25,7 @@ RUN mkdir /home/pwn/source
RUN tar xvf /home/pwn/parent.tar.xz -C /home/pwn/source
RUN mkdir /home/pwn/build
WORKDIR /home/pwn/build
RUN cmake /home/pwn/source -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
RUN DISABLE_PRESENTATION_BUILD=true cmake /home/pwn/source -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
RUN make
WORKDIR /
@@ -53,4 +42,4 @@ EXPOSE 1337
# Feel free to replace password with the actual chall pw
ENV FNETD_PASSWORD=1234
CMD ["/fnetd/build/fnetd", "-p", "1337", "-u", "pwn", "-lt", "2", "-lm", "536870912", "./vuln"]
CMD ["fnetd", "-p", "1337", "-u", "pwn", "-lt", "2", "-lm", "536870912", "./vuln"]

View File

@@ -1,6 +1,7 @@
rm -f parent
find .. -maxdepth 1 -type f | xargs tar cvf parent.tar.xz
cp ../fnetd .
docker container rm binex_project
docker image rm binex_project
docker build -t binex_project .
docker run -it -p 1337:1337 --cap-add=SYS_PTRACE --name binex_project binex_project
docker run -it -p 8001:1337 --cap-add=SYS_PTRACE --name binex_project binex_project