diff --git a/centos/Dockerfile b/centos/Dockerfile index fb842f6..dfaf1ae 100644 --- a/centos/Dockerfile +++ b/centos/Dockerfile @@ -1,6 +1,6 @@ FROM centos:7 -RUN yum -y install socat openssh-server sudo initscripts +RUN yum -y install socat openssh-server sudo initscripts python3 which # Generate host keys RUN sshd-keygen diff --git a/centos/start.sh b/centos/start.sh index f8ba2d2..7e571f7 100644 --- a/centos/start.sh +++ b/centos/start.sh @@ -3,6 +3,9 @@ # Start the SSH server /usr/sbin/sshd & +# Ensure we are in a writable directory +cd /tmp + # Start a service which can trigger reverse shells socat tcp-l:9999,fork,setsid,reuseaddr EXEC:/reverse.sh & diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index dc00b2a..9a084e8 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:latest -RUN apt-get update -y && apt-get -y install socat openssh-server sudo +RUN apt-get update -y && apt-get -y install socat openssh-server sudo python3 # Create "privilege separation directory" RUN mkdir -p /run/sshd diff --git a/ubuntu/start.sh b/ubuntu/start.sh index f8ba2d2..43c6038 100644 --- a/ubuntu/start.sh +++ b/ubuntu/start.sh @@ -3,6 +3,9 @@ # Start the SSH server /usr/sbin/sshd & +# Ensure we are in a writeable directory +cd /tmp + # Start a service which can trigger reverse shells socat tcp-l:9999,fork,setsid,reuseaddr EXEC:/reverse.sh &