HackTricks
Searchโ€ฆ
๐Ÿ‘ฝ
Network Services Pentesting
110,995 - Pentesting POP
Support HackTricks and get benefits!

Basic Information

Post Office Protocol (POP) is a type of computer networking and Internet standard protocol that extracts and retrieves email from a remote mail server for access by the host machine. POP is an application layer protocol in the OSI model that provides end users the ability to fetch and receive email (from here).
The POP clients generally connect, retrieve all messages, store them on the client system, and delete them from the server. There are 3 versions of POP, but POP3 is the most used one.
Default ports: 110, 995(ssl)
1
PORT STATE SERVICE
2
110/tcp open pop3
Copied!

Enumeration

1
nc -nv <IP> 110
2
openssl s_client -connect <IP>:995 -crlf -quiet
Copied!

Manual

You can use the command CAPA to obtain the capabilities of the POP3 server.

Automated

1
nmap --script "pop3-capabilities or pop3-ntlm-info" -sV -port <PORT> <IP> #All are default scripts
Copied!
The pop3-ntlm-info plugin will return some "sensitive" data (Windows versions).

โ€‹POP3 bruteforceโ€‹

POP syntax

1
POP commands:
2
USER uid Log in as "uid"
3
PASS password Substitue "password" for your actual password
4
STAT List number of messages, total mailbox size
5
LIST List messages and sizes
6
RETR n Show message n
7
DELE n Mark message n for deletion
8
RSET Undo any changes
9
QUIT Logout (expunges messages if no RSET)
10
TOP msg n Show first n lines of message number msg
11
CAPA Get capabilities
Copied!
From hereโ€‹
Example:
1
[email protected]:~# telnet $ip 110
2
+OK beta POP3 server (JAMES POP3 Server 2.3.2) ready
3
USER billydean
4
+OK
5
PASS password
6
+OK Welcome billydean
7
โ€‹
8
list
9
โ€‹
10
+OK 2 1807
11
1 786
12
2 1021
13
โ€‹
14
retr 1
15
โ€‹
16
+OK Message follows
18
Dear Billy Dean,
19
โ€‹
20
Here is your login for remote desktop ... try not to forget it this time!
21
username: billydean
22
password: PA$W0RD!Z
Copied!

HackTricks Automatic Commands

1
Protocol_Name: POP #Protocol Abbreviation if there is one.
2
Port_Number: 110 #Comma separated if there is more than one.
3
Protocol_Description: Post Office Protocol #Protocol Abbreviation Spelled out
4
โ€‹
5
Entry_1:
6
Name: Notes
7
Description: Notes for POP
8
Note: |
9
Post Office Protocol (POP) is a type of computer networking and Internet standard protocol that extracts and retrieves email from a remote mail server for access by the host machine. POP is an application layer protocol in the OSI model that provides end users the ability to fetch and receive email (from here).
10
The POP clients generally connect, retrieve all messages, store them on the client system, and delete them from the server. There are 3 versions of POP, but POP3 is the most used one.
11
โ€‹
12
https://book.hacktricks.xyz/pentesting/pentesting-whois
13
โ€‹
14
Entry_2:
15
Name: Banner Grab
16
Description: Banner Grab 110
17
Command: nc -nv {IP} 110
18
โ€‹
19
Entry_3:
20
Name: Banner Grab 995
21
Description: Grab Banner Secure
22
Command: openssl s_client -connect {IP}:995 -crlf -quiet
23
โ€‹
24
Entry_4:
25
Name: Nmap
26
Description: Scan for POP info
27
Command: nmap --script "pop3-capabilities or pop3-ntlm-info" -sV -p 110 {IP}
28
โ€‹
29
Entry_5:
30
Name: Hydra Brute Force
31
Description: Need User
32
Command: hydra -l {Username} -P {Big_Passwordlist} -f {IP} pop3 -V
33
34
Entry_6:
35
Name: consolesless mfs enumeration
36
Description: POP3 enumeration without the need to run msfconsole
37
Note: sourced from https://github.com/carlospolop/legion
38
Command: msfconsole -q -x 'use auxiliary/scanner/pop3/pop3_version; set RHOSTS {IP}; set RPORT 110; run; exit'
39
Copied!
Support HackTricks and get benefits!