[問題] 初心者問關於TCP/IP與raw socket

看板C_and_CPP (C/C++)作者時間13年前 (2012/12/28 13:22), 編輯推噓3(300)
留言3則, 3人參與, 最新討論串1/1
不好意思 如果不能問Project我會自D 最近有個Project要開始寫了 題目如下: 1.In an environment with two hosts, host X and host Y, write a packet sniffer on host Y to collect TCP/IP packets handled by host X. 2.For IP packets belong to a TCP connection, use the sequence numbers of the IP packets to assemble the IP packets and retrieve the contents delivered through the TCP connection. (P.S.: For each TCP connection, data can be transmitted in both directions. Hence, in your report, for each TCP connection, list incoming data and outgoing data of a TCP connection separatelly.) 3.At host X, use the following services, ftp, telnet, ssh, gmail, hotmail, Yahoo mail, NCU e-mail, twitter, and facebook. Then at host Y, record the data entering and leaving host X in your report. Besides, among the above services, which ones transmit passwords in plain text? 4.Turn on host X for 24 hours but do not use it. The 24 hours can be distirbued on different days. Then use host Y to collect the IP packets and data entering and leaving host X. Analyze the data you collect in the above steps to see which external hosts try to connect to which TCP ports of host X. 5.Besides, describe when no one operate host X which TCP connections are initialized by host X to which ports of which external hosts. Write the above results in your report. 打算環境是使用Linux的Ubuntu或者是Window系統, 可以請問版上的高手要從哪個方向? 或是可以介紹哪本書籍可以參考... 可以指點一下嗎 感謝萬分... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.156.203

12/28 19:12, , 1F
先學Socket programming吧,然後上網查一下封包格式
12/28 19:12, 1F

12/29 01:36, , 2F
Sniff的話我個人只用過libpcap,蠻好用的
12/29 01:36, 2F

12/31 20:16, , 3F
用libpcap前建議可以先試用wireshark熟悉一下
12/31 20:16, 3F
文章代碼(AID): #1GtIoSet (C_and_CPP)
文章代碼(AID): #1GtIoSet (C_and_CPP)