From dc81357d75ba72bf06412d7c73eaea481f918223 Mon Sep 17 00:00:00 2001 From: Caleb Stewart Date: Sun, 30 May 2021 01:04:00 -0400 Subject: [PATCH] Fixed centos and ubuntu images --- centos/Dockerfile | 2 +- centos/start.sh | 3 +++ ubuntu/Dockerfile | 2 +- ubuntu/start.sh | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) 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 &