Chapter 26 Remote Logging, Electronic Mail, and File

Chapter 26 Remote Logging, Electronic Mail, and File

Chapter 26 Remote Logging, Electronic Mail, and File Transfer 26.1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 26-1 REMOTE LOGGING

It would be impossible to write a specific client/server program for each demand. The better solution is a general-purpose client/server program that lets a user access any application program on a remote computer. Topics discussed in this section: TELNET SSH

26.2 Note TELNET is a general-purpose client/server application program. Remote virtual terminal One server supports multiple VTs. 26.3

Example of Telnet (Character mode) 26.4 Image from Dr. Wangs course at: http://www.cse.scu.edu/~mwang2/tcpip/ Some Common Features of Telnet

Telnet is on a single TCP connection to port 23 Telnet connection is unencrypted So easy for eavesdropper! In most cases, telnet is a remote terminal. Each character is transmitted in a separated packet The same is true for SSH login stage A feature that could be exploited for timing attack.

26.5 Telnet Commands telnet longwood.eecs.ucf.edu setup a remote shell to the server telnet longwood.eecs.ucf.edu 25 Setup a TCP connection to port 25 (email service) We will show this usage in Email lecture

26.6 SSH Secure Shell Replacement of old unsecure Telnet program Both ends authenticate with each other Rely on public key cryptography Will introduce PK in last chapter All communication messages are encrypted

SSH is used also as a secure tunneling channel for other applications File transfer Port forwarding (such as X window) 26.7 Virtual private network (VPN) SSH Secure Shell Under Unix machine: Hidden directory .ssh saves all configuration

files known_hosts saves public keys of all previous connected SSH servers Attacker cannot impersonates as a known SSH server anymore Have to trust what you get in the first connection attempt 26.8

SSH Programs and Usages Many open source ssh client software http://en.wikipedia.org/wiki/Comparison_of_SSH_clients PuTTY SSH uses TCP connection on port 22 Login methods:

Password private key kept on client, public key stored on server (come to this in later security chapter) 26.9 26-2 ELECTRONIC MAIL One of the most popular Internet services is electronic mail (e-mail). The designers of the Internet probably never imagined the popularity of this application

program. Its architecture consists of several components that we discuss in this chapter. Topics discussed in this section: Architecture User Agent Message Transfer Agent: SMTP Message Access Agent: POP and IMAP Web-Based Mail 26.10

Figure 26.6 First scenario in electronic mail MUA: mail user agent 26.11 Note When the sender and the receiver of an

e-mail are on the same system, we need only two user agents. MUA:Outlook Express, Netscape Messenger, Mozilla Thunderbird, Eudora, Foxmail,. 26.12 Note

When the sender and the receiver of an e-mail are on different systems, Wikipidia shows a good example of email operation (next page) 26.13 Typical Email Operation (from Wikipidia)

Could also be IMAP4 26.14 Email servers DNS name and IP

DNS query for MX RR Clients Email Operation Mode Remote terminal using SSH to email server directly Then uses MUA on email server Such as Pine, Elm on Unix machines Use MUA on a clients own computer

The MUA formats and sends email to senders email server Web-based email systems using web browser Gmail, yahoo mail, hotmail,. Spammer: program a simple code sending email to email servers

via SMTP protocol 26.15 Figure 26.11 Services of user agent 26.16

Note Some examples of command-driven user agents are mail, pine, and elm (under Unix). 26.17 Note

Some examples of GUI-based user agents are Eudora, Outlook, and Netscape. 26.18 Figure 26.12 Format of an e-mail

26.19 Figure 26.13 E-mail address Sender uses DNS query for MX record on the domain name in order to find the name and IP of the target email server 26.20

Figure 26.14 MIME (Multipurpose Internet Mail Extensions) NVT: network virtual terminal (telnet) SMTP protocol only this data 26.21 MIME

User agents makes the translation between non-ASCII data and ASCII email message If you check the source file of an email that has attachment, you will find the MIME usage This is the main reason why your email with an attachment becomes bigger? 26.22

Figure 26.15 MIME header 26.23 Table 26.5 Data types and subtypes in MIME 26.24

Table 26.6 Content-transfer-encoding 26.25 Figure 26.16 SMTP (Simple Mail Transfer Protocol) range POP3 or IMAP4 26.26

Figure 26.17 Commands and responses 26.27 Figure 26.18 Command format 26.28 Table 26.7 Commands

26.29 Table 26.8 Responses 26.30 Table 26.8 Responses (continued)

26.31 Example 26.3 Let us see how we can directly use SMTP to send an e-mail and simulate the commands and responses we described in this section. We use TELNET to log into port 25 (the service port for SMTP). We then use the commands directly to send an e-mail. Through this process, you can see why you cannot trust

the sender or any part of a received email, why email spam is so easy to be generated. 26.32 Sample email sending using telnet telnet longwood.cs.ucf.edu 25 C: S:

C: S: C: S: C: S: C: C: C:

C: C: C: S: C: S: HELO fake.domain 250 Hello crepes.fr, pleased to meet you

