Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

Odin Research / What is / C2 and post-exploitation

What Is Metasploit? How the Framework and Meterpreter Work

The best-known free exploitation framework: how it works, how intruders have used it, and how to tell a lab from a live handler.

By
Odin by Brandefense
Updated
21 Nov 2026
Reading time
8 min read
Type
Offensive framework

In short

Metasploit is an open-source penetration testing framework maintained by Rapid7 and released under a BSD-style license. It bundles exploit modules, scanners and payloads such as Meterpreter, an advanced agent that loads through reflective DLL injection. Security teams use it to validate vulnerabilities, and attackers use the same free tooling in real intrusions.

Key takeaways

What it is
An open-source exploitation framework from Rapid7, driven from msfconsole, with a commercial Metasploit Pro edition on top.
How it works
Exploit modules deliver a payload, such as Meterpreter, which calls back to a handler. Post modules then act on the open session.
Why it matters
It is free and powerful. CISA reported nation-state actors installing Metasploit on a victim's domain controller after exploiting two known flaws.
What Odin Research saw
93 Metasploit and Meterpreter endpoints in Monograph 22, of which 22 are confirmed C2. One handler hid on the RDP port 3389.
What to do first
Patch exposed edge devices, register your own testing hosts, and hunt for Meterpreter stagers and RPC logins rather than blocking on ports.

What is Metasploit?

Metasploit is an open-source penetration testing framework maintained by Rapid7. It bundles exploit modules, scanners, post-exploitation modules and payloads such as Meterpreter in one console. Security teams use it to check whether a flaw can really be used. Attackers use the same free tooling against networks they have no right to touch.

The project lives on GitHub as rapid7/metasploit-framework. Rapid7 describes it as an open-source tool released under a BSD-style license. The main interface is msfconsole, a command shell from which a tester picks a module, sets a target and launches it.

There are two editions. The free, open-source Metasploit Framework is what most people mean by "Metasploit". Metasploit Pro is Rapid7's commercial edition, which its documentation calls an exploitation and vulnerability validation tool that splits the penetration testing workflow into manageable sections.

Because it is free, well documented and preinstalled on Kali Linux, Metasploit is one of the most common offensive tools on the internet. For defenders that cuts both ways. Many Metasploit servers belong to labs and red teams, and some belong to real intruders.

How Metasploit works

Metasploit is built from modules. Rapid7's documentation covers writing three main kinds: exploit modules, which deliver a payload through a vulnerability; auxiliary modules, such as scanners and fingerprinting checks; and post modules, which run after a session is open.

The payload is the code that runs on the target. Its most famous payload is Meterpreter, which the project describes as an advanced payload that has been part of Metasploit since 2004. Key points from the Meterpreter documentation:

  • Roles are reversed. The target runs the Meterpreter "server". The Ruby-based Metasploit side is the "client", whichever way the network connection goes.
  • Small core, many extensions. A core component implements the protocol and loads extensions, such as stdapi, that add the common commands.
  • Reflective loading. Meterpreter uses Reflective DLL Injection, so its DLL can run as shellcode. Metasploit can wrap that shellcode in an executable or deliver it through an exploit.
  • Several languages and transports. It was first written in C, and PHP, Python and Java versions followed. The documentation covers HTTP communication and a stageless mode.

The listener that waits for a payload to call back is called a handler. A handler on a public server is what most internet scans see. Metasploit also ships an RPC daemon, msfrpcd, so other programs can drive it. Odin Research notes that front ends such as Viper talk to this daemon, which accepts auth.login calls over MessagePack.

Metasploit editions, installation and popularity

The GitHub README recommends Rapid7's official installers for Linux and macOS and notes that Metasploit comes preinstalled on Kali Linux. The repository had about 39,600 stars and 15,100 forks on 21 November 2026, which makes it one of the most visible security projects on GitHub.

Metasploit Pro adds a web interface. Rapid7's troubleshooting pages refer to the Metasploit service binding to port 3790, and that port shows up often in internet scans. A Pro console is a product interface, not a hostile handler.

Is it legal? Yes. Downloading and running Metasploit is legal. Using it against systems you do not own or have written permission to test is not.

How attackers use Metasploit

