What are we actually doing?
Metasploit Framework is a security testing toolkit. It has exploitation modules, but it also includes auxiliary modules that gather information about network services. Today, we'll use auxiliary modules only.
Our “remote website” is a server running on another virtual machine that we own. That's a real network connection, and the skills transfer to authorised security assessments. The goal is to understand what a web server reveals—not to break into accounts or take control of machines.
Use these commands only against your own isolated test machines or systems you have explicit permission to assess. Never point Metasploitable at the public internet, and don't scan unrelated websites, school networks, or other people's servers.
Today's mission
- Build a private two-machine lab.
- Open Metasploit in Kali Linux.
- Identify an HTTP server on the lab target.
- Read its page title and discover supported HTTP methods.
- Explain the findings like a security tester.
01Build a safe lab
You'll need a Kali Linux VM and a Metasploitable 2 VM. Metasploitable 2 is an intentionally vulnerable Ubuntu-based training system released for security testing. VirtualBox or VMware will work; the examples below assume VirtualBox-style networking.
Host-only network adapter
Host-only adapter only
Use an isolated host-only or equivalent private virtual network. Do not bridge the target VM to your home LAN or expose it to the internet.
- Install or boot Kali Linux in a virtual machine.
- Download Metasploitable 2 from the official Rapid7 guide and import its virtual disk into another VM.
- Attach both VMs to the same host-only network. The vulnerable target should have no bridged or NAT adapter.
- Boot both machines and take a snapshot before experimenting.
Metasploit is commonly pre-installed on Kali. If you need to install or update it, give Kali only temporary internet access, then return it to the isolated lab network before testing. Changes in a non-persistent live session may disappear after reboot.
02Find your lab server's address
Log in to Metasploitable 2 using its published training credentials: username msfadmin and password msfadmin. At the target's terminal, type:
ifconfigFind the IPv4 address shown for its network interface. This guide uses 192.168.56.101 as an example only; substitute the actual address of your own VM throughout.
Now switch to a terminal in Kali Linux and make sure the two lab machines can talk:
ping -c 3 192.168.56.101
curl -I http://192.168.56.101/The curl -I command asks for HTTP response headers. If you get a response from the training machine, you're ready. If not, see troubleshooting below.
03Launch Metasploit
On Kali, verify Metasploit is available. If not, you can install it using the Kali package manager when Kali has an authorised internet connection:
sudo apt update
sudo apt install metasploit-frameworkFor the full Metasploit database setup, run this once on Kali. Then open the console:
sudo msfdb init
msfconsole -qWhen you see the msf6 > prompt (or a later version), you're in. The next commands run inside msfconsole, not your normal Linux shell.
db_status
help
workspace -a darkpc-web-labIf the database is already initialised, sudo msfdb start can restart it. The workspace command keeps this exercise separate from other assessments and requires an active database connection.
04Investigate the remote web service
This is where Metasploit gets interesting. We'll load three documented auxiliary modules. They make requests to our single lab IP and show us how the web service responds.
A. Identify the web server
The http_version module asks a server for its advertised HTTP software information.
use auxiliary/scanner/http/http_version
set RHOSTS 192.168.56.101
set RPORT 80
show options
runLook for a web server name or version in the output. That is a clue, not proof of a vulnerability: banners can be hidden, changed, or misleading.
B. Read the webpage title
Next, ask for the title of the page returned by the remote web server.
back
use auxiliary/scanner/http/title
set RHOSTS 192.168.56.101
set RPORT 80
show options
runA page title can help you identify an application or a default landing page. By itself, it doesn't prove anything is insecure.
C. Inspect allowed HTTP methods
Web servers may advertise methods such as GET, HEAD, and POST. We'll use an HTTP OPTIONS request to see what our lab server reports.
back
use auxiliary/scanner/http/options
set RHOSTS 192.168.56.101
set RPORT 80
show options
runNotice any methods beyond the ordinary ones. An advertised method is not automatically exploitable, and an OPTIONS response may not accurately describe the methods the server really accepts. A proper assessment checks the application's configuration and actual behaviour within the authorised scope.
RHOSTS is the IP of the lab target. RPORT 80 means the HTTP service on TCP port 80. use loads a module, show options shows its settings, run executes the selected module, and back leaves it.
05Think like a defender
Real security testing doesn't end with terminal output. It turns observations into clear, useful findings.
Did the server disclose a product or version? Why might an administrator limit unnecessary detail?
Is the service displaying a normal application, a default page, or an unexpected title?
Does the advertised list match the application's needs? Could unnecessary methods be disabled?
Write a mini-report recording the target as “my isolated Metasploitable 2 VM”, its private IP, the exact commands you ran, your observations, and two sensible hardening suggestions. Remember that Metasploitable is deliberately insecure; don't use its outdated configuration as an example of good production practice.
06Common beginner problems
“Connection refused” or timeouts?
Confirm that both VMs are booted, on the same host-only virtual network, and that the target IP from ifconfig matches RHOSTS. The local network may not use the example 192.168.56.101 address.
“Unknown module”?
Try search http_version or search type:auxiliary http inside msfconsole and check the installed framework version.
“Database not connected”?
Exit msfconsole, run sudo msfdb start, restart the console, and check db_status. These scanner modules may run without database support, but workspaces and stored results require it.
Website uses HTTPS instead?
In other authorised labs, HTTPS often uses port 443 with SSL true. Today's Metasploitable HTTP lab intentionally uses port 80.
Using Slackware on the host?
That's fine. Run Kali as a guest VM and leave the vulnerable target inside the isolated VM network. You don't need to install Metasploit natively on Slackware for this guide.
Three commands. One remote lab. Real skills.
You've learned the difference between remote assessment and unauthorised intrusion, explored a web server from another machine, and built the foundations for an ethical security workflow.
Next DarkPC lab idea: install OWASP Juice Shop on a private test machine, discover normal HTTP behaviours, then learn how developers fix common web-application weaknesses. Keep the same isolate-and-authorise rule.
Review this lesson ↑Official references
This tutorial uses commands and module names verified against the upstream documentation:
- Kali Linux: Starting Metasploit Framework
- Rapid7: Metasploitable 2 setup
- Metasploit: Running auxiliary modules
- Rapid7: HTTP version module
- Rapid7: HTTP OPTIONS module
Published for learning and authorised testing. Metasploit and Kali Linux are third-party projects; DarkPC.net is not affiliated with their maintainers.