Course contentsShow
← Security
Lesson 2195 of 3,05243. Offensive Security ToolingFree lesson

Exploit Modules and Payloads

Understanding exploit module structure, payload types (singles, stagers, stages), and matching exploits with payloads.

Exploit Modules and Payloads

You'll learn how Metasploit exploit modules work together with payloads to compromise targets, and how to match them correctly for successful exploitation.

What Are Exploit Modules?

An exploit module is the vehicle that delivers your attack—it targets a specific vulnerability in a system (like a buffer overflow or a misconfigured service). Think of it as the delivery truck that gets you to the target's door.

But getting to the door isn't enough. You need something to do once you're inside. That's where payloads come in.

Payload Types

Metasploit organizes payloads into three categories:

Singles

Singles are self-contained, complete payloads that don't need additional components. They execute immediately—for example, adding a user account or executing a single command. They're simple but limited in size and functionality.

Stagers

Stagers are small initial payloads designed to establish a connection back to your machine, then download the rest of the payload (the stage). Think of them as scouts that set up a secure line for reinforcements.

Stages

Stages are the larger, feature-rich payloads delivered after the stager succeeds. They provide advanced capabilities like full shell access or Meterpreter sessions. Stagers and stages work as a team—you can't use a stage without its matching stager.

Matching Exploits and Payloads

Not every payload works with every exploit. Key constraints include:

  • Architecture compatibility: x86 vs x64 payloads
  • Platform matching: Windows, Linux, or other OS
  • Space limitations: The exploit may have size restrictions
  • Connection requirements: Reverse connections when firewalls block incoming traffic

MSFconsole shows compatible payloads with the show payloads command after selecting an exploit.

Key Takeaway: Exploit modules deliver the attack vector, while payloads define what happens after successful exploitation—singles are standalone, while stagers and stages work together to bypass size constraints and deliver advanced post-exploitation capabilities.