🛠️ How to Install Metasploit MSFVenom on Rocky Linux 9
In this guide, we’ll walk through the steps to install Metasploit MSFVenom on Rocky Linux 9 with Ruby 3.1.5. We’ll ensure that your system is up-to-date and all necessary dependencies are installed.
🚀 System Update
First, let’s update your system to make sure all existing packages are up-to-date.
sudo dnf update -y
📦 Install Required Dependencies
Next, install the essential dependencies required for Metasploit Framework.
sudo dnf install -y epel-release
sudo dnf install -y git wget curl zlib zlib-devel gcc gcc-c++ patch readline readline-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison sqlite-devel postgresql-devel libpcap-devel
💎 Install Ruby 3.1.5
We’ll install Ruby using rbenv
, a Ruby version management tool.
# Install rbenv and ruby-build
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
# Add rbenv to PATH
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install Ruby 3.1.5
rbenv install 3.1.5
rbenv global 3.1.5
🔗 Install Metasploit Framework
Clone the Metasploit Framework repository and install it.
git clone https://github.com/rapid7/metasploit-framework.git
cd metasploit-framework
rbenv local 3.1.5
# Install bundler and dependencies
gem install bundler
bundle install
🛡️ Final Setup
Add msfvenom
to your PATH for easier access.
echo 'export PATH="$HOME/metasploit-framework:$PATH"' >> ~/.bashrc
source ~/.bashrc
🎉 Verify Installation
Finally, let’s verify that msfvenom
is correctly installed.
msfvenom --version
You should see the version information for MSFVenom, confirming a successful installation.
By following these steps, you should now have Metasploit MSFVenom installed on your Rocky Linux 9 system with Ruby 3.1.5. Happy hacking! 🔥