抓包分析.docx
目录一、TCP抓包分析2ITCP三次握手过程21.1 TCP三次握手第一步:21.2 TCP三次握手第二步:21.3 TCP三次握手第三步:32各字段含义32.1 传输层42.2 ip层52.3 数据链路层7二、DNS抓包分析81 协议数据包窗口82 协议树窗口93 UDP节点94 DNS请求报文105 DNS应答报文10三、心得体会Ht:OOOO o 0020 003000 8 ” OO(MOb 18 f3 6a 69 18 Sd 08 OO 45 00 00 34 04 Se 40 00 40 06 S3 7c 6f Oa Sl 66 da c90040 04 0215 b cd a 00 50 即Ti中 0020 00 9b Ol 00 00 0 <M 05 M Ol00 00 00 80 02 03 03 02 Ol Ol一、TCP抓包分析1TCP三次握手过程1.1 TCP三次握手第一步:Mb¾fcANPfS9WC27ME4E2OAD0C59OA3F9B2F?,Gte Gift VWw Sfi CMKwt 4*a SaCWcS <tepho% Iocb Mtemali M)HM日 *21f ,、, 出于0 已3区圆F tcp.tfrm g 10日 EXPrtMioC- CiMr Apply SaveNo. Time SourceDestinebonPro<oco lent Info4S IS.111. 10.j.l02?1 S, .101. J1, 1 ,6TCP6652643 . ECSysScq-O in-19? ; cn>D vSS-1460 S-4 SC >.,Pf RV-I 63 19.026561218. 201.21,176111.10.83.102TCP6680 > 52640SYN.ack) q-0 Ack-1 w1n-5840 LerwO RSS-UOO SACK.RM-1ws-S1264 19.026704111.10.83.102210.201.21.176TCPM5264O > 80ACKSq-1 Ack-I win16a L-0 Frane 48: 66 bytes on wire (528 bfts). 66 bytes captured (S28 bits) Ethernet XX. Src: lS:f4:6a:69:18:5<J (18:f4:6a:69:18:5d), OSX: 00:00:5e:OO:O4:0b (00:00:5e:00:04:0b) Internet Protocol version 4. Src: 111.1O83.1O2 Q11.1O.83.102). Dt: 21820121176218.201.21.176)Wequcfc rmbeF¾ (rlatig XqUCfKC ExbCr,悼ad”32 byt/swn3o (Calculated window size: 8192 Chccksua: 0x9b01 (validation disabledj options: (12 K>yes). MaXlmIM segment size, wo-operat1on (nop), window scale, wo-operatlon (nop). N-oprat1on (nop), sack permitted*k:36SVNRev48k2f2*】£:图1TCP三次握手第一步根据网络包列表窗口(如图1所示)可以判断出,第48个包是一次会话的开始,源(本机)IP地址为(后面称为节点A),目的IP地址为(后面称为节点B),协议为TCP。从包头详细信息窗口,可以看到当前选中的网络包的序列号为0,标志位SYN被设置为1,即为节点A向节点B发起建立连接请求的SYN包。1.2 TCP三次握手第二步:.MiaOtOftD0*WF-gW6-7AEE-<a6-5M3F9BC3e2(Wii8(SvNv4M421s11E*eEdeSewQo3reAr叫WasusTdephc<IoobJntemjbOU««MEG3C三J(、6©亦2QQQE囱安必»Atentcp.streameq10Evpresvon.ClearprySaveTime SourceDeftinMion46 16.793290 111>. 1O.63 IOZ 216. Z0】 2】.【7。m¾雨mmIEV*me64 19.026704 111.10.S3.102218.201.21.176Protocol Length InfoTCP66 5280 > 8Sm0 Win*B】9? ie0 XSS146O W$1 SMKJG时lTCP66 8。 52Zo f”、;发【1 SeW .iri55;0 IOT VSSnE SACx-PEW 力TCP54 52640 > ¢0 (<l $«)-1 Ack-1 Fn-16800 Len-OFrame63:66bytesonwire(528bits),66bytescaptured(528bits)EthernetXI.src:00:W:5e:00:(M:0b(00:00:5e:00:04:0t>>.DSt:l«:f4:6a:69:18:5d(ie:f4:6a:69:18:5d)XtrntProtocolVrson4vSrc:218.201.21.176(218.201.21.176).Dst:111.10.83.102(111.10.83.102)Stream¾r>dex:105quereunt>erT(relativesequenceurber)IACknOwledorrrWber:1(relativeackubeTHadrlenth:32bvt3calculatedwindowsize:5840CzCkSU0:0x67bevalidationdisabledootions:(12l>vtes).MaXffIUflSeanentsize.No-Ooeratlon(nop).No-0perat1(nop).sackoeraftted.No-Operatlon(nop),windowscale000018 f4 6a 6918Sd 00 00Se 00 04 Ob 08 00 45 00OOlO00 34 00 004000 3COG8b da <¼ c9 15 b 6f Oa<X>2053 66 00 50c<Ja e4 5158 4d 3<1 df f5 5t> 80 12003016 d 67 b60000 02 0405 78 Ol Ol 04 02 Ol 030040 03 09TCP三次握手第二步接下来,为TCP三次握手的第二步,如图2所示。源(本机)IP地址为,目的IP地址为。然后,从包头详细信息子窗口可以看到序列号为:0;确认号为:1,即0+1,并且注意到SYN和ACK标志位均已设置为1。说明该TCP包是对第一步中TCP包确实认,并同时请求同步,即ACK-SYN包。1.3 TCP三次握手第三步:BMwowDceNPFJ27968C2-7AEE-4e20-AD06-590A3F9W3e2)(W二,hk:36SVNRev48142fromAzchl却)改EdICywgCaptureStxoxs*p<xIooUJtem*推。电门公,0dQE31区)2,加圆Ftcp.Mrmeq10!*E>pretfon.CrAppfyStVeNo.TimeSourceDestinMionProtocollengthIMO4818.793290111.10.8B.102218.201.21.176TCP6652640>SOSYNSoq-OWin-8192Ln-0MSS-1460WSiSACICPCRX-I6319.02656121820121.176111.10.83.102丫566SO>52640ISVNICKSqOAR1dn>5840FXMSS-14005ACK-PERM-1U1S-512【6419O267O4111.10.83.16?218.201.21.】,6K>5452640>60MkSZ二1A(TMnT6600Ien>0Frame64:$4bytesontdre(432bits).54bytescaptured¢432bits),EthernetXX.src:18:f4:6a:69:ie:5d(18:f4:6a:69:18:5d).DSt:00:00:5e:OO:O4:0b<00:00:5e:OO:O4:0b)InternetProtocolversion4.Src:111.10.83.102(111.10.83.102).Dst:218.201.21.176(218.201.21.176)annfssfoncontrol宁他*SfCPort:52640(52640).DStPort:80(80).seq:1.Ack:1,Len:0ISoU3port:泰祖dX5irm"e*:I。,.,IScquencQrxmbcr:1(。1八百。soqucnc。nurtbor)Ackow1,dgme吗aj>er:1(reIaPIVeacknumber)FNdNrIefXnh:?Qbyr。*Flq¾:OxOlO(ACK)Iwnoowsizevalue:4200Calculatedwindowsize:16S00(windowsizescalingfactor:4tChecksun:OXaebvalidationdisabled9sqACKanalysisOOOO0000Se04Ob18f46a6918Sd08004SoO.ji.£.OOlO0028046b40004006837b6fOaS366dac9.(.kft.t.(o.Sf.002015bcda00503ddff55be451584e5010P-.(.qxnp.00301068aeD60000.h.图3TCP三次握手第三步接下来是TCP三次握手的第三步(如图3所示),即第64个包,节点A发送TCP包给节点B,其序列号是1,说明请求的下一个TCP包的序列号为1;确认号为1,说明是对第63个包确实认,而且其ACK位为1,即ACK包。至此,TCP协议的三次握手过程已经完成,节点A和B之间已经建立连接,可以进行数据传输。2各字段含义TCP报文段发送在前* IP首部TCP首部TCP数据部分IP数据郃分2.1传输层图4:TCP报文段的首部格式约 0 MeW 8 8tK« SMt 父Mo TetemOnX IQOb ptt