Securing Email Bruce Maggs. Separate Suites of Protocols Protocols for retrieving email: POP, IMAP, MAPI (Microsoft Exchange) Protocols for sending email:

Slides:



Advertisements
Similar presentations
Securing Bruce Maggs. Separate Suites of Protocols Protocols for retrieving POP, IMAP, MAPI (Microsoft Exchange) Protocols for sending
Advertisements

Protocols and Troubleshooting Brandon Checketts.
INTRANET MAIL SERVER (DESIGN OF SMTP and POP3)
1 Electronic Mail u Three major components: u user agents u mail servers u simple mail transfer protocol: SMTP u User Agent u a.k.a. “mail reader” u composing,
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Electronic Mail and SMTP
POP3 Post Office Protocol v.3. Intro The Post Office Protocol (POP) is currently the most popular TCP/IP access and retrieval protocol. It implements.
Esimerkki: Sähköposti. Lappeenranta University of Technology / JP, PH, AH Electronic Mail Three major components: user agents mail servers simple mail.
Dave Roberts.  Dynamic Host Configuration Protocol  DHCP  Simple Mail Transport Protocol  SMTP 2.
Simple Mail Transfer Protocol
2440: 141 Web Site Administration Services Instructor: Enoch E. Damson.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Mail Server Fitri Setyorini. Content SMTP POP3 How mail server works IMAP.
-I CS-3505 Wb_ -I.ppt. 4 The most useful feature of the internet 4 Lots of different programs, but most of them can talk to each.
SIMPLE MAIL TRANSFER PROTOCOL SECURITY Guided By Prof : Richard Sinn Bhavesh Jadav Mayur Mulani.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
 ENGR 1110 Introduction to Engineering – Cyber Security Allison Holt, Adam Brown Auburn University.
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Internet Protocols Simple Mail Transfer Protocol, SMTP RFC821 (August 1982)
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
11 SECURING INTERNET MESSAGING Chapter 9. Chapter 9: SECURING INTERNET MESSAGING2 CHAPTER OBJECTIVES  Explain basic concepts of Internet messaging. 
1 Web Server Administration Chapter 8 Providing Services.
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Mail Services.
CSE401N: Computer Networks Lecture-5 Electronic Mail S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Intro to Computer Networks Bob Bradley The University of Tennessee at Martin.
Review: –How do we address “a network end-point”? –What services are provided by the Internet? –What is the network logical topology observed by a network.
Application Layer Protocols Simple Mail Transfer Protocol.
( Post Office Protocol - Version 3 ) POP3 RFC 1939 報告學生 : 駱正哲.
SMTP PROTOCOL CONFIGURATION AND MANAGEMENT Chapter 8.
Sending and Receiving Mails
File Transfer Protocol (FTP)
05/19/2003 Christiane Schmidt 1 IMAP internet message access protocol.
POP3
1 SMTP - Simple Mail Transfer Protocol –RFC 821 POP - Post Office Protocol –RFC 1939 Also: –RFC 822 Standard for the Format of ARPA Internet Text.
Chapter 16: Distributed Applications Business Data Communications, 4e.
X.509 Topics PGP S/MIME Kerberos. Directory Authentication Framework X.509 is part of the ISO X.500 directory standard. used by S/MIME, SSL, IPSec, and.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
ColdFusion Foundations: POP3 Mosh Teitelbaum evoch, LLC.
P.O.P. A presentation brought to you by Thomas. Topics Introduction General Information Area of use Functionality The alternative way POP3 vs. IMAP Conclusion.
SMTP Tapu Ahmed Jeremy Nunn. Basics Responsible for electronic mail delivery. Responsible for electronic mail delivery. Simple ASCII protocol that runs.
Security fundamentals Topic 9 Securing internet messaging.
SMTP - Simple Mail Transfer Protocol RFC 821
CITA 310 Section 6 Providing Services (Textbook Chapter 8)
1 Web Server Administration Chapter 8 Providing Services.
Post Office Protocol.
Slides based on Carey Williamson’s: FTP & SMTP1 File Transfer Protocol (FTP) r FTP client contacts FTP server at port 21, specifying TCP as transport protocol.
COMP 431 Internet Services & Protocols
VIRTUAL SERVERS Chapter 7. 2 OVERVIEW Exchange Server 2003 virtual servers Virtual servers in a clustering environment Creating additional virtual servers.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
concepts & protocols
Securing Bruce Maggs.
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Securing Bruce Maggs.
Securing Bruce Maggs.
CIT 383: Administrative Scripting
SMTP, POP3, IMAP.
ColdFusion Foundations: POP3
Chapter 2: Application layer
The Application Layer: SMTP, FTP
Chapter 7 Network Applications
Chapter 2 Application Layer
Securing Bruce Maggs.
Securing Bruce Maggs.
Presentation transcript:

Securing Bruce Maggs

Separate Suites of Protocols Protocols for retrieving POP, IMAP, MAPI (Microsoft Exchange) Protocols for sending SMTP 2

POP (Post Office Protocol) Current version is POP3, RFC Client connects to POP server on port 110 Originally, everything was sent in the clear. Yes, everything, including user name, password, and your mail. Now it’s common to connect instead to port 995 using SSL/TLS, same PKI as Web. 3

POP3 Dialog S: C: S: +OK POP3 server ready C: USER mrose S: +OK User accepted C: PASS tanstaaf S: +OK Pass accepted C: STAT S: +OK C: LIST S: +OK 2 messages (320 octets) S: S: S:. C: RETR 1 S: +OK 120 octets S: C: QUIT S: +OK dewey POP3 server signing off (maildrop empty) C: S: 4

