Metasploit is a computer security project that provides valuable information about the security vulnerabilities of a system. It can also help a system admin penetration testing and IDS signature development. With Metasploit, security teams can not only verify the vulnerabilities but also manage security calculations and improves security awareness; it can allow the team to stay ahead of the attackers with strong defense.
Metasploit uses Ruby at its core. Ruby is a powerful interpreted language. Metasploit is available in 2 editions – open-source (community edition) and paid (Metasploit Pro, Express).
As a Linux enthusiast, let’s check out the free, open-source version of Metasploit into our Ubuntu system!
Installing Metasploit
-
Installing dependencies
At first, we have to make sure that the system is ready for the installation.
Update all the system components –
sudo apt update && sudo apt upgrade -y
Now, it’s time to install all the dependencies.
sudo apt install curl gpgv2 autoconf bison build-essential git-core libapr1 postgresql libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev openssl libpq-dev libreadline6-dev libsqlite3-dev libssl-dev locate libsvn1 libtool libxml2 libxml2-dev libxslt-dev wget libyaml-dev ncurses-dev postgresql-contrib xsel zlib1g zlib1g-dev
-
Installing Metasploit
Now, time to finally install Metasploit. Run the following command –
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \ chmod 755 msfinstall && \ ./msfinstall
Firing Metasploit
Metasploit offers various ways of enjoying the service – GUI (Cobal Strike and Armitage) and CLI (msfcli and msfconsole). Metasploit also offers various APIs for controlling Metasploit from a remote computer. It can also be a great solution for scripting, especially performing automated tasks.
Let’s check out firing “msfconsole”. At first, we need the PostgreSQL service to run.
sudo service postgresql start
Time to start Metasploit!
sudo msfconsole
You’ll see the Metasploit console running.
For all the available commands, type help or “?” (without quotes).
For exiting the console, run the following command –
exit
Enjoy!