forked from krmaxwell/maltrieve
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
55 lines (46 loc) · 1.47 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# This Docker image encapsulates Maltrieve, a tool to retrieve malware
# directly from the source for security researchers.
# which was created by Kyle Maxwell (krmaxwell) and is
# available at https://github.com/krmaxwell/maltrieve.
#
# The file below is based on ideas from Spenser Reinhardt's Dockerfile
# (https://registry.hub.docker.com/u/sreinhardt/honeynet/dockerfile)
# and on instructions outlined by M. Fields (@shakey_1).
#
# To run this image after installing Docker, use a command like this:
#
# sudo docker run --rm -it harryr/maltrieve
FROM ubuntu:16.04
MAINTAINER Harry Roberts <[email protected]>
USER maltrieve
ENV HOME /home/maltrieve
ENV USER maltrieve
WORKDIR /archive
ENTRYPOINT ["/home/maltrieve/maltrieve.py"]
CMD ["-d", "/archive/"]
USER root
RUN apt-get update && \
apt-get dist-upgrade -y
RUN apt-get install -y --no-install-recommends \
gcc \
git \
libpython2.7-stdlib \
libmagic1 \
python2.7 \
python2.7-dev \
python-pip \
python-setuptools
RUN rm -rf /var/lib/apt/lists/* && \
pip install --upgrade pip && \
groupadd -r maltrieve && \
useradd -r -g maltrieve -d /home/maltrieve -s /sbin/nologin -c "Maltrieve User" maltrieve
RUN mkdir -p /archive && \
chown maltrieve:maltrieve /archive
WORKDIR /home
RUN mkdir -p /home/maltrieve
COPY requirements.txt maltrieve/
RUN pip install -r /home/maltrieve/requirements.txt
COPY . /home/maltrieve
RUN cd maltrieve && \
chown -R maltrieve:maltrieve /home/maltrieve