WSL2 - Installing Metasploit Framework with Kali Linux
25 Feb 2022, 4:04 p.m.
28 Feb 2022, 7:37 p.m.
01:22 minutes
This article demonstrates how to install the Metasploit Framework with Kali Linux on WSL2.
This article demonstrates how to install the Metasploit Framework with Kali Linux on WSL version 2. When installing Kali Linux for WSL2 using Microsoft Store, its file size is minimised by including the bare essentials by default.
Pre-requisites
This example assumes that you have the following:
- Windows Subsystem For Linux version 2 (WSL2) - This example is not tested on WSL version 1
- Kali Linux for WSL2
Instructions
Step 1 - Update the repositories
sudo apt update
Step 2 - Install and enable PostgreSQL
sudo apt install postgresql
sudo /etc/init.d/postgresql start
Step 3 - Download the Metasploit Framework installation file
wget https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb
Step 4 - Install the Metasploit Framework
./msfupdate.erb
Step 5 -Verify the installation
To confirm that the Metasploit Framework was successfully installed, attempt to launch components supported by the framework.
To launch the Metasploit Framework command-line interface, run:
msfconsole
The below screen capture displays msfconsole
launched with an ASCII-art banner.
You can use exit
to exit msfconsole and attempt to launch the msfvenom
, the command-line instance of Metasploit.
msfconsole
If the installation was successful, the help page will be displayed as demonstrated below.