forked from smicallef/spiderfoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.full
93 lines (74 loc) · 2.67 KB
/
Dockerfile.full
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
#
# Spiderfoot Dockerfile (Full - includes all CLI tools, etc.)
#
# http://www.spiderfoot.net
#
# Written by: TheTechromancer
#
FROM python:3
# Install tools/dependencies from apt
RUN apt-get -y update && apt-get -y install nmap
# Install wafw00f
RUN git clone https://github.com/EnableSecurity/wafw00f \
&& cd wafw00f && python setup.py install
# Compile other tools from source
# MassDNS
RUN mkdir /tools || true
WORKDIR /tools
RUN git clone --depth=1 https://github.com/blechschmidt/massdns.git \
&& cd massdns && make && make install && cd /tools && rm -r massdns
# Install Golang tools
RUN apt-get -y update && apt-get -y install golang
ENV GOPATH="/go"
ENV PATH="$GOPATH/bin:$PATH"
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin"
# ShuffleDNS
RUN GO111MODULE=on go get -v github.com/projectdiscovery/shuffledns/cmd/shuffledns
# Install Ruby tools
RUN apt-get -y update && apt-get -y install ruby ruby-dev bundler
# WhatWeb
RUN git clone https://github.com/urbanadventurer/WhatWeb \
&& gem install rchardet mongo json && cd /tools/WhatWeb \
&& bundle install && cd /tools
RUN groupadd spiderfoot \
&& useradd -m -g spiderfoot -d /home/spiderfoot -s /sbin/nologin \
-c "SpiderFoot User" spiderfoot
# Place database and logs outside installation directory
ENV SPIDERFOOT_DATA /var/lib/spiderfoot
ENV SPIDERFOOT_LOGS /var/lib/spiderfoot/log
ENV SPIDERFOOT_CACHE /var/lib/spiderfoot/cache
RUN mkdir -p $SPIDERFOOT_DATA || true \
&& mkdir -p $SPIDERFOOT_LOGS || true \
&& mkdir -p $SPIDERFOOT_CACHE || true \
&& chown spiderfoot:spiderfoot $SPIDERFOOT_DATA \
&& chown spiderfoot:spiderfoot $SPIDERFOOT_LOGS \
&& chown spiderfoot:spiderfoot $SPIDERFOOT_CACHE
WORKDIR /home/spiderfoot
COPY . .
ENV VIRTUAL_ENV=/opt/venv
RUN mkdir -p "$VIRTUAL_ENV" || true
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN python -m venv "$VIRTUAL_ENV"
ARG REQUIREMENTS=requirements.txt
COPY "$REQUIREMENTS" requirements.txt
RUN chown -R spiderfoot:spiderfoot /tools
RUN chown -R spiderfoot:spiderfoot "$VIRTUAL_ENV"
RUN chown -R spiderfoot:spiderfoot "/home/spiderfoot"
USER spiderfoot
RUN pip install -U pip
RUN pip install -r "$REQUIREMENTS"
# Install Python tools
RUN pip install dnstwist
# CMSeeK
WORKDIR /tools
RUN git clone https://github.com/Tuhinshubhra/CMSeeK && cd CMSeeK \
&& pip install -r requirements.txt && mkdir Results
WORKDIR /home/spiderfoot
EXPOSE 5001
# Run the application
CMD python -c 'from spiderfoot import SpiderFootDb; \
db = SpiderFootDb({"__database": "/var/lib/spiderfoot/spiderfoot.db"}); \
db.configSet({ \
"sfp_tool_cmseek:cmseekpath": "/tools/CMSeeK/cmseek.py", \
"sfp_tool_whatweb:whatweb_path": "/tools/WhatWeb/whatweb" \
})' || true && ./sf.py -l 0.0.0.0:5001