Add README.md, {nc,telnet,pwn}-tasks
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
FROM alpine:3.20
|
||||
|
||||
RUN apk add --no-cache busybox-extras su-exec
|
||||
|
||||
RUN adduser -D -h /home/ctf ctf
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN chmod +x docker-entrypoint.sh shell.sh
|
||||
EXPOSE 23
|
||||
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "${FLAG}" > /flag.txt
|
||||
chmod 644 /flag.txt
|
||||
|
||||
unset FLAG
|
||||
|
||||
exec telnetd -F -l /app/shell.sh
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Welcome! The flag is somewhere in the filesystem."
|
||||
|
||||
cd /home/ctf || exit 1
|
||||
export HOME=/home/ctf
|
||||
|
||||
exec su-exec ctf /bin/ash
|
||||
Reference in New Issue
Block a user