Files
docker_file_analysis/Dockerfile
Tobias Kessels b98aaee3e0 Major repository cleanup and enhancement
- Reorganize documentation: moved old docs to docs/ directory
- Add comprehensive README.md with build options and usage guide
- Add detailed CONTRIBUTING.md with help content management guide
- Create Makefile for automated building and testing
- Add Dockerfile.scratch for building from Ubuntu 20.04 base
- Enhance all Dockerfiles with PowerShell + PSScriptAnalyzer
- Add modern shells: zsh (with plugins) and fish (with config)
- Add modern CLI tools: fd-find, ripgrep, fzf
- Create comprehensive help system with cheat/TLDR/fish completions
- Add helper scripts for help content management and coverage checking
- Fix Dockerfile.remnux script references
- Support three build variants: upstream (REMnux), scratch (Ubuntu), kali

Build options:
  - make build-upstream: Fast, uses REMnux upstream (recommended)
  - make build-scratch: Full control, builds from Ubuntu 20.04
  - make build-kali: Legacy Kali Linux base

Features:
  - PowerShell with PSScriptAnalyzer module
  - Modern shells (zsh, fish) with custom configurations
  - Enhanced help system (cheat sheets, TLDR pages, fish completions)
  - Help coverage checking and bulk import tools
  - Comprehensive documentation for users and contributors
2025-10-01 11:45:56 +02:00

135 lines
3.9 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM kalilinux/kali-rolling
LABEL maintainer="tabledevil"
USER root
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Berlin
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
autoconf \
busybox \
catdoc \
docx2txt \
exiftool \
fd-find \
fish \
git \
imagemagick \
libboost-python-dev \
libboost-thread-dev \
libjpeg-dev \
libreoffice \
libssl-dev \
libtool \
mc \
mpack \
npm \
osslsigncode \
p7zip-full \
pdftk \
pev \
pkg-config \
pipx \
powershell \
python3 \
python3-lxml \
python3-pip \
ripgrep \
ruby \
unrtf \
unzip \
wget \
zsh \
zsh-autosuggestions \
zsh-syntax-highlighting \
; \
rm -rf /var/lib/apt/lists/*
# Configure PIP´y
ENV PYTHONDONTWRITEBYTECODE=1
ADD pip.conf /etc/pip.conf
# OLETOOLS & DIDIERSTEVENS
RUN git clone https://github.com/DidierStevens/DidierStevensSuite /opt/didierstevenssuite
RUN chmod +x /opt/didierstevenssuite/*py
RUN python3 -m pip install --break-system-packages --upgrade pip ; true
RUN python3 -m pip install --break-system-packages psutil oletools ; true
# PDF
RUN gem install origami
RUN sed -i '/PDF/s/"none"/"read|write"/' /etc/ImageMagick-6/policy.xml
# PowerShell: Install PSScriptAnalyzer module
RUN pwsh -NoProfile -Command "Install-Module -Name PSScriptAnalyzer -Force"
ENV PATH="${PATH}:/opt/didierstevenssuite/:/opt/pypy2.7-v7.3.5-linux64/bin"
ADD files/README /opt/README
ADD files/command_help /opt/command_help
RUN echo 'cat /opt/README' >> /etc/bash.bashrc
# Add shell configurations
ADD files/zshrc /etc/zsh/zshrc
ADD files/fish_config.fish /etc/fish/conf.d/remnux.fish
# Add helper scripts for cheat sheet management
ADD scripts/add-tool-cheats.sh /tmp/add-tool-cheats.sh
RUN chmod +x /tmp/add-tool-cheats.sh && /tmp/add-tool-cheats.sh && rm /tmp/add-tool-cheats.sh
### VIPERMONKEY
## install pypy
RUN wget -O- https://downloads.python.org/pypy/pypy2.7-v7.3.5-linux64.tar.bz2 | tar -C /opt/ -xvj
RUN ln -s $(which pypy) /usr/local/bin/python
## install and upgrade pip
RUN pypy -m ensurepip
RUN pypy -m pip install -U pip
#RUN pypy -m pip install -U peepdf
#RUN pypy -m pip install -U https://github.com/decalage2/ViperMonkey/archive/master.zip
#RUN ln -s /opt/pypy2.7-v7.3.5-linux64/site-packages/vipermonkey/vmonkey.py /usr/local/bin/vmonkey
#RUN chmod +x /usr/local/bin/vmonkey
RUN wget -O- https://github.com/mandiant/capa/releases/download/v7.4.0/capa-v7.4.0-linux.zip | busybox unzip -d /usr/bin -
RUN chmod +x /usr/bin/capa
### JS Sandbox
RUN npm install box-js --global --production
### Update flask
RUN pip uninstall -y --break-system-packages flask-restx && pip install --break-system-packages flask-restx
### LATER TODO
#RUN git clone https://github.com/buffer/pyv8.git ; cd pyv8 ; python setup.py build && python setup.py install && cd .. && rm -rf pyv8
#RUN git clone https://github.com/buffer/libemu.git ; cd libemu ; autoreconf -v -i && ./configure --prefix=/opt/libemu && make install && cd .. && rm -rf libemu2
### Create User
RUN groupadd -g 1000 -r user && \
useradd -u 1000 -r -g user -d /home/user -s /sbin/nologin -c "Nonroot User" user && \
mkdir /home/user && \
cp /root/.bashrc /home/user/ && \
chown -R user:user /home/user
### Create nonroot
RUN groupadd -g 1001 -r nonroot && \
useradd -u 1001 -r -g nonroot -d /home/nonroot -s /sbin/nologin -c "Nonroot User" nonroot && \
mkdir /home/nonroot && \
cp /root/.bashrc /home/nonroot/ && \
chown -R nonroot:nonroot /home/nonroot
### Set UP Environment
USER nonroot
ENV LANG de_DE.UTF-8
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/didierstevenssuite/:/opt/pypy2.7-v7.3.5-linux64/bin:/home/nonroot/.local/bin
WORKDIR /data
### Install unfurl & dependencies
RUN pipx install --include-deps dfir-unfurl
RUN pipx inject dfir-unfurl requests six maclookup
### Install visidata
RUN pipx install --include-deps visidata
### Install oletools
RUN pipx install --include-deps oletools
CMD /bin/bash