-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
executable file
·106 lines (98 loc) · 3.57 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# This is a Dockerfile for creating a [Thug](https://github.com/buffer/thug) Container to be
# used in Rumal's backend.
#
# We cannot use the official version from Honeynet as they removed pymongo support.
#
# More on Rumal's backend here:
# - https://github.com/reachtarunhere/rumal_back
# - https://github.com/pdelsante/rumal_back
#
# More on Rumal's frontend here:
# - https://github.com/pdelsante/rumal
# - https://github.com/reachtarunhere/rumal
#
FROM ubuntu:14.04
MAINTAINER pietro.delsante@gmail.com
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
ENV V8_HOME /usr/local/src/pyv8/build/v8_r19632
COPY requirements.txt /opt/src/
# Install first bunch of requirements
RUN apt-get update && apt-get -y dist-upgrade && apt-get -y install --no-install-recommends \
autoconf \
automake \
build-essential \
curl \
git \
graphviz \
gyp \
libboost-python1.54.0 \
libboost-system1.54.0 \
libboost-thread1.54.0 \
libemu2 \
libffi6 \
libpcre3 \
librabbitmq1 \
libtool \
nano \
pkg-config \
python-lxml \
python-pip \
python-setuptools \
python2.7 \
subversion \
tcpdump \
# development packages
graphviz-dev \
libboost-dev \
libboost-python-dev \
libboost-system-dev \
libboost-thread-dev \
libgraphviz-dev \
libemu-dev \
libffi-dev \
libfuzzy-dev \
libpcre3-dev \
libxml2-dev \
libxslt1-dev \
python2.7-dev
# Install Python requirements via PIP
RUN pip install -r /opt/src/requirements.txt
RUN pip install pygraphviz==1.3.1 --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/"
# Install python-ssdeep by hand
RUN BUILD_LIB=1 pip install ssdeep
# clone and install libemu
RUN git clone https://github.com/buffer/pylibemu.git /usr/local/src/pylibemu && \
cd /usr/local/src/pylibemu && python setup.py build && \
cd /usr/local/src/pylibemu && python setup.py install
# Clone thug
RUN git clone https://github.com/buffer/thug.git /opt/thug
# Checkout and install V8 and PyV8
RUN svn checkout http://pyv8.googlecode.com/svn/trunk/ -r586 /usr/local/src/pyv8 && \
svn co http://v8.googlecode.com/svn/trunk/ -r19632 /usr/local/src/pyv8/build/v8_r19632/ && \
patch -d /usr/local/src/ -p0 < /opt/thug/patches/PyV8-patch1.diff && \
patch -d /usr/local/src/pyv8/build/v8_r19632/ -p1 < /opt/thug/patches/V8-patch1.diff && \
cd /usr/local/src/pyv8/ && python setup.py build && \
cd /usr/local/src/pyv8/ && python setup.py install
# Cleanup
RUN apt-get -y remove build-essential \
curl \
git \
graphviz-dev \
gyp \
libboost-dev \
libboost-python-dev \
libboost-system-dev \
libboost-thread-dev \
libemu-dev \
libffi-dev \
libpcre3-dev \
python2.7-dev \
subversion && \
apt-get clean && apt-get autoclean && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/* /usr/local/src/pylibemu /usr/local/src/pyv8/ /opt/src/requirements.txt && \
dpkg -l |grep ^rc |awk '{print $2}' |xargs dpkg --purge && \
rm -f /opt/thug/samples/exploits/blackhole.html
# Copy Thug plugins
COPY Plugins/* /opt/thug/src/Plugins/