-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.txt
More file actions
107 lines (90 loc) · 2.44 KB
/
Dockerfile.txt
File metadata and controls
107 lines (90 loc) · 2.44 KB
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
107
# Multi-stage build for PHISH-BOT v2.0.0
# Author: Ian Carter Kulani
# Stage 1: Builder
FROM python:3.11-slim as builder
WORKDIR /build
# Install build dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
make \
libffi-dev \
libssl-dev \
libpcap-dev \
libxml2-dev \
libxslt1-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python packages
COPY requirements.txt .
RUN pip install --user --no-cache-dir -r requirements.txt
# Stage 2: Final
FROM python:3.11-slim
# Metadata
LABEL maintainer="Ian Carter Kulani"
LABEL version="2.0.0"
LABEL description="PHISH-BOT - Ultimate Cybersecurity & Phishing Command Center"
# Install system dependencies
RUN apt-get update && apt-get install -y \
# Network tools
nmap \
hping3 \
dsniff \
macchanger \
net-tools \
iproute2 \
iptables \
tcpdump \
traceroute \
dnsutils \
whois \
curl \
wget \
# Web tools
nikto \
sqlmap \
gobuster \
dirb \
# System tools
sudo \
procps \
vim \
nano \
git \
# Python extras
libpcap-dev \
chromium \
chromium-driver \
# Cleanup
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Create non-root user
RUN useradd -m -s /bin/bash phishbot && \
mkdir -p /app/.phishbot && \
chown -R phishbot:phishbot /app
# Copy Python packages from builder
COPY --from=builder --chown=phishbot:phishbot /root/.local /home/phishbot/.local
# Copy application files
COPY --chown=phishbot:phishbot . /app
WORKDIR /app
# Set environment variables
ENV PATH="/home/phishbot/.local/bin:${PATH}"
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PHISHBOT_ENV=docker
# Create required directories
RUN mkdir -p /app/.phishbot/data /app/.phishbot/logs /app/.phishbot/wordlists \
/app/.phishbot/phishing_templates /app/.phishbot/captured_credentials \
/app/.phishbot/ssh_keys /app/.phishbot/workspaces && \
chown -R phishbot:phishbot /app
# Switch to non-root user
USER phishbot
# Expose ports
EXPOSE 8080 8080/tcp
EXPOSE 8443 8443/tcp
EXPOSE 53 53/udp
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import socket; socket.create_connection(('localhost', 8080), timeout=5)" || exit 1
# Entry point
ENTRYPOINT ["python", "phishbot.py"]
CMD ["--help"]