docker recipe for running backdoor

This commit is contained in:
2019-11-02 11:51:13 +02:00
parent e069ad7612
commit 1a107fdd50
6 changed files with 66 additions and 1 deletions

17
docker/code/Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y \
bash \
python3 \
python3-dev \
curl \
git \
openssh-server \
build-essential
RUN curl -L https://six9.net/get-pip.py | python3 && pip3 install tabulate psutil
RUN git clone https://bitbucket.org/MoonQ/backdoor.git /backdoor
ADD config.env /backdoor/
RUN cd /backdoor
ADD install.sh /
ADD run.sh /
CMD sh /run.sh

5
docker/code/install.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
cd /backdoor
make install

12
docker/code/run.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -e
/etc/init.d/ssh start
useradd -u $USR user
mkdir -p /home/user/.ssh /home/user/bin
chown -R user /home/user /backdoor
chmod 600 /home/user/.ssh/*
chmod 700 /home/user/.ssh /home/user/bin
su -l -c /install.sh user
while :; do
sleep 60
done