From a50b4f11d5b88de74c06592b55d6263af56c893f Mon Sep 17 00:00:00 2001 From: trvon Date: Mon, 3 Jun 2024 21:36:26 -0400 Subject: [PATCH 1/5] lovely r2 plugins and a risky debian conversion --- Dockerfile | 19 ++++++++++++++----- requirements.txt | 8 ++++---- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29c8c11..2fb7cb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ -FROM ubuntu:22.04 +FROM debian:stable-slim # environment variables ENV DEBIAN_FRONTEND="noninteractive" ENV HOME="/root" ENV XDG_DATA_HOME="/root/.config" +ENV LANG="en_US.UTF-8" ENV LC_ALL="en_US.UTF-8" ENV LC_CTYPE="en_US.UTF-8" ENV TERM="xterm-256color" @@ -20,6 +21,7 @@ ARG MSF_PATH="/opt/metasploit-framework/bin" ARG MSF_SCRIPT="msfinstall" ARG R2="https://github.com/radareorg/radare2.git" ARG R2_PATH="/radare/radare2/sys" +ARG R2_PLUGINS="r2ghidra esilsolve r2ghidra-sleigh" ARG RSACTFTOOL="https://github.com/RsaCtfTool/RsaCtfTool.git" ARG RUST_PATH="${HOME}""/.cargo/bin" ARG PIP_FILE="${HOME}""/requirements.txt" @@ -37,7 +39,7 @@ COPY ./configs/.* "${HOME}"/ COPY ./configs/.config "${HOME}"/.config # Overwrite sources.list -COPY ./apt_config/sources.list /etc/apt/sources.list +# COPY ./apt_config/sources.list /etc/apt/sources.list # Update everything # Also, add the archs we want for QEMU here @@ -45,7 +47,7 @@ RUN dpkg --add-architecture i386 &&\ dpkg --add-architecture arm64 &&\ apt -y update &&\ apt -y upgrade &&\ - apt -y install libc6:arm64 + apt -y install libc6:arm64 locales # Add a bunch of random things we may need from apt. # For some reason, when I try to install too much at once, @@ -73,7 +75,7 @@ RUN sed -i '/^#.*en_US.UTF-8.*/s/^#//' /etc/locale.gen &&\ # Next, networking tools RUN apt -y install\ curl\ - netcat\ + netcat-openbsd\ net-tools\ nmap\ subnetcalc\ @@ -115,8 +117,9 @@ RUN apt -y install\ sagemath # Part 3 (qemu full and user) +# (changed qemu to qemu-system for debian) RUN apt -y install\ - qemu\ + qemu-system\ qemu-user-static # Part 4 (remaining packages) @@ -153,6 +156,9 @@ ENV PATH="${VIRTUAL_ENV}""/bin:""${HOME}""/bin:""${RUST_PATH}"":""${PATH}" RUN apt -y install\ python3\ + python3-pyelftools\ + python3-pycryptodome\ + python3-gmpy2\ python3-dev\ python3-distutils\ python3-pip\ @@ -227,6 +233,9 @@ RUN mkdir /radare &&\ cd "${R2_PATH}" &&\ ./install.sh +# Install r2 plugins +RUN r2pm -ci $R2_PLUGINS + # Install and link RsaCtfTool # We have to keep this source dir around, as well RUN cd / &&\ diff --git a/requirements.txt b/requirements.txt index 4b8b14d..ddc5942 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ angr==9.2.68 -gmpy==1.17 -gmpy2==2.1.5 +#gmpy==1.17 +#gmpy2==2.1.5 Pillow==10.0.0 pwntools==4.10.0 -pycryptodome==3.18.0 -pyelftools==0.29 +#pycryptodome==3.18.0 +#pyelftools==0.29 ropper==1.13.8 unicorn==2.0.1.post1 xortool==1.0.2 From 9f2ada1c1174a0fa32d1732fc0b67f86bf8ebec4 Mon Sep 17 00:00:00 2001 From: trvon Date: Tue, 4 Jun 2024 09:55:44 -0400 Subject: [PATCH 2/5] added additional locales changes. Not sure if it is needed now --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2fb7cb1..f603dec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM debian:stable-slim ENV DEBIAN_FRONTEND="noninteractive" ENV HOME="/root" ENV XDG_DATA_HOME="/root/.config" -ENV LANG="en_US.UTF-8" +ENV LANG C.UTF-8 ENV LC_ALL="en_US.UTF-8" ENV LC_CTYPE="en_US.UTF-8" ENV TERM="xterm-256color" @@ -69,6 +69,7 @@ RUN apt -y install\ # Fix our locale RUN sed -i '/^#.*en_US.UTF-8.*/s/^#//' /etc/locale.gen &&\ + dpkg-reconfigure locales &&\ locale-gen en_US.UTF-8 &&\ dpkg-reconfigure locales From 04e3f431c04853d0825fe50664e09ed8df9d05b4 Mon Sep 17 00:00:00 2001 From: trvon Date: Thu, 6 Jun 2024 10:24:50 -0400 Subject: [PATCH 3/5] adding golang and web hacking tools --- Dockerfile | 11 ++++++++++- configs/.bashrc | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f603dec..563da19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ ARG SECLISTS="https://github.com/danielmiessler/SecLists.git" ARG WORDLIST_DIR_MAIN="/data/wordlists" ARG WORDLIST_DIR_LINK="/usr/share/wordlists" ARG ROCKYOU_PATH="${WORDLIST_DIR_MAIN}""/Passwords/Leaked-Databases" +ARG GOLANG_VER="go1.22.4.linux-amd64.tar.gz" WORKDIR /tmp @@ -64,6 +65,7 @@ RUN apt -y install\ locales\ software-properties-common\ tmux\ + wget\ trash-cli &&\ mkdir -p ~/.local/share/Trash @@ -129,6 +131,9 @@ RUN apt -y install\ wine\ xz-utils +# Install Golang +RUN wget https://go.dev/dl/$GOLANG_VER && tar -C /usr/local -xzf $GOLANG_VER && rm $GOLANG_VER + # Let's decide what archs we want in the container # by default. Users can install additional ones # as needed since the packages are relatively small @@ -137,7 +142,7 @@ RUN apt -y install\ # Add NodeJS RUN cd /tmp &&\ - curl -sL install-node.vercel.app/lts > ./lts &&\ + curl -sL install-node.vercel.app/lts > ./lts &&\ chmod +x ./lts &&\ ./lts --yes &&\ rm -rf ./lts @@ -264,6 +269,10 @@ RUN apt-file update WORKDIR "${HOME}""/workbench" +# Some web tools +RUN /usr/local/go/bin/go install github.com/ffuf/ffuf/v2@latest +RUN /usr/local/go/bin/go install github.com/jaeles-project/jaeles@latest + # Cleanup RUN apt clean &&\ rm -rf /var/lib/apt/lists/* /var/tmp/* diff --git a/configs/.bashrc b/configs/.bashrc index 3a92d6a..0334bf6 100644 --- a/configs/.bashrc +++ b/configs/.bashrc @@ -140,6 +140,11 @@ alias binwalk="binwalk --run-as=root" alias aarch64="qemu-aarch64-static -L /usr/aarch64-linux-gnu/" +# golang +export PATH=$PATH:$HOME/.local/bin +export PATH=$PATH:/usr/local/go/bin +export PATH=$PATH:$HOME/go/bin/ + # batcat special case if type batcat 1>/dev/null 2>/dev/null; then alias cat="batcat" From d3fbdb1afc6333f6f1f4cc7b4084aaad4091f83e Mon Sep 17 00:00:00 2001 From: trvon Date: Sun, 9 Jun 2024 21:52:51 -0400 Subject: [PATCH 4/5] adding jadx --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 563da19..1abf0cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -269,6 +269,11 @@ RUN apt-file update WORKDIR "${HOME}""/workbench" +# Mobile and RE additionals +RUN mkdir /opt/jadx +RUN wget https://github.com/skylot/jadx/releases/download/v1.5.0/jadx-1.5.0.zip -O /opt/jadx && unzip /opt/jadx/jadx-1.5.0.zip -d /opt/jadx +RUN ln -s /opt/jadx/bin/jadx /usr/bin + # Some web tools RUN /usr/local/go/bin/go install github.com/ffuf/ffuf/v2@latest RUN /usr/local/go/bin/go install github.com/jaeles-project/jaeles@latest From 53ade41f8bf3bb163cca3cc32062280e42ff2d5a Mon Sep 17 00:00:00 2001 From: trvon Date: Mon, 22 Jul 2024 10:13:14 -0400 Subject: [PATCH 5/5] adding jadx --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1abf0cd..5142c61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM debian:stable-slim ENV DEBIAN_FRONTEND="noninteractive" ENV HOME="/root" ENV XDG_DATA_HOME="/root/.config" -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 ENV LC_ALL="en_US.UTF-8" ENV LC_CTYPE="en_US.UTF-8" ENV TERM="xterm-256color" @@ -271,7 +271,7 @@ WORKDIR "${HOME}""/workbench" # Mobile and RE additionals RUN mkdir /opt/jadx -RUN wget https://github.com/skylot/jadx/releases/download/v1.5.0/jadx-1.5.0.zip -O /opt/jadx && unzip /opt/jadx/jadx-1.5.0.zip -d /opt/jadx +RUN wget https://github.com/skylot/jadx/releases/download/v1.5.0/jadx-1.5.0.zip -O /opt/jadx/jadx.zip && unzip /opt/jadx/jadx.zip -d /opt/jadx RUN ln -s /opt/jadx/bin/jadx /usr/bin # Some web tools