Description

  • Internet Message Access Protocol (IMAP) allows you to read emails using email service / remote server
  • Post Office Protocol (POP3) downloads email and stores it on client’s device, it is then deleted from the server
  • SMTP is used to send emails and clients have access to emails when the sent emails are in IMAP folder
  • IMAP is unencrypted but SSL/TLS can be used

Port

  • Establishes connection on port 143 and 993 (encrypted connection)
  • POP3 uses port 110 and 995 (encrypted connection)

Interaction / Commands

ProtocolCommandDescription
IMAP1 LOGIN username passwordlogging in
IMAP1 LIST "" **listing directories
IMAP1 CREATE “INBOX”creating mailbox
IMAP1 DELETE “INBOX”deleting mailbox
IMAP1 RENAME “ToRead” “Important”renaming mailbox
IMAP1 LSUB "" **active or subscribed names
IMAP1 SELECT INBOXselecting mailbox
IMAP1 UNSELECT INBOXexiting selected mailbox
IMAP1 FETCH allretrieving data from message in mailbox
IMAP1 CLOSEremoving messages with Deleted flag
IMAP1 LOGOUTlogging out
POP3USER usernameidentifies user
POP3PASS passwordauthenticates user
POP3STATretrieving number saved emails
POP3LISTretrieving number and size emails
POP3RETR iddeliver email
POP3DELE iddelete email
POP3CAPAdisplay capabilities of server
POP3RSETreset transmitted information
POP3QUITcloses connection

Logging in using cURL

curl -k 'imaps://IP_Address' --user user:password

cURL

Stands for client URL and is used to transfer data to and from a server

Interacting with IMAP or POP3 server over SSL

openssl s_client -connect IP_Adress:pop3s
openssl s_client -connect IP_Adress:imaps

Footprinting

sudo nmap IP_Address -sV -p110, 143, 993, 995