A payload is a piece of software that runs after a system is compromised. The payload is typically attached to and delivered with an exploit. There are three different types of payloads in Metasploit, which are
stages. The main role of Stages payloads is that they use tiny stagers to fit into small exploitation spaces. During exploitation, an exploit developer has a very limited amount of memory that he can play with. The stagers use this space and their work is to pull down the rest of the staged payload. On the other hand, singles are self-contained and completely standalone. It is as simple as running a small executable.
Let us have a look at the
modules directory in the following screenshot: ...