0%

cs144

0x01

cs144: https://cs144.github.io/

虚拟机和课程要求可以在这个博客上下载和查看。

0x02

网卡配置文件位置:/etc/network/interfaces

telnet 测试:手动发送数据包,能看到头部信息,如果直接使用curl的话,就看不到。

1
2
3
4
5
telnet cs144.keithw.org http
GET /lab0/671283 HTTP/1.1
Host: cs144.keithw.org
Connection: close

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
cs144@cs144vm:~/sponge/writeups$ telnet cs144.keithw.org http
Trying 104.196.238.229...
Connected to cs144.keithw.org.
Escape character is '^]'.
GET /lab0/671283 HTTP/1.1
Host: cs144.keithw.org
Connection: close

HTTP/1.1 200 OK
Date: Fri, 29 Oct 2021 15:57:54 GMT
Server: Apache
X-You-Said-Your-SunetID-Was: 671283
X-Your-Code-Is: 514519
Content-length: 110
Vary: Accept-Encoding
Connection: close
Content-Type: text/plain

Hello! You told us that your SUNet ID was "671283". Please see the HTTP headers (above) for your secret code.
Connection closed by foreign host.
cs144@cs144vm:~/sponge/writeups$

用telnet发邮件,qq需要输入账号和授权码的base64编码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
cs144@cs144vm:~/sponge/writeups$ telnet smtp.qq.com smtp
Trying 14.18.175.202...
Connected to smtp.qq.com.
Escape character is '^]'.
220 newxmesmtplogicsvrszc7.qq.com XMail Esmtp QQ Mail Server.
HELO qq.com
250-newxmesmtplogicsvrszc7.qq.com-100.77.8.215-83062919
250-SIZE 73400320
250 OK
AUTH LOGIN
334 VXNlcm5hbWU6
***************
334 UGFzc3dvcmQ6
*********************
235 Authentication successful
MAIL FROM: <173*****.com>
250 OK.
RCPT TO: <lip********cn>
250 OK
DATA
354 End data with <CR><LF>.<CR><LF>.
Hello,
liping, this is my test mail from telnet command! And I'm studying cs144 course.
Best wishes!
Your friend: spwpun.

.
250 OK: queued as.
quit
221 Bye.
Connection closed by foreign host.
cs144@cs144vm:~/sponge/writeups$

0x03 Writing socket program