MAIL FROM: 250 [email protected] Sender ok RCPT TO: 250 [email protected] ... Recipient ok DATA 354 Enter mail, end with "." on a line by itself from: fake man to: dr. who subject: who am I?

Do you like ketchup? How about pickles? . 250 Message accepted for delivery QUIT 221 longwood.cs.ucf.edu closing connection Try SMTP interaction for yourself:

telnet servername 25 see 220 reply from server enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands

mail from the domain may need to be existed rcpt to the user needs to be existed A mail server may or may not support relay CS email server supports relay from inside campus Enable you send email without using email user agent

NOTES: Ethnical Issue on Manual Sending Email Do not try to use telnet on department email server except for the homework! Do not try to use it to spam your friends without upfront notice! 26.35

Figure 26.19 POP3 (Post Office Protocol) and IMAP4 (Internet Mail Access Protocol) 26.36 Figure 26.20 The exchange of commands and responses in POP3 26.37

POP3 and IMAP4 IMAP4 provides more functionalities Both POP3 and IMAP4 have corresponding encrypted protocols 26.38

Web-based Email Email clients use web browser for all interactions A user can access his/her email at any where, via any computer that has Internet access Email provider may provide more functions Gmail has very good search capability Gmail has the message grouping function

Many provide bundled services with their other products Voice/video, photo sharing, . 26.39 26-3 FILE TRANSFER Transferring files from one computer to another is one of the most common tasks expected from a networking or internetworking environment. As a matter of fact,

the greatest volume of data exchange in the Internet today is due to file transfer. Topics discussed in this section: File Transfer Protocol (FTP) Anonymous FTP 26.40 Note

FTP uses the services of TCP. It needs two TCP connections. The well-known port 21 is used for the control connection and the well-known port 20 for the data connection. 26.41

Figure 26.21 FTP 26.42 Figure 26.22 Using the control connection 26.43 Figure 26.23 Using the data connection

26.44 Example 26.4 (continued) 26.45 Example 26.5 We show an example of anonymous FTP. We assume

that some public data are available at internic.net. continued on next slide 26.46 Example 26.5 (continued) 26.47

Dying of FTP People seldom use FTP nowadays Replaced with two ways: Web-based file upload/download Browser shows a directory content if the directory does not have a default html file SSH-based file transfer

26.48

Recently Viewed Presentations

  • Using LinkedIn for Your Job Search - Deloitte

    Using LinkedIn for Your Job Search - Deloitte

    Using LinkedIn for Your Job Search . Transition Assistance webinar. ... Build Your Profile. Build/Expand Your Network. Job Searching. LinkedIn is an interconnected network of experienced professionals from around the world, representing 250 million members in over 200 countries.
  • A Strategic Approach to Web Evaluation - CENDI

    A Strategic Approach to Web Evaluation - CENDI

    We need innovative web systems evaluation to help chart our course, gauge our direction, and measure our progress. 4/17/01 FredWoodApr17.ppt A Strategic Approach to Web Evaluation Fred B. Wood Special Expert, National Library of Medicine Office of Health Information Programs...
  • Module: Daily Goals During Interdisciplinary Rounds

    Module: Daily Goals During Interdisciplinary Rounds

    8. Narasimhan M, Eisen LA, Mahoney CD, et al. Improving nurse-physician communication and satisfaction in the intensive care unit with a daily goals worksheet. Am J Crit Care. 2006 Mar;15(2):217-22. PMID: 16501141. 9. Schwartz JM, Nelson KL, Saliski M, et...
  • Diabetic Ketoacidosis (DKA) - KSU

    Diabetic Ketoacidosis (DKA) - KSU

    Diabetic Ketoacidosis (DKA): ... Ketolysis) Ketone Bodies. If glucose is not available for the brain, the brain can utilize plasma ketone bodies, that can penetrate the blood brain barrier, and serve as fuel molecules. Normally, glucose is the primary fuel...
  • INSPECTION & MAINTENANCE - American Fire Sprinkler ...

    INSPECTION & MAINTENANCE - American Fire Sprinkler ...

    For standpipe system risers or combination standpipes in a single building, one record tag can be located for all such systems at the main water control valve at the base of the standpipe that is supplying water to all such...
  • Candidacy Exam Presentation

    Candidacy Exam Presentation

    Benchmarks . The popular benchmarks are Flickr 8k and Flickr 30k dateset. Flickr 8k: a benchmark collection for sentence-based image description and search, consisting of 8,000 images that are each paired with five different captions which provide clear descriptions of...
  • Elements of a Paper - Mrs. Macomber's Class

    Elements of a Paper - Mrs. Macomber's Class

    The Odyssey Author's name Thesis Statement of order (usually attached to the thesis) Introductory Paragraph First sentence = The Attention Getter. A sentence that serves two purposes: Grab the attention of your audience Give your audience a clue about what...
  • FINGERPRINT ANALYSIS - CSI: Coronado

    FINGERPRINT ANALYSIS - CSI: Coronado

    1823: description of fingerprint types is published by Czech physiologist, Jan Evangelist Purkyn 1858: England is the first country to use fingerprints as a system of criminal identification. 1903: Leavenworth Federal Penitentiary received a prisoner by the name of Will...