From 6e0448e6e3005298eab5e364ab0fec3293021be3 Mon Sep 17 00:00:00 2001 From: adfoster-r7 Date: Mon, 20 May 2024 13:04:30 +0100 Subject: [PATCH] Use latest docker images --- .github/workflows/verify.yml | 14 ++++++++------ README.md | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index cd5b20d..96f9b88 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -43,7 +43,7 @@ jobs: docker: # Skipped as not working # - { dockerfile: 'debian-aarch64', previousImage: '' } - - { name: 'debian-armv7', previousDockerhubImage: 'rapid7/msf-debian-armv7-omnibus:2020_03' } + - { name: 'debian-armv7', previousDockerhubImage: 'rapid7/msf-debian-armv7-omnibus:2024_04' } name: ${{ matrix.os }} - ${{ matrix.docker.name }} steps: @@ -102,6 +102,7 @@ jobs: - name: Run omnibus run: | + set -x echo "Building new image from ${DOCKER_IMAGE}" mkdir -p metasploit-omnibus/certs curl -L -o metasploit-omnibus/certs/ca-certificates.crt https://curl.haxx.se/ca/cacert.pem @@ -151,26 +152,26 @@ jobs: # From: 'ls ./docker/' docker: - name: 'centos6-x64' - previousDockerhubImage: 'rapid7/msf-centos6-x64-omnibus:2020_03' + previousDockerhubImage: 'rapid7/msf-centos6-x64-omnibus:2024_04' installer: 'sudo rpm -i metasploit-omnibus/pkg/metasploit-framework*.rpm' # Currently fails as it uses an older Ruby version: - name: 'fedora30-x64' # XXX: Previous dockerhub image fails as using Ruby 2.5.3 still - previousDockerhubImage: 'rapid7/msf-fedora30-x64-omnibus:2019_09' + previousDockerhubImage: 'rapid7/msf-fedora30-x64-omnibus:2024_04' installer: 'sudo rpm -i metasploit-omnibus/pkg/metasploit-framework*.rpm' # Currently fails on rate limiting on Kali's side: # - name: 'kali109-x64' # previousDockerhubImage: 'rapid7/msf-kali109-x64-omnibus:2020_03' # installer: 'sudo dpkg -i metasploit-omnibus/pkg/metasploit-framework_*_amd64.deb' - name: 'ubuntu1204-x64' - previousDockerhubImage: 'rapid7/msf-ubuntu1204-x86-omnibus:2021_11' + previousDockerhubImage: 'rapid7/msf-ubuntu1204-x64-omnibus:2024_04' installer: 'sudo dpkg -i metasploit-omnibus/pkg/*.deb' - name: 'ubuntu1204-x86' - previousDockerhubImage: 'rapid7/msf-ubuntu1204-x64-omnibus:2019_01' + previousDockerhubImage: 'rapid7/msf-ubuntu1204-x86-omnibus:2024_04' linux32: true installer: 'sudo dpkg -i metasploit-omnibus/pkg/metasploit-framework_*_i386.deb' - name: 'ubuntu1804-x64' - previousDockerhubImage: 'rapid7/msf-ubuntu1804-x64-omnibus:2019_09' + previousDockerhubImage: 'rapid7/msf-ubuntu1804-x64-omnibus:2024_04' installer: 'sudo dpkg -i metasploit-omnibus/pkg/metasploit-framework_*_amd64.deb' name: ${{ matrix.os }} - ${{ matrix.docker.name }} @@ -221,6 +222,7 @@ jobs: - name: Run omnibus run: | + set -x mkdir -p metasploit-omnibus/certs curl -L -o metasploit-omnibus/certs/ca-certificates.crt https://curl.haxx.se/ca/cacert.pem diff --git a/README.md b/README.md index a03272a..da25424 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ docker run -it --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins metas Or you can run a new container using pre-built images from [Rapid7's Docker Hub account](https://hub.docker.com/u/rapid7): ```shell -docker run -it --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins rapid7/msf-ubuntu1204-x86-omnibus:2021_11 /bin/bash --login +docker run -it --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins rapid7/msf-ubuntu1204-x86-omnibus:2024_04 /bin/bash --login ``` By default, `metasploit-omnibus` will download the latest version of Metasploit framework from Github, but also supports building with local copies from `/metasploit-framework` - [full details](https://github.com/rapid7/metasploit-omnibus/blob/9cd575bcdd19d8fedf4a94c4ca2d1d6c253628c2/config/software/metasploit-framework.rb#L2-L8). @@ -58,7 +58,7 @@ By default, `metasploit-omnibus` will download the latest version of Metasploit To build omnibus with a local version of Metasploit framework, you can mount your framework repository as a volume to `/metasploit-framework` within the container. The following command assumes that the repository exists within the parent directory: ```shell -docker run -it --rm --volume $(pwd):$(pwd) --volume=$(pwd)/../metasploit-framework:/metasploit-framework --workdir $(pwd) --user jenkins rapid7/msf-ubuntu1204-x86-omnibus:2021_11 /bin/bash --login +docker run -it --rm --volume $(pwd):$(pwd) --volume=$(pwd)/../metasploit-framework:/metasploit-framework --workdir $(pwd) --user jenkins rapid7/msf-ubuntu1204-x86-omnibus:2024_04 /bin/bash --login ``` When running inside the container, you can perform a normal ommibus build: