Homework of ANS

Task 1(warm up)

  • Download the following pcap file:(http://nsl.cs.waseda.ac.jp/~mori/data/warmup.pcap)
  • For the following tasks, you can use tcpdump and GNU command-line tools such as cat, wc, sort, uniq, grep, awk, and etc. If you want, you can also use your favorite script language such as Python, Ruby, Perl, or whatever. You are NOT allowed to use wireshark here.

1.1 count the number of total frames

  • Using the WireShark software:
    result is 100,000
  • Using the wireshark command on CentOS: tshark
yum install -y wireshark
tshark -r warmup.pcap | wc -l

result is 100,000

  • using capinfos
capinfos warmup.pcap | grep "Number of packets"| tr -d " " | cut -d ":" -f 2
  • Using tcpdump
tcpdump -r test.cap 2>/dev/null| wc -l

failed!!!???

1.2 count the number of IPv4 packets

  • Using the WireShark software:
    95860

1.3 count the number of IPv6 packets

  • Using the WireShark software:
    4171

1.4 count the number of IPv4/tcp packets

  • Using the WireShark software:
    73343

1.5 count the number of IPv4/udp packets

  • Using the WireShark software:
    6347

1.6 count the number of distinct source IPv4 addresses:

  • Using the WireShark software
    6299

1.7 count the number of distinct destination IPv4 addresses

  • Using the WireShark software
    15839

1.8 list the top-10 source IP addresses that appeared the most.

  • Using the Wireshark software
203.50.118.210    74.157.109.74    17.157.75.206     163.162.85.250    162.98.176.7
31.242.205.139    23.32.18.78      104.167.125.139   203.50.109.231    203.50.109.226

1.9 list the top-10 destination IP addresses appeared the most

  • Using the Wireshark software
202.139.239.243    202.133.50.192    203.50.118.210    203.50.100.162    13.181.101.53 
163.162.250.91     202.139.239.29    202.133.18.189    163.162.113.121   163.162.15.96

Task 2

2.1 extract the query names from DNS query packets

  • Python pyshark
mycompany.com', 'pop.gmx.com', 'password-ned-xp.pwned.se', 'password-ned-xp', 'safebrowsing.google.com', 'safebrowsing-cache.google.com', 'clients2.google.com', '_ftp._tcp.local', 'clients4.google.com', 'client.dropbox.com', '_ipp._tcp.local', 'navigator-bs.gmx.com', 'accounts.google.com', '_ipps._tcp.local', '16-0.19-a3000081.20081.1644.1e39.2f4a.210.0.lsfzcu3cfr5h1cip6rdsa7h5uj.avts.mcafee.com', 'a-0.19-a3000081.0.1644.1e39.2f4a.210.0.6fnn1j35k3nnmigna2v11i9swj.avts.mcafee.com', 'a-0.19-a3000081.0.1644.1e39.2f4a.210.0.5qzbq178cpcpkz3ash969p4vtb.avts.mcafee.com', 'a-0.19-a3000081.0.1644.1e39.2f4a.210.0.5qwgzz8ezez1mwk72db4mfbk7t.avts.mcafee.com', 'a-0.19-a3000081.0.1644.1e39.2f4a.210.0.q5geq2e7kll2zfk2mrugnuh14q.avts.mcafee.com', 'a-0.19-a30000c1.d040083.1644.1e39.2f4a.210.0.94rhhfkzeebvlhkzt644av1snj.avts.mcafee.com', 'a-0.19-a3000081.0.1644.1e39.2f4a.210.0.n16ddjdlrwenfmj61er2jgkb6b.avts.mcafee.com', 'c.14-0.19-a3000081.8010081.1644.1e39.2f4a.210.0.dae44v4q334j48qqwp95jaad5t.avts.mcafee.com', 'a-0.19-a3000081.0.1644.1e39.2f4a.210.0.9euk3unrrrp7k71c4r3c4mkv2t.avts.mcafee.com', 'a-0.19-a3000081.0.1644.1e39.2f4a.210.0.tdnt4a1hciwwwq61tm1ef4b3kb.avts.mcafee.com', 'c-0.19-a3000071.40481.1644.1e39.2f4a.210.0.du5czgeg5ng1hjphkd7j21qhdi.avts.mcafee.com', '16-0.19-a3000071.10081.1644.1e39.2f4a.210.0.vtb7pr9gljq31vf9tvfllftapq.avts.mcafee.com', 'a-0.19-a3000071.d020082.1644.1e39.2f4a.210.0.25nahcdech5gsrv9ecemf2lbkt.avts.mcafee.com', 'c-0.19-a3000081.70481.1644.1e39.2f4a.210.0.clq6shkdqf4qk2l2h7f23zrbdj.avts.mcafee.com', 'wpad.pwned.se', 'wpad', 'watson.microsoft.com', 'c-0.19-a7000008.8a70083.1644.1e39.2f4a.210.0.sp4llip8fbzphb22g2r6w8iu1j.avts.mcafee.com', 'go.microsoft.com', 'ctldl.windowsupdate.com', 'dmd.metaservices.microsoft.com', 'a-0.19-a3000081.9110081.1644.1e39.2f4a.210.0.5wauzj8kclu1up9r1vmvdufkaj.avts.mcafee.com', 'c-0.19-a3000081.50481.1644.1e39.2f4a.210.0.tzbz944k79p2izgrrwssktv4p6.avts.mcafee.com', 'c-0.19-a3000008.60081.1644.1e39.2f4a.210.0.iu67rk8f86junz2fmh7vk62c2b.avts.mcafee.com', 'compatexchange.trafficmanager.net', 'ocsp.msocsp.com', 'watson2.microsoft.com', 'notify8.dropbox.com', 'clients1.google.com', 'client-lb.dropbox.com', 'tools.google.com', 'redirector.gvt1.com', 'r6---sn-uxap5nvoxg5-5goe.gvt1.com', 'clients3.google.com', 'apis.google.com', 'mail.google.com', 'ssl.gstatic.com', 'www.google.com', 'www.google.se', 'www.googleapis.com', 'www.gstatic.com', 'translate.googleapis.com', 'mtalk.google.com', 'accounts.youtube.com', 'clients2.googleusercontent.com', 'zkygedkpyzdll.pwned.se', 'ltynerolirvuzj.pwned.se', 'ghurdoi.pwned.se', 'zkygedkpyzdll', 'ltynerolirvuzj', 'ghurdoi', 'changelogs.ubuntu.com', '3c-bs.gmx.com', 'isatap.pwned.se', 'Dell-Dator32', 'services.addons.mozilla.org', 'ocsp.digicert.com', 'versioncheck-bg.addons.mozilla.org', 'gfe.nvidia.com', 'addons.mozilla.org', 'blocklist.addons.mozilla.org', 'www.hipchat.com', 'ad.doubleclick.net', 'www.skybluecanvas.com', 'www.php.net', 'www.zend.com', 'php.net', 'ajax.googleapis.com', 'edit.php.net', 'bugs.php.net', 'example.com', 'www.example.com', 'softontherocks.blogspot.com', 'msdn.microsoft.com', '146.49.195.217.in-addr.arpa', 'versioncheck.addons.mozilla.org', 'fhr.data.mozilla.com', 'aus4.mozilla.org', 'lc.mcafee.com', 'update.nai.com', 'mirrorlist.centos.org', 'ftp.acc.umu.se', 'ftp.heanet.ie', 'mirror.23media.de', 'mirror.omnilance.com', 'ftp-stud.hs-esslingen.de', 'ftp.uni-bayreuth.de', 'mirror.serverbeheren.nl', 'ftp.nluug.nl', 'ftp.uni-kl.de', 'mirror.i3d.net', 'mirrors.nic.cz', 'mirror.de.leaseweb.net', 'fedora.uib.no', 'mirror.vutbr.cz', 'ftp.colocall.net', 'mirror.oss.maxcdn.com', 'fedora.tu-chemnitz.de', 'mirror.switch.ch', 'ftp.fi.muni.cz', 'ftp.linux.cz', 'ftp.upjs.sk', 'mirrors.neterra.net', 'mirror.nonstop.co.il', 'www.mirrorservice.org', 'ftp.mirrorservice.org', 'mirror.karneval.cz', 'anorien.csc.warwick.ac.uk', 'ftp.crc.dk', 'mirrors.telianet.dk', 'mirror.nl.leaseweb.net', 'mirror.duomenucentras.lt', 'ftp.wrz.de', 'ftp.icm.edu.pl', 'mirrors.uni-ruse.bg', 'vesta.informatik.rwth-aachen.de', 'mirror.euserv.net', 'mirror.proserve.nl', 'epel.mirrors.ovh.net', 'mirrors.n-ix.net', 'mirror.uv.es', 'mirror.datacenter.by', 'mir01.syntis.net', 'mirror-fr2.bbln.org', 'fedora.ip-connect.vn.ua', 'mirror-fr1.bbln.org', 'mirror.imt-systems.com', 'www.fedora.is', 'ftp.fedora.is', 'mirrors.ircam.fr', 'mirror.dgn.net.tr', 'mirror.bytemark.co.uk', 'ftp.astral.ro', 'ftp.linux.org.tr', 'mirror.vit.com.tr', 'mirror.vorboss.net', 'mirrors.coreix.net', 'epel.check-update.co.uk', 'ftp.pbone.net', 'mirror.slu.cz', 'fr2.rpmfind.net', 'repo.boun.edu.tr', 'ftp.cc.uoc.gr', 'mirror.yandex.ru', 'mirrors.ukfast.co.uk', 'mirror.fraunhofer.de', 'fedora-epel.skarta.net', 'mirror.kinamo.be', 'mirror.bacloud.com', 'mirror.pmf.kg.ac.rs', 'epel.besthosting.ua', 'mirror.digitalnova.at', 'be.mirror.eurid.eu', 'ftp.uma.es', 'mirror.ibcp.fr', 'centos.vianett.no'

2.2 list the top-10 query names that appeared the most in the DNS request packets.

  • Python pyshark
mycompany.com    safebrowsing-cache.google.com    pop.gmx.com    safebrowsing.google.com    www.google.com  
 password-ned-xp   password-ned-xp.pwned.se    mail.google.com    clients4.google.com   navigator-bs.gmx.com

2.3 what was the IP address of the server named "mycompany.com" ?

  • wireshark
192.168.0.2

3. Task 3

  • use the pcap file downloaded at task 2.
  • hint: POP3 users TCP port number 110 (plain text).

3.1 identify the POP3 password registered for user with the e-mail address of ned.pwned.se@gmx.com.

  • wireshark
pop.request.command == "PASS"

3.2 what was the subject of e-mail message the user with email address of ned.pwned.se@gmx.com received from the pop server on 19:32:36 with the command of "RETR 15".

  • wireshark
tcp.port == 110 and pop 

Subject: HipChat power tips for power users

3.3 what was the name of the pop3 server used by ned.pwned.se@gmx.com?

Task 4

  • use the pcap file downloaded at task 2.
    python pyshark

4.1 list all the HTTP user-agent appeared in the HTTP flows (remove duplicates).

Microsoft-Windows/6.1 UPnP/1.0
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.4.0
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
McAfee Agent
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
urlgrabber/3.10 yum/3.4.3
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Win64; x64; Trident/7.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Microsoft-CryptoAPI/6.1
MICROSOFT_DEVICE_METADATA_RETRIEVAL_CLIENT
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2251.0 Safari/537.36
Morfeus Fucking Scanner
netscan.gtisc.gatech.edu
Python-urllib/3.4
WicaAgent

4.2 what was the HTTP user-agent that appeared most?

Microsoft-Windows/6.1 UPnP/1.0

Appeared 290 times

4.3 present the URL accessed from a client with HTTP user-agent of "Python-urllib/3.4".

http.user_agent == "Python-urllib/3.4"

(http://changlogs.ubuntu.com/meta-release)

4.4 what is drawn in the file named fr.jpg?

(http.user_agent) && (http.request.method == "GET")

The catalog of a websit
(http://www.pwned.se/skyblue/fr.jpg)

Task 5

  • use the pcap file downloaded at task 2.
  • hint: TLS uses TCP port 443.

5.1 identify the largest TCP flow that users TLS and present its 5-tuple, i.e., src IP address, dst IP address, protocol, src port, and dst port.

  • wireshark statistics and tcp.port = 443
src IP = 192.168.0.54   port = 51197
dst IP = 216.58.209.101   port = 443
protocol = tcp

5.2 identify the name of the server in the flow detected above.

5.3 list all the hostnames of the servers that used SSL/TLS (hint: use the SNI field).

Task 6

  • use the pcap file downloaded at task 1.
  • perform the periodical packet sampling; i.e., for each block containing 100 packets, sample the first packet.
  • perform the random packet sampling, i.e., sample each packet with the probability of 0.01.

6.1 count the number of total TCP packets for original data, periodically sampled data, and randomly sampled data

Origin data: 77317 TCP packets
Periodically sampled data: 803 TCP packets(total 970 packets)
Randomly sampled data: 742 TCP packets(total 982 packets)

6.2 count the number of distinct source IP addresses for original data, periodically sampled data, and randomly sampled data

Origin data: 15839 distinct source IP addresses
Periodically sampled data: 200distinct source IP addresses(total 970 packets)
Randomly sampled data: 141distinct source IP addresses(total 982 packets)

6.3 discuss the difference between (1) and (2).

The random sample method has more similar features with origin data.
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末喉誊,一起剝皮案震驚了整個(gè)濱河市芒划,隨后出現(xiàn)的幾起案子烂完,更是在濱河造成了極大的恐慌襟沮,老刑警劉巖碉纳,帶你破解...
    沈念sama閱讀 217,734評(píng)論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)叽奥,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,931評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來痛侍,“玉大人朝氓,你說我怎么就攤上這事。” “怎么了膀篮?”我有些...
    開封第一講書人閱讀 164,133評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵嘹狞,是天一觀的道長(zhǎng)。 經(jīng)常有香客問我誓竿,道長(zhǎng),這世上最難降的妖魔是什么谈截? 我笑而不...
    開封第一講書人閱讀 58,532評(píng)論 1 293
  • 正文 為了忘掉前任筷屡,我火速辦了婚禮,結(jié)果婚禮上簸喂,老公的妹妹穿的比我還像新娘毙死。我一直安慰自己,他們只是感情好喻鳄,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,585評(píng)論 6 392
  • 文/花漫 我一把揭開白布扼倘。 她就那樣靜靜地躺著,像睡著了一般除呵。 火紅的嫁衣襯著肌膚如雪再菊。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,462評(píng)論 1 302
  • 那天颜曾,我揣著相機(jī)與錄音纠拔,去河邊找鬼。 笑死泛豪,一個(gè)胖子當(dāng)著我的面吹牛稠诲,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播诡曙,決...
    沈念sama閱讀 40,262評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼臀叙,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了价卤?” 一聲冷哼從身側(cè)響起劝萤,我...
    開封第一講書人閱讀 39,153評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎荠雕,沒想到半個(gè)月后稳其,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,587評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡炸卑,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,792評(píng)論 3 336
  • 正文 我和宋清朗相戀三年既鞠,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片盖文。...
    茶點(diǎn)故事閱讀 39,919評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡嘱蛋,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情洒敏,我是刑警寧澤龄恋,帶...
    沈念sama閱讀 35,635評(píng)論 5 345
  • 正文 年R本政府宣布,位于F島的核電站凶伙,受9級(jí)特大地震影響郭毕,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜函荣,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,237評(píng)論 3 329
  • 文/蒙蒙 一显押、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧傻挂,春花似錦乘碑、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,855評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至绪抛,卻和暖如春资铡,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背睦疫。 一陣腳步聲響...
    開封第一講書人閱讀 32,983評(píng)論 1 269
  • 我被黑心中介騙來泰國(guó)打工害驹, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人蛤育。 一個(gè)月前我還...
    沈念sama閱讀 48,048評(píng)論 3 370
  • 正文 我出身青樓宛官,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親瓦糕。 傳聞我的和親對(duì)象是個(gè)殘疾皇子底洗,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,864評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,497評(píng)論 0 23
  • 應(yīng)眾讀者要求圣勒,周末連發(fā)三章费变。第五章歌聲傳情,第六章夜總會(huì)風(fēng)云第七章維權(quán)事件圣贸。情節(jié)出人意料挚歧,驚險(xiǎn)刺激,不容錯(cuò)過吁峻。 第...
    鐵馬老言閱讀 915評(píng)論 2 1
  • 本文原創(chuàng)滑负。僅限站內(nèi)轉(zhuǎn)載在张,站外轉(zhuǎn)載請(qǐng)私信聯(lián)系作者。 “The past is a bucket of ashes” ...
    塵世小書蟲閱讀 2,268評(píng)論 0 0
  • 你的震撼 讓我喜歡 你的蒼涼 讓我喜歡 你的沉重 讓我喜歡 你的吶喊 讓我喜歡 你的呼嘯 讓我喜歡 你是一部無字的...
    賈玉紅閱讀 565評(píng)論 0 0
  • 一個(gè)大學(xué)校園里開始的故事,漂亮學(xué)姐林亦男與理工天才生王鵬鵬的愛情故事很夢(mèng)幻痴鳄,異地之后也美好的讓人羨慕瘟斜,從北京到南京...
    青瓦長(zhǎng)憶舊時(shí)雨閱讀 418評(píng)論 0 1