Metasploit gives an intruder the same ready-made exploits and payloads it gives a tester, at no cost. Real cases show it used after initial access, not only in labs.

In September 2023, CISA and partners published a joint advisory, AA23-250A, on nation-state actors who broke into an organization through two flaws: CVE-2022-47966 in Zoho ManageEngine ServiceDesk Plus and CVE-2022-42475 in the Fortinet FortiOS SSL-VPN. According to the advisory, the actors installed Metasploit on the organization's domain controller. CISA's companion analysis report, AR23-250A, identified two recovered files as variants of Meterpreter that connect to command-and-control servers to receive payloads.

That pattern is typical. Metasploit often appears as a second-stage tool: a handler on a rented server, a Meterpreter session on a foothold host, then credential theft and lateral movement. For the entry step itself, see Exploit Public-Facing Application (T1190).

What Odin Research observed

Metasploit appears in six Odin studies. The numbers below come from those reports. Addresses that may belong to testers stay withheld.

  • 93 endpoints, 22 confirmed. Monograph 22 mapped 75 Metasploit endpoints on 65 hosts and 18 Meterpreter endpoints on 18 hosts. Of these, 22 are confirmed command-and-control (C2): 17 Metasploit and 5 Meterpreter. Germany (19), Hong Kong (11), Morocco (8) and Singapore (7) led the country split.
  • Handlers in disguise. One confirmed Meterpreter handler listened on 3389, the Remote Desktop port, so it looks like RDP at a glance. Another used the default handler port 4444. Three standalone team listeners sat on port 3001.
  • A cluster that may be a tester. Seven German business-ISP addresses each ran Metasploit listeners on 443 and 80 behind one shared company certificate. Monograph 22 sends that pattern to analyst review, not the block list.
  • An open installation. A server on an Indian hosting network exposed its full Metasploit installation tree through an open directory listing: 58 directories and 7,064 files, including database components. It shows an install, not who ran it or against whom.
  • Shared hosts. Monograph 17 and Monograph 19 found one cloud host running a Meterpreter listener on 4446 and 443 next to a Sliver listener on 8888. It was the only host in that busy cloud range with same-host evidence strong enough for blocking.
  • Wordlists that look like leaks. In Monograph 09, one Metasploit wordlist held 63 of 66 Google API keys and 28 of 30 AWS keys found across the study. These were sample values shipped with the tool, not stolen secrets. Monograph 13 found the same AWS example key in a Metasploit wordlist on another host.

The lesson: a Metasploit banner is common and often legitimate. Look for a second signal, such as a handler on a disguised port or a co-hosted C2 framework, before you block.

How to detect Metasploit and Meterpreter

  • Processes on your own hosts. Alert when msfconsole, msfrpcd or msfvenom runs outside approved testing machines.
  • RPC logins. An auth.login call to an /api/ path on ports such as 55552, 55553 or 3790 is a Metasploit RPC login. Viper adds /api/v1/msf/ paths.
  • In-memory stagers. PowerShell that decodes Base64 and calls VirtualAlloc or CreateThread is a classic Meterpreter stager pattern. See Process Injection (T1055).
  • Handlers on odd ports. TLS on 3389 that is not RDP, or a listener on 4444, deserves a closer look.
  • Not the port alone. Ports 80, 443 and 3790 are far too common to block on.

Monograph 22 publishes a Suricata rule set with signatures for Metasploit RPC logins and Viper API use, a Sigma rule for Meterpreter in-memory stagers and a Microsoft Sentinel KQL hunt. All are on the report page and in the Defense Kit.

How to defend against Metasploit-based attacks

  1. Patch exposed edge devices first. The AA23-250A intrusion began with two known flaws. Prioritize the KEV catalog and see how to respond to actively exploited vulnerabilities.
  2. Register your own Metasploit hosts. List every sanctioned Metasploit, Viper and other emulation server in your SIEM allowlists, so real alerts stand out.
  3. Lock down consoles. Put Metasploit Pro, Viper and RPC services behind a VPN or mutual TLS, and turn off directory listing on staging servers.
  4. Do not auto-block raw feed lists. Pair a Metasploit label with a second signal before blocking. See false positives.
  5. If you find Meterpreter, isolate the host, capture memory before reboot, reset credentials used on it and hunt for the same handler address across your logs. Follow your incident response plan.

