# Staged and Non Stage Payloads

### Overview

Payloads define **what runs on the target after exploitation**.

In Metasploit, payloads come in two main types:

* **Staged payloads** → delivered in **multiple steps**
* **Non-staged payloads** → delivered in **one complete chunk**

#### Staged Payloads

A **staged payload** is split into:

1. A **small initial stub (stager)**
2. A **larger main payload (stage)** that is downloaded after execution

The stager’s only job is to:

* Connect back to the attacker
* Download and execute the full payload

Example:

```bash
use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp
```

#### Non staged payloads

A **non-staged payload** contains **everything in one payload**:

* No follow-up download
* No second-stage communication

Once executed, the payload is fully functional.

Example:

```bash
use exploit/multi/handler
set payload windows/x64/meterpreter_reverse_tcp
```

#### When to Use Which

Use Staged Payloads When:

* Payload size matters
* Exploiting memory corruption
* Network access is stable

Use Non-Staged Payloads When:

* Firewall restrictions exist
* No second connection allowed
* Reliability is critical


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gokulkarthik.gitbook.io/pentesting-checklist/others/miscellaneous/staged-and-non-stage-payloads.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
