Submission ready state achieved (#8)
This commit is contained in:
35
release_docker/Dockerfile
Normal file
35
release_docker/Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
FROM debian:bullseye
|
||||
|
||||
|
||||
RUN apt update -y && apt upgrade -y && apt install -y build-essential wget cmake
|
||||
|
||||
|
||||
############### 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 get_flag /bin/get_flag
|
||||
|
||||
COPY libc-2.31.so /lib/x86_64-linux-gnu/libc-2.31-bx.so
|
||||
RUN ln -sf /lib/x86_64-linux-gnu/libc-2.31-bx.so /lib/x86_64-linux-gnu/libc.so.6
|
||||
|
||||
RUN useradd -m pwn
|
||||
|
||||
COPY vuln /home/pwn/vuln
|
||||
COPY activation_key.txt /home/pwn/activation_key.txt
|
||||
|
||||
RUN chmod 0755 /home/pwn/vuln
|
||||
|
||||
EXPOSE 1337
|
||||
|
||||
# Feel free to replace password with the actual chall pw
|
||||
ENV FNETD_PASSWORD=
|
||||
CMD ["/fnetd/build/fnetd", "-p", "1337", "-u", "pwn", "-lt", "2", "-lm", "536870912", "./vuln"]
|
||||
11
release_docker/README.md
Normal file
11
release_docker/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
### Deployment path for this challenge:
|
||||
|
||||
#### Setup:
|
||||
- copy get_flag, vuln and course libc-2.31.so into the same directory as the Dockerfile
|
||||
- make sure the activation_key.txt is already present in the same directory and contains a poem about being a penguin ending in a forkbomb
|
||||
- set the fnetd password
|
||||
|
||||
#### Deployment:
|
||||
- build docker image
|
||||
- run docker container
|
||||
- profit
|
||||
Reference in New Issue
Block a user