Metasploit compared with other C2 and exploitation frameworks

FrameworkTypeWhat Odin sawNotes
MetasploitOpen-source exploit framework with the Meterpreter payload93 endpoints, 22 confirmed C2 (Monograph 22)Many installs are labs; disguised handler ports are the stronger signal
Cobalt StrikeCommercial adversary simulation software (MITRE ATT&CK S0154)Covered in our Knowledge Hub profileCracked copies are widely abused
SliverOpen-source C2 frameworkOperator gRPC on 31337, often next to MetasploitSee our Sliver page
ViperBrowser front end for MetasploitNo listeners of its own; drives Metasploit RPCDetect by its /api/v1/msf/ paths

Frequently asked questions about Metasploit

What is Metasploit?

Metasploit is an open-source penetration testing framework maintained by Rapid7. It combines exploit modules, scanners, post-exploitation modules and payloads such as Meterpreter, driven from the msfconsole command shell.

Is Metasploit malware?

No. Metasploit is a legitimate security tool released under a BSD-style license. It is dual-use: attackers use the same exploits and Meterpreter payloads, so security products often flag its payloads as malicious.

Is Metasploit legal?

Yes, for systems you own or are authorized to test. Using it against other systems without written permission is illegal in most countries.

Is Metasploit free?

The Metasploit Framework is free and open source. Metasploit Pro is Rapid7's commercial edition with a web interface, offered with a free trial.

What is Meterpreter?

Meterpreter is Metasploit's advanced payload, part of the project since 2004. It loads through Reflective DLL Injection and adds commands through extensions such as stdapi.

Who makes Metasploit?

Rapid7 maintains the Metasploit Framework on GitHub, together with a large community of contributors. Meterpreter was originally written by Matt Miller, known as skape.

Metasploit vs Cobalt Strike: what is the difference?

Metasploit Framework is free and open source, with many public exploit modules. Cobalt Strike is commercial adversary simulation software focused on post-exploitation and team operations. Attackers abuse both.

How do I detect Metasploit in my network?

Watch for msfconsole or msfrpcd outside approved hosts, Metasploit RPC logins, PowerShell in-memory stagers and TLS handlers on unusual ports such as 3389. Odin Research publishes Suricata, Sigma and KQL rules in its Defense Kit.

Should I block every Metasploit server I find?

No. Many belong to labs and authorized testers. Odin Research confirmed 22 of 93 Metasploit and Meterpreter endpoints as C2. Look for a second, independent signal first.

Sources

  1. Rapid7, metasploit-framework repository, GitHub. github.com/rapid7/metasploit-framework (checked 21 November 2026)
  2. Metasploit documentation. docs.metasploit.com/ (checked 21 November 2026)
  3. Metasploit documentation, Meterpreter. docs.metasploit.com/docs/using-metasploit/advanced/meterpreter/meterpreter.html (checked 21 November 2026)
  4. Rapid7, Metasploit Pro documentation. docs.rapid7.com/metasploit/ (checked 21 November 2026)
  5. CISA and partners, AA23-250A: Multiple Nation-State Threat Actors Exploit CVE-2022-47966 and CVE-2022-42475, 7 September 2023. www.cisa.gov/news-events/cybersecurity-advisories/aa23-250a (checked 21 November 2026)
  6. CISA, Analysis Report AR23-250A, 7 September 2023. www.cisa.gov/news-events/analysis-reports/ar23-250a (checked 21 November 2026)
  7. NVD, CVE-2022-47966. nvd.nist.gov/vuln/detail/CVE-2022-47966 (checked 21 November 2026)
  8. NVD, CVE-2022-42475. nvd.nist.gov/vuln/detail/CVE-2022-42475 (checked 21 November 2026)
  9. MITRE ATT&CK, Cobalt Strike (S0154). attack.mitre.org/software/S0154/ (checked 21 November 2026)

Related tools and terms

All Odin Research explanations · Brandefense glossary

Odin Research

Get the rules, not just the definition

Every Odin Research report ships with verified indicators and detection rules you can load today.

Open the Defense Kit