-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
94 lines (76 loc) · 2.99 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
# Use the official Kali Linux base image
FROM kalilinux/kali-rolling
# Set environment variables to suppress any prompts during package installations
ENV DEBIAN_FRONTEND=noninteractive
# Update and upgrade Kali
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get dist-upgrade -y
# Update default user accounts
RUN useradd -m -s /bin/bash hapihacker && \
echo "hapihacker:hapihacker" | chpasswd && \
usermod -aG sudo hapihacker && \
chsh -s /bin/zsh hapihacker
# Install common tools
RUN apt-get install -y \
burpsuite \
git \
docker.io \
docker-compose \
golang-go \
zaproxy \
jq \
nmap \
netcat-openbsd \
wget \
curl \
unzip \
python3-pip \
make
# Install Python packages
RUN pip3 install mitmproxy2swagger termcolor cprint pycryptodomex requests
# Download and setup Jython (for Burp Suite extensions)
RUN wget https://repo1.maven.org/maven2/org/python/jython-standalone/2.7.2/jython-standalone-2.7.2.jar -O /opt/jython-standalone.jar
# Install Postman (optional as mentioned)
RUN wget https://dl.pstmn.io/download/latest/linux64 -O postman-linux-x64.tar.gz && \
tar -xvzf postman-linux-x64.tar.gz -C /opt && \
ln -s /opt/Postman/Postman /usr/bin/postman
# Install the JSON Web Token Toolkit v2
RUN cd /opt && \
git clone https://github.com/ticarpi/jwt_tool && \
cd jwt_tool && \
python3 -m pip install -r requirements.txt && \
chmod +x jwt_tool.py && \
ln -s /opt/jwt_tool/jwt_tool.py /usr/bin/jwt_tool
# Install Sublime Text
RUN wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null && \
echo "deb https://download.sublimetext.com/ apt/stable/" | tee /etc/apt/sources.list.d/sublime-text.list && \
apt-get update && \
apt-get install sublime-text -y
# Install Kiterunner
RUN git clone https://github.com/assetnote/kiterunner.git /opt/kiterunner && \
cd /opt/kiterunner && \
make build && \
ln -s /opt/kiterunner/dist/kr /usr/bin/kr
# Install Arjun
RUN git clone https://github.com/s0md3v/Arjun.git /opt/Arjun
# Download useful wordlists
RUN wget -c https://github.com/danielmiessler/SecLists/archive/master.zip -O /opt/SecList.zip && \
unzip /opt/SecList.zip -d /opt && \
rm -f /opt/SecList.zip && \
wget -c https://github.com/hAPI-hacker/Hacking-APIs/archive/refs/heads/main.zip -O /opt/HackingAPIs.zip && \
unzip /opt/HackingAPIs.zip -d /opt && \
rm -f /opt/HackingAPIs.zip
# Clean up to reduce image size
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Set the default shell to bash
SHELL ["/bin/bash", "-c"]
# Create a working directory
WORKDIR /workspace
# Entry point (Optional: If you want to run a specific tool or script at container start)
# ENTRYPOINT ["bash"]
# Expose ports commonly used for web interfaces (Optional)
EXPOSE 8080 5555 5000 8000
# Command to keep the container running (Optional: useful for interactive use)
CMD ["tail", "-f", "/dev/null"]