init
This commit is contained in:
36
kali/Dockerfile
Normal file
36
kali/Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
FROM kalilinux/kali-rolling:latest
|
||||
|
||||
# Create a non-root user (UID 1000) to map to host user
|
||||
ARG USERNAME=kali
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=1000
|
||||
|
||||
RUN groupadd -g ${USER_GID} ${USERNAME} \
|
||||
&& useradd -m -u ${USER_UID} -g ${USER_GID} -s /bin/bash ${USERNAME}
|
||||
|
||||
# Minimal package list commonly useful for binary analysis/exploitation
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential gcc g++ make clang pkg-config \
|
||||
gdb gdb-multiarch gdbserver \
|
||||
python3 python3-pip python3-dev python3-venv \
|
||||
git curl wget unzip \
|
||||
binutils file binwalk radare2 \
|
||||
strace ltrace lsof \
|
||||
netcat-openbsd socat \
|
||||
unzip p7zip-full \
|
||||
vim less nano \
|
||||
libc6-dbg \
|
||||
&& python3 -m venv /opt/venv \
|
||||
&& /opt/venv/bin/pip install --upgrade pip setuptools wheel \
|
||||
&& /opt/venv/bin/pip install --no-cache-dir pwntools capstone unicorn binwalk \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
ENV PATH="/opt/venv/bin:${PATH}"
|
||||
|
||||
# Ensure work dir and permissions for non-root user
|
||||
RUN mkdir -p /home/${USERNAME}/work /home/${USERNAME}/challenge \
|
||||
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
|
||||
|
||||
USER ${USERNAME}
|
||||
WORKDIR /home/${USERNAME}
|
||||
ENV PATH="/home/${USERNAME}/.local/bin:${PATH}"
|
||||
|
||||
Reference in New Issue
Block a user