This assignment will give you a better hands-on feel for how the HTTP, SMTP and DNS protocols work.
You can do the work for this assignment in the lab or at home.
All submissions are due by 8:00AM on Friday, 25 February.
(this due date was changed from an original Feb 24 one)
To get credit for this assignment you need to do the following
Background: All COMP361 students are expected to have accounts on the CS lab 2 machines. These machines are csl2su1.cs.ust.hk - csl2su41.cs.ust.hk and run the Solaris operating system. Please be aware that, for security reasons, the CS system staff has closed off simple telneting to many of the CS domain machines and you might need Secure Shell (SSH) in order to connect to them from outside. If you need to download SSH please check out either the ITSC download site at http://download.ust.hk/ or the CSsystem FAQ.
HTTP
In this assignment you should be working on one of the lab2 machines, csl2su1.cs.ust.hk - csl2su41.cs.ust.hk. Do the following:
1. Identify yourself by typing "hostname; date; whoami"
2. Telnet to course.cs.ust.hk on port 80 to get the file /comp361/spr2005_L1/labs/Ass1/TestX.htm where X is the last digit of your student ID number, i.e., if your student ID is 02555555 then you should get /comp361/spr2005_L1/labs/Ass1/Test5.htm.
3. Store the output of your session (including your identifying information) in a file HTTP.txt. For an example HTTP.txt file see here. This file should be uploaded to CASS when you are finished. For an example with X=5 see the session below (red is you, blue is the machine)
telnet
course.cs.ust.hk 80
port 80 is used by http
Trying
143.89.41.176...
Connected to course.cs.ust.hk.
Escape character is '^]'.
type ENTER twice
GET
/comp361/spr2005_L1/labs/Ass1/Test5.htm HTTP/1.0
type ENTER twice
DATA
To understand what you are seeing here it would help to surf to the webpage http://course.cs.ust.hk/comp361/spr2005_L1/labs/Ass1/Test5.htm and see what appears.
Now instead of telneting to course.cs.ust.hk try doing
telnet
www.cs.ust.hk 80
type ENTER twice
GET
/course/comp361/spr2005_L1/labs/Ass1/Test5.htm HTTP/1.0
and see what appears. (You do not have to submit this part)
DNS
Go to http://www.dnsstuff.com/
In the "DNS Lookup" field type csl2su1X.cs.ust.hk where X is the last digit of your student number, eg., if the last digit of your student number is 5 you should write csl2su15.cs.ust.hk. Set the 2nd field to ALL(ANY) and then press Lookup.
Now create a text file called DNS.txt.
Here is an example DNS.txt when run on ras.cs.ust.hk
SMTP
In this assignment you will telnet to cs.ust.hk on port 25 and send email to the address comp361_L1_sub@cs.ust.hk using the SMTP protocol. The email message you send should have "your_name"@cs.ust.hk as a return address and should contain a two line message, the first line containing your name and the second line, your Student ID #. More complete instructions are below (red is you, blue is the machine):
telnet smtp.cs.ust.hk 25
port 25 is reserved for the SMTP server
Trying 143.89.41.157...
Connected to smtp.cs.ust.hk (143.89.41.157).
Escape character is '^]'.
220 cssvr7.cs.ust.hk ESMTP Welcome CSD HKUST Mail Service ready at Thu, 17 Feb
2005 16:05:02 +0800
HELO csl2su1.cs.ust.hk
You should replace csl2su1.cs.ust.hk
with whichever lab 2 machine you are using
250 cs.ust.hk Hello csl2su1.cs.ust.hk [143.89.129.148],
pleased to meet you
MAIL FROM: <you@cs.ust.hk>
replace you with your actual name, e.g.,
Mordecai_J_Golin@cs.ust.hk
250 2.1.0 <Mordecai_J_Golin@cs.ust.hk>... Sender ok
RCPT TO:<comp361_L1_sub@cs.ust.hk>
250 2.1.5 <comp361_L1_sub@cs.ust.hk>... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
X
Your Name
X
Your Student ID
.
250 2.0.0 h8H2xMQN003101 Message accepted for delivery
QUIT
221 2.0.0 cs.ust.hk closing connection
Connection closed by foreign host.
After trying the above you may experiment with changing comp361_L1_sub@cs.ust.hk to another, fake, sender address as discussed in class. If you do this only send the spoofed email to (1) yourself or (2) a friend who has given you prior permission. This will give you a better understanding of how the protocol works and what it is checking. As discussed in class, though, you SHOULD NOT misuse this weakness in SMTP to send out fake emails to unsuspecting individuals. The Internet's infrastructure is based upon trust in the users. (Warning: If that trust is abused and we find out about it both CSSystem and the department will come down hard on the abuser)
last revised
23-02-05 23:00 +0800
by MJ Golin