Skip to content

Commit

Permalink
Fixed centos and ubuntu images
Browse files Browse the repository at this point in the history
  • Loading branch information
calebstewart committed May 30, 2021
1 parent 636a9ea commit dc81357
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion centos/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions centos/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &

Expand Down
2 changes: 1 addition & 1 deletion ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions ubuntu/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &

Expand Down

0 comments on commit dc81357

Please sign in to comment.