Rednote
GuidebooksTerminalCode
  • Welcome!
  • Utility
    • General
    • Server
    • Transferring File
      • Main
      • Code
      • Miscellaneous
    • Reverse & Bind Shells
      • Havoc
    • Metasploit
    • Service
      • FTP (21)
      • SSH (22)
      • DNS (53)
      • HTTP/HTTPS (80-443)
      • SMTP (25-465-587)
      • POP3 (110-995)
      • IMAP (143-993)
      • MySQL (3306)
      • MSSQL (1433-2433)
      • SMB (139-445)
      • RDP (3389)
      • WinRM (5985-5986)
      • WMI (135)
      • LLMNR & NBT-NS (5355-137)
      • NFS (111-2049)
      • SNMP (161-162)
      • VNC (5900)
      • Rsync (873)
      • R-Service (512-513-514)
      • IPMI (623)
      • Oracle TNS (1521)
  • Pentesting Process
    • Information Gathering
      • Passive
      • Active
      • OSINT
    • Vulnerability
    • Web Attacks
      • GENERAL
      • Crawling/Spidering & Fuzzing
      • Information Disclosure
      • Command Injection
      • Unrestricted File Upload
      • File Inclusion/Path Traversal
      • Request Smuggling
      • Clickjacking
      • Web Cache Poisoning
      • Web Cache Deception
      • Insecure Deserialization
      • Prototype Pollution
      • OAuth 2.0
      • JWT
      • SQLi
        • sqlmap
      • NoSQLi
      • GraphQL
      • XSS
      • SSRF
      • XXE
      • IDOR
      • API
      • SSTI
      • CSRF
      • CORS
      • AJP
      • SSI
      • ESI
      • XSLT
      • Cloud
      • LLM Prompt Security
    • Software Attacks
      • Binary
      • Shellcode
      • AV Evasion & Obfuscation
    • Network Attacks
      • ARP Poisoning
      • Local DNS Cache Poisoning
      • Baby Local DoS
    • Crypto Attacks
      • Utility
      • RSA
      • DSA/DSS
      • PRNG
        • LGC
        • MT
        • LFSR
    • Misc Attacks
    • Social Engineering
    • Password Cracking
      • Wordlist
      • Offline
      • Online
    • Pivoting & Tunneling
    • Local Enumeration
      • Linux
      • Windows
    • Privilege Escalation
      • Linux
        • Linux Privilege Escalation with Groups
        • Linux Privilege Escalation with Library
      • Windows
        • Windows Privilege Escalation with Groups and Privileges
        • Windows Privilege Escalation with DLL Hijacking
    • Active Directory
      • Enumeration
      • Abuse ACL
      • Extract Hash & Password
      • Pass The Hash
      • Pass The Ticket
      • Overpass the Hash
      • Relay Attack
      • Password Spraying Attack
      • AS-REP Roasting
      • Kerberoasting
      • Silver Ticket
      • Golden Ticket
      • DC Synchronization
      • AD Certificates
      • Attacking Domain Trusts
    • Reports
      • Bug Bounty Report
    • CVE
      • Linux
      • Windows
    • OTHER
      • CMS
        • WordPress
        • Joomla
        • Drupal
      • Tomcat
      • Jenkins
      • Splunk
      • Web Service
      • Navigating Python Objects
      • JavaScript Deobfuscation
  • Extra
    • My Books
    • My Exploits
    • Compiled Binaries
Powered by GitBook
On this page
  • Metasploit installation
  • Start
  • Database
  • Workspace
  • Command
  • Sessions
  • Job
  • Meterpreter
  • Plugin
  • Non-Staged & Staged

Was this helpful?

  1. Utility

Metasploit

Last updated 3 months ago

Was this helpful?

installation

sudo apt install postgresql
sudo apt install metasploit-framework

Start

Description
Command

Update

sudo apt update && sudo apt install metasploit-framework msfupdate

Run

msfconsole msfconsole -q service postgresql start && msfconsole

Database

Description
Command

Initialization

msfdb init msfdb reinit

Check

db_status

Help

help database

Workspace

Description
Command

Help

workspace -h

Listing

workspace

Selecting

workspace <NAME>

New

workspace -a <NAME>

Delate workspace

workspace -d

Delete all workspace

workspace -D

Nmap

db_nmap <COMMAND_NMAP>

Display data <TYPE> -h

hosts services creds loot analyze vulns notes

route

Export

db_export -f xml

Import

db_import <FILE_SCAN_NESSUS.nessus> db_import <FILE_SCAN_NMAP.xml>

Command

Description
Command

Help

help <COMMAND >-h

Refresh

reload_all

Search modules

<type>/<os>/<service>/<name> Type: exploits, payloads, auxiliary, post, etc. search <STRING> search type:<TYPE> name:<STRING> [<KEYWORD>:<VALUE>]

Filter

grep <STRING1> grep <STRING2> <COMMAND>

Info module

info <N>

Select module

use <N>

Setting Options

show options set <VARIABLE> <VALUE> show advanced

Setting Payload

show payloads

set payload <N>

Setting Target

show targets set target <N>

Encoders

show encoders

Setting Global

setg <VARIABLE> <VALUE>

Run

check run exploit exploit -e <shikata_ga_nai>

Sessions

Description
Command

Help

sessions -h

Listing

sessions

Upgrade

sessions -u <ID>

Resume

sessions -i <ID>

Close

sessions -k <ID>

Close all

sessions -K

Job

Description
Command

Help

jobs -h

Start exploit in jobs

exploit -j

Listing

jobs -l

Close

jobs -k <ID>

Close all

jobs -K

Meterpreter

Description
Command

Help

help

<COMMAND> -h

Local command

l<COMMAND>

Modules

run <MODULES> post/multi/recon/local_exploit_suggester

Migrate

ps (explorer or lsas)

pgrep <NAME>

migrate <PID>

Background

background CTRL+Z

Close

exit CTRL+C

To obtain it

exploit/multi/script/web_delivery exploit/windows/smb/smb_delivery or Exploits

Plugin

Add plugin in /usr/share/metasploit-framework/plugins

Description
Command

Upload

load <PLUGIN>

load db_autopwn db_autopwn

WMAP

load wmap

wmap_<TAB> wmap_<X> -h

load pentest

Non-Staged & Staged

Type
Description

Non-Staged

Single payload. es. windows/shell_bind_tcp

Staged

Two part. es. in windows/shell/bind_tcp

Metasploit
Autopwn
Pentest