TODO SMTP, POP, IMAP, NNTP, FTP, RTP maybe Telnet examples spam

Slides:



Advertisements
Similar presentations
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Advertisements

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,
2: Application Layer1 ECE5650 FTP, , DNS, and P2P.
Layer Aplikasi Risanuri Hidayat. Applications and application-layer protocols Application: communicating, distributed processes –e.g., , Web, P2P.
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
TODO SMTP, POP, IMAP, NNTP, FTP, RTP maybe Telnet examples spam
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
Electronic Mail and SMTP
Ftp: File Transfer Protocol  ftp specification: RFC 959 ( file transfer FTP server FTP user interface FTP client local.
2: Application Layer1 Chapter 2: Application Layer Chapter goals: r conceptual + implementation aspects of network application protocols m client server.
Chapter 2: Application layer  2.1 Web, HTTP and HTML (We will continue…)  2.2 FTP  2.3 SMTP 9/22/2009 Lecture 7, MAT 279, Fall
Esimerkki: Sähköposti. Lappeenranta University of Technology / JP, PH, AH Electronic Mail Three major components: user agents mail servers simple mail.
Simple Mail Transfer Protocol
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.
1 Lecture #3 Electronic Mail Protocols HAIT Summer 2005 Shimrit Tzur-David.
Electronic Mail Three major components: SMTP user agents mail servers
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.
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Trying out HTTP (client side) for yourself
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Lecture51 Administrative Things r Grader: Yona Raekow Office hours: Wed. 1pm-3pm or Th. 11am-1pm r Homeworks.
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.
Communications and Networks Lecture 5 Instructor: Rina Zviel-Girshin.
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.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
DNS,SMTP,MIME.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
2: Application Layer1 Chapter 2: Application Layer Chapter goals: r conceptual + implementation aspects of network application protocols m client server.
2: Application Layer1 Reminder r Homework 1 for Wednesday: m Problems #3-5,11,16,18-20 m Half of the problems will be graded r Feel free to send me .
Sending and Receiving Mails
FTP (File Transfer Protocol) & Telnet
Simple Mail Transfer Protocol (SMTP)
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_c Application Protocols: HTTP, FTP, SMTP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part.
File Transfer Protocol (FTP)
Application Layer1 Electronic Mail. Application Layer2 Electronic Mail Three major components: r user agents r mail servers r simple mail transfer protocol:
TFTP: Trivial file transfer protocol
CSE 524: Lecture 6 Application layer protocols. Where we’re at… ● Internet architecture and history ● Internet protocols in practice ● Application layer.
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.
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.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
COMP 431 Internet Services & Protocols
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
@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.
Dr. Adil Yousif University of Alneelian – Master of CS - IT Electronic Mail.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
Dibyajit Computer Security Hacking dibyajit
Networking Applications
Application layer 1 Principles of network applications 2 Web and HTTP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
CS4470 Computer Networking Protocols
SMTP, POP3, IMAP.
Chapter 2: Application layer
Internet and Intranet Protocols and Applications
Chapter 2: Application Layer
The Application Layer: SMTP, FTP
Chapter 7 Network Applications
Chapter 2 Application Layer
Chapter 2: Application Layer
Part II Application Layer.
Presentation transcript:

TODO SMTP, POP, IMAP, NNTP, FTP, RTP maybe Telnet examples spam 2: Application Layer

Electronic Mail Three major components: SMTP user agents mail servers user mailbox outgoing message queue mail server user agent SMTP Three major components: user agents mail servers simple mail transfer protocol: smtp User Agent a.k.a. “mail reader” composing, editing, reading mail messages e.g., Eudora, Outlook, elm, Netscape Messenger outgoing, incoming messages stored on server 2: Application Layer

Electronic Mail: mail servers user agent SMTP Mail Servers mailbox contains incoming messages (yet to be read) for user message queue of outgoing (to be sent) mail messages (if message cannot be delivered will stay in queue) smtp protocol between mail servers to send email messages Mail server is an SMTP client when sending mail Mail server is an SMTP server” when receiving mail 2: Application Layer

Electronic Mail: smtp [RFC 821] Uses tcp to reliably transfer email msg from client to server, port 25 direct transfer: sending server to receiving server three phases of transfer handshaking (greeting) transfer of messages closure command/response interaction commands: ASCII text response: status code and phrase 2: Application Layer

SMTP History SMTP has been around a long time RFC done in 1982 In use well before that Messages must be in 7-bit ASCII (made sense in text-based early days) Requires encoding for binary data (jpegs, etc.) in 7-bit ASCII (yuck!) 2: Application Layer

try smtp interaction for yourself: telnet servername 25 see 220 reply from server enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send email without using email client (reader) Trace it – does your mail data go in the clear? 2: Application Layer

Sample smtp interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection telnet example here 2: Application Layer

What is missing? Some commands processed by SMTP protocol mirror mail headers we are used to seeing in our email messages (To, From, …), but are not the same things Email headers (To, From, CC, Subject, Date, ..) are considered part of the data by SMTP and are not processed SMTP server at all! Email headers are processed by the mail reader software Example of protocol layering 2: Application Layer

Mail message format Message headers Message body SMTP Data smtp: protocol for exchanging email msgs RFC 822: standard for text message format (format of data from smtp perspective) header lines, e.g., To: CC: Subject: different from SMTP commands! body the “message”, ASCII characters only Message headers blank line Message body 2: Application Layer

Sample smtp interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: To: bob@hamburger.edu C: Subject: dinner preferences C: From: alice@crepes.fr C: C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection telnet example here 2: Application Layer

Spam/forged mail “Received:” and “MessageID” headers are part of the data Accurate and helpful from legitimate servers and user agents Start with a legitimate server you trust Don’t relay messages from a site outside your domain to another host outside your domain Verify the Mail From field (resolvable domain and matching IP address) Refuse traffic from known spammers 2: Application Layer

Tracking and Reporting Spam Record IP address of sender and time and date of message transfer Spamcop uses a combination of tools like dig, nslookup and finger to cross-check all the information in an email header and find the email address of the system administrator responsible for the network from which the mail was sent postmaster@domain or abuse@domain MTA server will use identd to identify username of owner of Process sending the mail (does it match the MAIL FROM line) IDENT user identification protocol RFC 1413 2: Application Layer

What about sending pictures and other binary data? Don’t try this by hand  MIME: multimedia mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data ..... ......................... ......base64 encoded data MIME version method used to encode data multimedia data type, subtype, parameter declaration encoded data 2: Application Layer

MIME types: Extensible Content-Type: type/subtype; parameters Text example subtypes: plain, html Image example subtypes: jpeg, gif Audio exampe subtypes: basic (8-bit mu-law encoded), 32kadpcm (32 kbps coding) Video example subtypes: mpeg, quicktime Application other data that must be processed by reader before “viewable” example subtypes: msword, octet-stream 2: Application Layer

Multipart Type From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=98766789 --98766789 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Dear Bob, Please find a picture of a crepe. Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data ..... ......................... ......base64 encoded data --98766789-- 2: Application Layer

Email viruses Often attachments which once opened run with the users full privileges and corrupt the system on which mail is read Viruses tend to target Windows as it is the platform used by the majority of people 2: Application Layer

smtp: final words Comparison with http smtp uses persistent connections smtp requires that message (header & body) be in 7-bit ascii certain character strings are not permitted in message (e.g., CRLF.CRLF). Thus message has to be encoded (usually into either base-64 or quoted printable) smtp server uses CRLF.CRLF to determine end of message Comparison with http http: pull email: push both have ASCII command/response interaction, status codes http: each object is encapsulated in its own response message smtp: multiple objects message sent in a multipart message 2: Application Layer

Other Mail access protocols? SMTP SMTP POP3 or IMAP user agent user agent sender’s mail server receiver’s mail server SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server People used to always log onto server to read mail, now read from their own PC. Why not just SMTP server on local machine? Push not pull means your PC must be constantly on to accept “push” Others? 2: Application Layer

Pull-style Mail access Protocols POP: Post Office Protocol [RFC 1939] authorization (agent <-->server) and download IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: Hotmail , Yahoo! Mail, etc. Somebody asked about using HTTP to transfer random things? Convenient – don’t need mail reader just the ubiquitous web browser 2: Application Layer

POP3 protocol authorization phase C: list transaction phase, client: S: +OK POP3 server ready C: user alice S: +OK C: pass hungry S: +OK user successfully logged on authorization phase client commands: user: declare username pass: password server responses +OK -ERR transaction phase, client: list: list message numbers retr: retrieve message by number dele: delete Quit C: list S: 1 498 S: 2 912 S: . C: retr 1 S: <message 1 contents> C: dele 1 C: retr 2 C: dele 2 C: quit S: +OK POP3 server signing off Try it yourself : telnet pop.enabled.mail-server 110 2: Application Layer

try POP interaction for yourself: telnet servername 110 see “OK POP3 server ready” reply from server enter user, pass, list, retr, dele commands above lets you send get you own email without using email client (reader) Trace it – do your password and mail data go in the clear? 2: Application Layer

IMAP Allows user to set up and maintain multiple folders (for sorting mail) on the remote server Can get headers for and manipulate messages without downloading them Don’t leave them on insecure computers Don’t pay cost to download over slow link Must store per user information across sessions = stateful protocol Folder information, actual messages Seen, Deleted, Answered flags per message 2: Application Layer

IMAP con’t During an IMAP connection, the server transitions between multiple states Initially non-authenticated Authenticated (once username/password provided) Selected – folder selected and operations on messages permitted Finally, Logout state 2: Application Layer

Pop vs IMAP Similarities Differences Mail delivered to a shared, constanly connected server New mail accessible anywhere in network on a variety of platforms For access only, Need SMTP to send mail Differences POP simpler and more established (more clients and servers that support it) IMAP is stateful protocol with more features 2: Application Layer

NNTP Network News Transfer Protocol Jeff Vinocur here 2: Application Layer

ftp: the file transfer protocol user interface client file transfer FTP server user at host local file system remote file system transfer file to/from remote host client/server model client: side that initiates transfer (either to/from remote) server: remote host ftp: RFC 959 ftp server: port 21 2: Application Layer

ftp: separate control, data connections ftp client contacts ftp server at port 21, specifying TCP as transport protocol two parallel TCP connections opened (both full duplex): control: exchange commands, responses between client, server. “out of band control” data: file data to/from server, can be used in either direction, need not always exist ftp server maintains “state”: current directory, earlier authentication FTP client server TCP control connection port 21 TCP data connection port 20 ASCII vs Binary mode for FTP Different platform define end of line characters different ASCII will send the type expected by the receiver Binary will send the type on the sender 2: Application Layer

ftp commands, responses Sample commands: sent as ASCII text over control channel USER username PASS password (sent in clear text!) LIST return list of file in current directory RETR filename retrieves (gets) file STOR filename stores (puts) file onto remote host Sample return codes status code and phrase (as in http) 331 Username OK, password required 125 data connection already open; transfer starting 425 Can’t open data connection 452 Error writing file telnet <server name> ftp 2: Application Layer

FTP Connection Client connects to port 21 on server; this established the control channel Over the control channel, the client specifies the characteristics including IP address and port number for data connection (note: needn’t be on the same machine as the client ) Can ask server to set up a passive connection for the data port as well (good for getting around firewalls) Server tries to connect to data port as specified by client Once established data connection can be used in both directions 2: Application Layer

FTP Model Ftp client Interface FTP server Server User Protocol Interpreter Data Transfer Process Interface FTP server Server Protocol Interpreter FTP Commands/ Replies Server Data Transfer Process Data Connection Client connects to 21 to establish control channel Control channel actually follow the telnet protocol Over control channel specify port Who initiates the connection for the data channel? The FTP commands specify the parameters for the data connection (data port, transfer mode, representation type, and structure) and the nature of file system operation (store, retrieve, append, delete, etc.). The user-DTP or its designate should "listen" on the specified data port, and the server initiate the data connection and data transfer in accordance with the specified parameters . It should be noted that the data port need not be in the same host that initiates the FTP commands via the control connection, but the user or the user-FTP process must ensure a "listen" on the specified data port. It ought to also be noted that the data connection may be used for simultaneous sending and receiving. File System File System 2: Application Layer

Multimedia Applications Audio/video conferencing, streaming audio, etc. On-demand (streaming): one way transfer, then playback; usually broadcast from one source like TV or radio; start-up time and RTT not very important Conferencing: interactive, start-up time and RTT matter alot Examples: vic, (video conferencing), vat (audio conferencing), RealAudio (streaming audio) 2: Application Layer

Requirements of multimedia Several methods for compressing and encoding voice/video; sender and receiver negotiate Ability to specify the timing requirements between packets of related data (smooth playback); frame boundary indication Synchronization of related audio and video streams Ability to display stream (at degraded quality) with lost packets 2: Application Layer

Real-time Transport Protocol (RTP) TCP overhead to high; UDP not good enough Initially, each application had its own protocol, implementing only those parts of TCP it really needed on top of UDP RTP offers generalized real time transport services Thin protocol; Runs on top of UDP Implements functionality commonly needed by multimedia applications - timing reconstruction, loss detection, security and content identification 2: Application Layer

RTCP and RTSP RTCP (Real Time Control Protocol) Real-time conferencing of groups of any size within an internet. Provides source identification, quality-of-service feedback from receivers to the multicast group, synchronization of different media streams RTSP (Real-time Streaming Protocol) Industry consortium announced in 1996 – since then? Proprietary versions: Real Network’s (orginally Progressive Networks) RealMedia, RealAudio and RealPlayer , Quicktime, WindowsMedia??? 2: Application Layer

Realtime Transport (?) Protocol Is this an application level protocol or a transport protocol? Done at application level If TCP implemented at application level (like we will do), does that make it an application level protocol or a transport level protocol? Where is the right place to put these features? 2: Application Layer

RealNetwork’s RealServer Uses 2 channels (like FTP) to client – one control channel(TCP) and one data channel (UDP) Control channel handles authentication (passwords) and actions like fast forward, pause and stop Uses 2 main protocols: RTSP and PNA (Progressive Networks Audio) Modes: streaming, live or simulated live (no fast forward/rewind) 2: Application Layer

More Application Level Protocols? Telnet, Rlogin, SNMP (Simple Network Management Protocol), Instant Messenger (AIM), DHCP (BOOTP) , RPC, NFS, X,Finger, Whois,IDENT………………….. You now know how to investigate any of these on your own RFCs for open protocols, Run apps and trace them, Get client/server source,… It would be a lot more fun to learn more than application level protocols though, right? 2: Application Layer

Roadmap We’ve looked at a bunch of application level protocols (HTTP, DNS, SMTP, POP, IMAP, NNTP, RTP, ..) – Lessons? Many were human readable – why? High level examples of protocol layering (SMTP, HTTP) Some ran on TCP, some on UDP, one on both – why? Used telnet/nslookup to interact with these protocols more directly Traced them (What went in clear text?!) Next.. How would we implement an application level protocol ourselves? Socket API After that down to transport layer 2: Application Layer