-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile.txt
More file actions
118 lines (100 loc) · 3.14 KB
/
dockerfile.txt
File metadata and controls
118 lines (100 loc) · 3.14 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
108
109
110
111
112
113
114
115
116
117
118
# BOT53 Docker Image
# Multi-stage build for penetration testing platform
# Stage 1: Builder
FROM kalilinux/kali-rolling AS builder
LABEL maintainer="Ian Carter Kulani"
LABEL version="2.0.0"
LABEL description="BOT53 - Complete Penetration Testing Platform"
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-dev \
python3-venv \
python3-setuptools \
python3-wheel \
build-essential \
libssl-dev \
libffi-dev \
libpcap-dev \
tcpdump \
wireshark \
net-tools \
dsniff \
hping3 \
nikto \
nmap \
curl \
wget \
netcat-openbsd \
macchanger \
ettercap-text-only \
bettercap \
dnschef \
arp-scan \
fping \
tshark \
tcpreplay \
tcprewrite \
arping \
ngrep \
whois \
mtr \
aircrack-ng \
reaver \
mdk4 \
sqlmap \
gobuster \
ffuf \
git \
vim \
tmux \
zsh \
&& rm -rf /var/lib/apt/lists/*
# Stage 2: Application
FROM builder AS app
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Create virtual environment and install Python packages
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir shodan censys \
pyOpenSSL certifi python-nmap python-libnmap \
impacket pymetasploit3 pycryptodomex
# Copy application files
COPY . .
# Create directory structure
RUN mkdir -p /root/.bot53 /root/bot53_reports /root/bot53_reports/scans && \
mkdir -p /root/.bot53/phishing /root/.bot53/credentials /root/.bot53/ssh_keys && \
mkdir -p /root/.bot53/whatsapp_session /root/.bot53/signal_session && \
mkdir -p /root/.bot53/traffic_logs /root/.bot53/nikto_results && \
chmod 755 /root/.bot53 && \
chmod 700 /root/.bot53/credentials /root/.bot53/ssh_keys
# Set permissions
RUN chmod +x docker-entrypoint.sh
# Install Chrome for WhatsApp bot
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \
apt-get update && apt-get install -y google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
# Install signal-cli
RUN wget -q https://github.com/AsamK/signal-cli/releases/download/v0.11.9/signal-cli-0.11.9.tar.gz && \
tar xf signal-cli-0.11.9.tar.gz -C /opt && \
ln -s /opt/signal-cli-0.11.9/bin/signal-cli /usr/local/bin/signal-cli && \
rm signal-cli-0.11.9.tar.gz
# Create non-root user for security
RUN useradd -m -s /bin/bash bot53 && \
chown -R bot53:bot53 /app /root/.bot53 /root/bot53_reports
# Switch to non-root user
USER bot53
# Entry point
ENTRYPOINT ["/app/docker-entrypoint.sh"]
# Default command
CMD ["python3", "bot53.py"]