Payloads
Staged vs. Non-staged Payloads
Try staged payloads first, but don't forget to try non-staged payloads if staged payloads don't work.
A non-staged payload is sent in its entirety along with the exploit. For example:
In contrast, a staged payload is usually sent in two parts. The first part contains a small primary payload that causes the victim machine to connect back to the attacker, transfer a larger secondary payload containing the rest of the shellcode, and then execute it. For example:
Use staged payloads when:
The vulnerability we are exploiting does not have enough buffer space to hold a full payload.
Antivirus software blocks the non-staged payload.
Executable Payloads
Generate a raw Windows PE reverse shell executable with msfvenom:
Improve the above payload by encoding it for 9 iterations:
Further improve the above payload by injecting the payload into an existing PE file (it means creating a backdoor):
This payload generation process can be accomplished within msfconsole with the generate
command:
Last updated