IMAP / POP3
If SMTP is how mail gets sent, IMAP and POP3 are how it gets read. Crack one set of employee credentials and these protocols let you log straight into their mailbox — where confidential data, password reset links, and internal correspondence are waiting.
Protocol: TCP · Ports: IMAP 143 / 993 (TLS) · POP3 110 / 995 (TLS)
IMAP vs POP3
Both IMAP (Internet Message Access Protocol) and POP3 (Post Office Protocol) provide access to email on a mail server, but they work differently:
IMAP keeps a consistent database across every device — sent mail copied into an IMAP folder is visible from any client. POP3 is the older, simpler model that just pulls mail down.
Without extra measures, both run unencrypted, transmitting commands, mail, usernames, and passwords in plain text. That’s why most servers require an encrypted (TLS) session — and why the TLS ports (993, 995) are the ones you’ll usually be authenticating against.
Default Configuration
A common Linux mail server providing IMAP/POP3 is Dovecot. Both protocols have many configuration options, but for footprinting what matters is the command set you can drive from the command line. IMAP commands:
POP3 commands:
Dangerous Settings
Most companies use third-party providers (Google, Microsoft), but some still run their own mail servers — and that’s where misconfigurations let you read every email sent and received, sensitive ones included. Configuration options worth scrutinizing:Footprinting the Service
Nmap
Scan the four IMAP/POP3 ports. If the server uses an embedded SSL certificate, the scan reveals organisational detail:mail1.inlanefreight.htb), the organization (InlaneFreight), and location (California) — all useful for building username lists and understanding the target.
cURL
curl can list a mailbox directly. Adding verbose (-v) shows the TLS version, SSL certificate details, and the banner — which often discloses the mail server version:
Netcat — Plaintext Ports
You can talk to the plaintext ports (143 / 110) directly withnc. Connect to IMAP:
openssl against the TLS ports.
OpenSSL — TLS-Encrypted Interaction
Connect over TLS to authenticate properly. IMAP over SSL:Reading Mail Over IMAP
Once authenticated over TLS, list mailboxes, select one, and read messages:Quick Reference
The footprinting flow: nmap for ports + cert intel → curl/openssl for banner and version → authenticate over TLS with found credentials → list mailboxes → read mail with
BODY.PEEK[].
Next: SNMP — community strings and walking the MIB for credentials and config.