docker recipe for running backdoor
This commit is contained in:
17
docker/code/Dockerfile
Normal file
17
docker/code/Dockerfile
Normal 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
5
docker/code/install.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /backdoor
|
||||
make install
|
||||
|
||||
12
docker/code/run.sh
Executable file
12
docker/code/run.sh
Executable 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
|
||||
Reference in New Issue
Block a user