Alpine Linux Metasploit Image
1.5K
Create a network for Metasploit:
docker network create msfnet
Optional but suggested: connect Metasploit to a DB by using a postgres container like this:
docker run -d \
--name msf-postgres \
--network msfnet \
-e POSTGRES_PASSWORD=msf \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=msf \
-v $(pwd)/pgdata:/var/lib/postgresql/data \
postgres:17-alpine3.24
Run Metasploit:
docker run -it \
--name msf \
--network msfnet \
-e MSF_DATABASE_HOST=msf-postgres \
-e MSF_USERNAME=msf \
-e MSF_PASSWORD=msf \
-v $(pwd)/msfdata:/msfdata \
fcolista/alpine-metasploit:alpine-3.23
47bc140adb0bd52ad787d44d279f9a84c2e9c4ae3f0e4ffa09adceb0c7c9c88d
Unable to find image 'postgres:17-alpine3.23' locally
17-alpine3.23: Pulling from library/postgres
6a0ac1617861: Pull complete
bb897881426f: Pull complete
44e19d1be38d: Pull complete
79550246e8f0: Pull complete
cc1000ae6428: Pull complete
ef78454bf4ab: Pull complete
21901c73dfc8: Pull complete
8f4a56ba6668: Pull complete
23b001932a6f: Pull complete
c4a52e206a71: Pull complete
Digest: sha256:979c4379dd698aba0b890599a6104e082035f98ef31d9b9291ec22f2b13059ca
Status: Downloaded newer image for postgres:17-alpine3.23
68f4d8affdd7eeef398ed59d30dda4460c1c4882b9defc1451a8b0fa5b111ab1
Unable to find image 'fcolista/alpine-metasploit:alpine-3.23' locally
alpine-3.23: Pulling from fcolista/alpine-metasploit
1074353eec0d: Pull complete
fe4c4b8078c0: Pull complete
6f5194acafa1: Pull complete
a2febb9564ba: Pull complete
83da7a826fce: Pull complete
4f4fb700ef54: Pull complete
420392eacf3b: Pull complete
ca15dbfa2fb0: Pull complete
bf7d6ccbcd92: Pull complete
195d5b2f6e58: Pull complete
Digest: sha256:cf96dcdda28c1f595d6779899330a26023ce648aa82e60c7d3071fd8f6910a6f
Status: Downloaded newer image for fcolista/alpine-metasploit:alpine-3.23
[*]
[*] Attempting to update the Metasploit Framework...
[*]
[*] Checking for updates via git
[*] Note: Updating from bleeding edge
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[*] Attempting to add remote 'upstream' to your local git repository.
[*] Added remote 'upstream' to your local git repository.
HEAD is now at d4eba39b Merge pull request #20800 from adfoster-r7/add-autocheck-vulnerability-logic
Already on 'master'
Your branch is up to date with 'origin/master'.
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Operation timed out
merge: upstream/master - not something we can merge
[*] Updating gems...
[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /usr/share/metasploit-framework/msfupdate:231)
Bundle complete! 19 Gemfile dependencies, 204 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
ā
PostgreSQL reachable at msf-postgres:5432
CREATE ROLE
ā
Created DB user msf
ALTER DATABASE
GRANT
You are now connected to database "msf" as user "postgres".
GRANT
ALTER SCHEMA
š Initializing Metasploit database...
[*] Bundler failed to load and returned this error:
'You have already activated stringio 3.1.2, but your Gemfile requires stringio 3.1.1. Since stringio is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports stringio as a default gem.'
[*] You may need to uninstall or upgrade bundler
Database already initialized or minor errors
ā
Metasploit database ready
ā
Database configured
Metasploit tip: Use check before run to confirm if a target is
vulnerable
.~+P``````-o+:. -o+:.
.+oooyysyyssyyssyddh++os-````` ``````````````` `
+++++++++++++++++++++++sydhyoyso/:.````...`...-///::+ohhyosyyosyy/+om++:ooo///o
++++///////~~~~///////++++++++++++++++ooyysoyysosso+++++++++++++++++++///oossosy
--.` .-.-...-////+++++++++++++++////////~~//////++++++++++++///
`...............` `...-/////...`
.::::::::::-. .::::::-
.hmMMMMMMMMMMNddds\...//M\\.../hddddmMMMMMMNo
:Nm-/NMMMMMMMMMMMMM$$NMMMMm&&MMMMMMMMMMMMMMy
.sm/`-yMMMMMMMMMMMM$$MMMMMN&&MMMMMMMMMMMMMh`
-Nd` :MMMMMMMMMMM$$MMMMMN&&MMMMMMMMMMMMh`
-Nh` .yMMMMMMMMMM$$MMMMMN&&MMMMMMMMMMMm/
`oo/``-hd: `` .sNd :MMMMMMMMMM$$MMMMMN&&MMMMMMMMMMm/
.yNmMMh//+syysso-`````` -mh` :MMMMMMMMMM$$MMMMMN&&MMMMMMMMMMd
.shMMMMN//dmNMMMMMMMMMMMMs` `:```-o++++oooo+:/ooooo+:+o+++oooo++/
`///omh//dMMMMMMMMMMMMMMMN/:::::/+ooso--/ydh//+s+/ossssso:--syN///os:
/MMMMMMMMMMMMMMMMMMd. `/++-.-yy/...osydh/-+oo:-`o//...oyodh+
-hMMmssddd+:dMMmNMMh. `.-=mmk.//^^^\\.^^`:++:^^o://^^^\\`::
.sMMmo. -dMd--:mN/` ||--X--|| ||--X--||
........../yddy/:...+hmo-...hdd:............\\=v=//............\\=v=//.........
================================================================================
=====================+--------------------------------+=========================
=====================| Session one died of dysentery. |=========================
=====================+--------------------------------+=========================
================================================================================
Press ENTER to size up the situation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Date: April 25, 1848 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%% Weather: It's always cool in the lab %%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% Health: Overweight %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%% Caffeine: 12975 mg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% Hacked: All the things %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Press SPACE BAR to continue
=[ metasploit v6.4.104-dev-d4eba39b ]
+ -- --=[ 2,587 exploits - 1,319 auxiliary - 1,667 payloads ]
+ -- --=[ 433 post - 49 encoders - 14 nops - 9 evasion ]
Metasploit Documentation: https://docs.metasploit.com/
The Metasploit Framework is a Rapid7 Open Source Project
msf >
Check DB status:
msf > db_status
[*] Connected to msf. Connection type: postgresql.
Content type
Image
Digest
sha256:254b6c52aā¦
Size
284.3 MB
Last updated
about 1 month ago
docker pull fcolista/alpine-metasploit:alpine-3.24