Experimenting with a POP3 Server telnet mail.cs.duke.edu 110 openssl s_client -connect mail.cs.duke.edu:995 -quiet 5 openssl s_client creates a TLS session between client and server and supports text-based interaction – useful for debugging

Autenticated Post Office Protocol (APOP, RFC 1460) S: C: S: +OK POP3 server ready C: APOP mrose c4c9334bac560ecc979e58001b3e22fb S: +OK mrose's maildrop has 2 messages (320 octets) 6 Other authentication methods include SASL and Kerberos. in this example, session is not encrypted is a time stamp shared secret is the password " tanstaaf “ Client applies MD5 algorithm to the string tanstaaf which produces a digest value of c4c9334bac560ecc979e58001b3e22fb Password not sent in the clear, digest can’t be reused

IMAP (Internet Message Access Protocol) Current version is IMAP4, RFC Client connects to IMAP server on port 143. Originally, user name, password, mail sent in the clear. Now connect to port 993 using SSL/TLS. 7

IMAP Dialog S: * OK IMAP4rev1 Service Ready C: a001 login mrc secret S: a001 OK LOGIN completed C: a002 select inbox S: * 18 EXISTS S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) S: * 2 RECENT S: * OK [UNSEEN 17] Message 17 is the first unseen message S: * OK [UIDVALIDITY ] UIDs valid S: a002 OK [READ-WRITE] SELECT completed C: a003 fetch 12 full 8

More IMAP Authentication Mechanisms (RFC 1731) Kerberos, S/Key (like APOP example), GSSAPI (GSSAPI is a standardized API, typically wrapped around Kerberos) Kerberos example: S: * OK IMAP4 Server C: A001 AUTHENTICATE KERBEROS_V4 S: + AmFYig== random 32-bit number C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh service ticket for the principal and authenticator for client (encrypted checksum in authenticator contains 32-bit number) S: + or//EoAADZI= C: DiAF5A4gA+oOIALuBkAAmw== S: A001 OK Kerberos V4 authentication successful 9

SMTP (Simple Mail Transfer Protocol) Currently described in RFC 5321 Client connects to SMTP server on port 25 Originally everything was sent in the clear Originally client could send mail without authenticating! *** SPAM *** ***FORGERY*** Port 465 used for SSL/TLS Sender’s SMTP server relays mail to receiver’s SMTP server DNS Mail Exchanger (MX) records used to resolve mail domain name to IP address of SMTP server of recipient, e.g., 10

DNS MX Record 11

SMTP Dialog S: 220 smtp.example.com ESMTP Postfix C: HELO relay.example.org S: 250 Hello relay.example.org, I am glad to meet you C: MAIL FROM: S: 250 Ok C: RCPT TO: S: 250 Ok C: RCPT TO: S: 250 Ok C: DATA S: 354 End data with. C: From: "Bob Example" C: To: "Alice Example" C: Cc: C: Date: Tue, 15 January :02: C: Subject: Test message C: C: Hello Alice. C: This is a test message with 5 header fields and 4 lines in the message body. C: Your friend, C: Bob C:. S: 250 Ok: queued as C: QUIT S: 221 Bye {The server closes the connection} 12

STARTTLS Instead of using separate ports for SSL/TLS connections, POP, IMAP, SMTP connections can be converted from plain text to encryped communications through the use of the STARTTLS command. S: C: S: 220 mail.example.org ESMTP service ready C: EHLO client.example.org S: 250-mail.example.org offers a warm hug of welcome S: 250 STARTTLS C: STARTTLS S: 220 Go ahead C: C & S: C: EHLO client.example.org 13

SMTP AUTH Extension S: 220 smtp.example.com ESMTP Server C: EHLO client.example.com S: 250-smtp.example.com Hello client.example.com S: 250-AUTH GSSAPI DIGEST-MD5 S: 250-ENHANCEDSTATUSCODES S: 250 STARTTLS C: STARTTLS S: 220 Ready to start TLS... TLS negotiation proceeds. Further commands protected by TLS layer... C: EHLO client.example.com S: 250-smtp.example.com Hello client.example.com S: 250 AUTH GSSAPI DIGEST-MD5 PLAIN C: AUTH PLAIN dGVzdAB0ZXN0ADEyMzQ= S: Authentication successful 14 Client must log in (authenticate) to send mail. (In this example user name and password are encoded but not encrypted in PLAIN string.)

Warning! Mail relayed between two SMTP servers might not be encrypted. (Even if sender and recipient connect securely to their SMTP and IMAP servers.) 15

SORBS (SPAM and Open-Relay Blocking System) Database of bad SMTP (blacklisted) relays accessed through DNS Mail won’t be accepted from these relays (Also SPAMHAUS database.) 16

Ways to Prove your SMTP Relay is Legit Register reverse DNS name (weak) DKIM (DomainKeys Identified Mail) – relay signs headers with its private key, receiver can verify that sender is in the same domain (e.g., cs.duke.edu) as relay (no CAs, public keys distributed through DNS) SPF (Sender Policy Framework) – whitelist of which servers are permitted to originate for which domains, accessed via DNS 17

Signing Your PGP (Pretty Good Privacy) Certificate signed by certificate authority, e.g., Comodo. 18

PGP Developed by Phil Zimmerman OpenPGP standard described in RFC 4880 Public key bound to user name or address No centralized certificate authority in original design Public keys can be signed by other users attesting to their authenticty, often at key-signing parties Supported in Thunderbird, Pine, with plug-in in Outlook. 19

Comodo Verifies that you can receive at the address that you want a certificate for. 20

Retrieve Certificate Chrome downloads and stores certificate. 21

Install in Thunderbird (easier if downloaded to Firefox than Chrome) 22

My First Signed Message 23