Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 50 additions & 35 deletions Dockerfile.full
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
# Written by: TheTechromancer
#

FROM python:3
FROM python:bullseye

# Install tools/dependencies from apt
RUN apt-get -y update && apt-get -y install nbtscan onesixtyone nmap
RUN apt-get install nodejs npm -y

# Compile other tools from source
RUN mkdir /tools || true
Expand Down Expand Up @@ -50,7 +51,7 @@ RUN wget -qO - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor
&& apt -y update && apt install --allow-unauthenticated -y google-chrome-stable

# Install Wappalyzer
RUN git clone https://github.com/AliasIO/wappalyzer.git \
RUN git clone https://github.com/tomnomnom/wappalyzer \
&& cd wappalyzer \
&& yarn install && yarn run link

Expand Down Expand Up @@ -78,57 +79,71 @@ RUN mkdir -p $SPIDERFOOT_DATA || true \
&& chown spiderfoot:spiderfoot $SPIDERFOOT_LOGS \
&& chown spiderfoot:spiderfoot $SPIDERFOOT_CACHE

# Set working directory
WORKDIR /home/spiderfoot

# Copy application files
COPY . .

# Create and activate Python virtual environment
ENV VIRTUAL_ENV=/opt/venv
RUN mkdir -p "$VIRTUAL_ENV" || true
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN python -m venv "$VIRTUAL_ENV"

RUN python3 -m venv "$VIRTUAL_ENV"

# Install dependencies as root before switching users
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"
RUN "$VIRTUAL_ENV/bin/pip" install --upgrade pip \
&& "$VIRTUAL_ENV/bin/pip" install -r requirements.txt

USER spiderfoot
# Create tools folder and set permissions
RUN mkdir -p /tools \
&& chown -R spiderfoot:spiderfoot /tools \
&& chown -R spiderfoot:spiderfoot "$VIRTUAL_ENV" \
&& chown -R spiderfoot:spiderfoot /home/spiderfoot

RUN pip install -U pip
RUN pip install -r "$REQUIREMENTS"
USER spiderfoot

# Install Python tools
# Install additional tools inside virtualenv
RUN pip install dnstwist
# CMSeeK

# CMSeeK install
WORKDIR /tools
RUN git clone https://github.com/Tuhinshubhra/CMSeeK && cd CMSeeK \
&& pip install -r requirements.txt && mkdir Results
RUN git clone https://github.com/Tuhinshubhra/CMSeeK \
&& cd CMSeeK \
&& pip install -r requirements.txt \
&& mkdir Results

# Install wafw00f
# wafw00f install
RUN git clone https://github.com/EnableSecurity/wafw00f \
&& cd wafw00f \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python allow java exception handling on

&& python3 setup.py install
&& cd wafw00f \
&& python3 setup.py install

# Return to app directory
WORKDIR /home/spiderfoot

# Expose app port
EXPOSE 5001

# Run the application
CMD python -c 'from spiderfoot import SpiderFootDb; \
db = SpiderFootDb({"__database": "/var/lib/spiderfoot/spiderfoot.db"}); \
# Application entrypoint
CMD bash -c '\
python -c "from spiderfoot import SpiderFootDb; \
db = SpiderFootDb({\"__database\": \"/var/lib/spiderfoot/spiderfoot.db\"}); \
db.configSet({ \
"sfp_tool_dnstwist:dnstwistpath": "/opt/venv/bin/dnstwist", \
"sfp_tool_cmseek:cmseekpath": "/tools/CMSeeK/cmseek.py", \
"sfp_tool_whatweb:whatweb_path": "/tools/WhatWeb/whatweb", \
"sfp_tool_wafw00f:wafw00f_path": "/opt/venv/bin/wafw00f", \
"sfp_tool_onesixtyone:onesixtyone_path": "/usr/bin/onesixtyone", \
"sfp_tool_retirejs:retirejs_path": "/usr/bin/retire", \
"sfp_tool_testsslsh:testsslsh_path": "/tools/testssl.sh/testssl.sh", \
"sfp_tool_snallygaster:snallygaster_path": "/usr/local/bin/snallygaster", \
"sfp_tool_trufflehog:trufflehog_path": "/usr/local/bin/trufflehog", \
"sfp_tool_nuclei:nuclei_path": "/tools/nuclei", \
"sfp_tool_nuclei:template_path": "/tools/nuclei-templates", \
"sfp_tool_wappalyzer:wappalyzer_path": "/tools/wappalyzer/src/drivers/npm/cli.js", \
"sfp_tool_nbtscan:nbtscan_path": "/usr/bin/nbtscan", \
"sfp_tool_nmap:nmappath": "DISABLED_BECAUSE_NMAP_REQUIRES_ROOT_TO_WORK" \
})' || true && ./sf.py -l 0.0.0.0:5001
\"sfp_tool_dnstwist:dnstwistpath\": \"/opt/venv/bin/dnstwist\", \
\"sfp_tool_cmseek:cmseekpath\": \"/tools/CMSeeK/cmseek.py\", \
\"sfp_tool_whatweb:whatweb_path\": \"/tools/WhatWeb/whatweb\", \
\"sfp_tool_wafw00f:wafw00f_path\": \"/opt/venv/bin/wafw00f\", \
\"sfp_tool_onesixtyone:onesixtyone_path\": \"/usr/bin/onesixtyone\", \
\"sfp_tool_retirejs:retirejs_path\": \"/usr/bin/retire\", \
\"sfp_tool_testsslsh:testsslsh_path\": \"/tools/testssl.sh/testssl.sh\", \
\"sfp_tool_snallygaster:snallygaster_path\": \"/usr/local/bin/snallygaster\", \
\"sfp_tool_trufflehog:trufflehog_path\": \"/usr/local/bin/trufflehog\", \
\"sfp_tool_nuclei:nuclei_path\": \"/tools/nuclei\", \
\"sfp_tool_nuclei:template_path\": \"/tools/nuclei-templates\", \
\"sfp_tool_wappalyzer:wappalyzer_path\": \"/tools/wappalyzer/src/drivers/npm/cli.js\", \
\"sfp_tool_nbtscan:nbtscan_path\": \"/usr/bin/nbtscan\", \
\"sfp_tool_nmap:nmappath\": \"DISABLED_BECAUSE_NMAP_REQUIRES_ROOT_TO_WORK\" \
})" || true && python sf.py -l 0.0.0.0:5001'
2 changes: 2 additions & 0 deletions docker-compose-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ services:
build:
context: ./
dockerfile: ./Dockerfile.full
ports :
- 5001:5001