# POP Pentesting

## POP (Post Office Protocol) Pentesting <a href="#pop-post-office-protocol-pentesting" id="pop-post-office-protocol-pentesting"></a>

Post Office Protocol is an application-layer protocol used by email clients. POP3 is a commonly used version. Default ports are 110, 995.

### Enumeration <a href="#enumeration" id="enumeration"></a>

```shellscript
nmap --script "pop3-capabilities or pop3-ntlm-info" -p 110 <target-ip>
```

### Connect <a href="#connect" id="connect"></a>

```shellscript
nc <target-ip> 110
# or
telnet <target-ip> 110
```

### Commands <a href="#commands" id="commands"></a>

```shellscript
# Login
USER <username>
PASS <password>

# Number and total size of all messages
STAT
# List messages and size
LIST
# Retrieve the message of given number
RETR <number>
# Delete the message of given number
DELE <number>
# Reset the mailbox
RSET
# Exit the mail server
QUIT
```
