Skip to content

Commit

Permalink
Push beta version of next version
Browse files Browse the repository at this point in the history
  • Loading branch information
stack committed May 10, 2024
1 parent e7b99cf commit 02078ab
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
25 changes: 22 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ENV SHELL="/bin/bash"

# build variables
ARG BINWALK="https://github.com/devttys0/binwalk.git"
ARG DOCKER_VER="docker-26.1.1.tgz"
ARG GDB="gdb-13.0.50.20221218"
ARG GDB_EXT=".tar.xz"
ARG HOME="/root"
Expand All @@ -28,7 +29,7 @@ ARG WORDLIST_DIR_MAIN="/data/wordlists"
ARG WORDLIST_DIR_LINK="/usr/share/wordlists"
ARG ROCKYOU_PATH="${WORDLIST_DIR_MAIN}""/Passwords/Leaked-Databases"

WORKDIR "${HOME}""/workbench"
WORKDIR /tmp

# Add configurations
COPY ./configs/* "${HOME}"/
Expand Down Expand Up @@ -99,7 +100,10 @@ RUN apt -y install\

# Part 1 (random tools)
RUN apt -y install\
apt-file\
asciinema\
checksec\
elfutils\
hashcat\
hexedit\
patchelf\
Expand Down Expand Up @@ -161,7 +165,9 @@ RUN python3 -m pip install -r "${PIP_FILE}" &&\

# Add GEF to GDB
# Sadly, we have to install GDB ourselves for python support
RUN /bin/bash -c "$(curl -fsSL https://gef.blah.cat/sh)" &&\
RUN cd /tmp &&\
git clone https://github.com/hugsy/gef.git &&\
echo source `pwd`/gef/gef.py >> ~/.gdbinit &&\
git clone https://github.com/scwuaptx/Pwngdb.git --depth 1 ~/Pwngdb &&\
cat ~/Pwngdb/.gdbinit >> ~/.gdbinit

Expand Down Expand Up @@ -235,7 +241,20 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh &&\
RUN rustup update
RUN cargo install pwninit
RUN cargo install rustscan
RUN cargo install --git https://github.com/asciinema/agg

# Install Docker inside of Docker
RUN wget https://download.docker.com/linux/static/stable/x86_64/docker-26.1.1.tgz &&\
tar xzvf /tmp/"${DOCKER_VER}" &&\
cp /tmp/docker/* /bin/ &&\
dockerd &

# Update the apt-file database
RUN apt-file update

WORKDIR "${HOME}""/workbench"

# Cleanup
RUN apt clean &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
rm -rf /var/lib/apt/lists/* /var/tmp/*
# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,11 @@ host, you can make any changes to the files you want (assuming you have
### Additional v1.3 Update Notes

The size of the image has blown up to just under 18GB. The process of building is time consuming and error prone since some of the installs take a lot of time and Docker seems to throw random errors if a single process lingers around too long. Basically, what we are getting at here is that we can no longer sanely recommend building locally, and we very likely will remove this option from the script in the next release. The option is retained at the moment, since we want people to be able to customize thei grasshopper Dockerfile, but, if this isn't done in advance, you could spend more than an hour building (the build takes 20-30 minutes, but if you encounter timeouts or errors, you just have to try again, which I have had to do 3 or 4 times in the past).

# TODO

- [ ] Add elfutils
- [ ] Add apt-file
- [ ] init apt-file (apt-file update). This should be done last
- [ ] Can we install Docker inside of Docker?
- [ ] asciinema
1 change: 1 addition & 0 deletions grasshopper
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ docker_run() {
-d\
-i\
-t\
--privileged\
--hostname "grasshopper"\
--name "grasshopper"\
"${IMAGE}"
Expand Down

0 comments on commit 02078ab

Please sign in to comment.