【正文】
The Design and Development of Network Packet Protocol Analyzing Program Abstract The thesis is an attempt to introduce an implementation of work protocol analyzing program which is based on Libpcap, a famous work packet capture library on Linux. It has a rich feature set which includes capturing work packets and analyzing popular work protocols on Inter. The program is made up of an input/output module, a rules matching module, a packet capturing module and a protocol analyzing module. And the last two modules are key modules. The research work was described as followed. firstly, we introduce the background and concepts about work protocol analyzing programs。 Secondly, after elaborating on the background of packet capture and the Libpcap library, we state a approach to implement a packet capture module with Libpcap。 Finally, we test our program to see whether it works as expected, fortunately, it does. Key words: Libpcap。 Network packet capturing。 Protocol identification 目 錄 論文總頁(yè)數(shù): 23頁(yè) 1 引言 .......................................................................................................................... 1 課題背景 ............................................................................................................ 1 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序簡(jiǎn)介 ............................................................................ 2 國(guó)內(nèi)外研究現(xiàn)狀 ................................................................................................. 2 2 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序的總體設(shè)計(jì) ......................................................................... 3 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序的功能分析 .................................................................. 3 系統(tǒng)的組成結(jié)構(gòu)和工作流程 ................................................................................ 3 系統(tǒng)的結(jié)構(gòu)框圖 .......................................................................................... 3 系統(tǒng)的結(jié)構(gòu)和功能 ....................................................................................... 4 程序的工作流程 .......................................................................................... 5 系統(tǒng)實(shí)現(xiàn)的關(guān)鍵技術(shù)分析 ................................................................................... 6 3 網(wǎng)絡(luò)數(shù)據(jù)包捕獲模塊的實(shí)現(xiàn) ....................................................................................... 7 網(wǎng)絡(luò)數(shù)據(jù)包捕獲簡(jiǎn)介 .......................................................................................... 7 基于 LIBPCAP 的網(wǎng)絡(luò)數(shù)據(jù)包捕獲的實(shí)現(xiàn) ................................................................ 8 Libpcap安裝 .............................................................................................. 8 Libpcap中基本的數(shù)據(jù)結(jié)構(gòu) 和函數(shù) ............................................................... 8 數(shù)據(jù)捕獲模塊的實(shí)現(xiàn) ........................................................................................ 11 4 協(xié)議分析模塊的實(shí)現(xiàn) ............................................................................................... 11 網(wǎng)絡(luò)協(xié)議分析的總體流程 ................................................................................. 12 對(duì) TCP/IP模型中各層協(xié)議的分析 ..................................................................... 14 以太網(wǎng)首部的分析與提取 .......................................................................... 14 IP首部的分析與提取 ................................................................................ 15 TCP/UDP首部的分析與提取 ....................................................................... 16 應(yīng)用層協(xié)議的識(shí)別與分析 .......................................................................... 18 5 程序運(yùn)行與測(cè)試 ...................................................................................................... 20 測(cè)試環(huán)境 .......................................................................................................... 20 硬件環(huán)境 ................................................................................................... 20 程序運(yùn)行環(huán)境 ............................................................................................ 20 測(cè)試步驟 .......................................................................................................... 20 測(cè)試結(jié)果評(píng)價(jià) ................................................................................................... 20 結(jié) 論 .............................................................................................. 錯(cuò)誤 !未定義書(shū)簽。 致 謝 .............................................................................................. 錯(cuò)誤 !未定義書(shū)簽。 第 1 頁(yè) 共 23 頁(yè) 1 引言 課題背景 隨著計(jì)算機(jī)網(wǎng)絡(luò)的不斷發(fā)展,全球信息化 已 成為當(dāng)今社會(huì)發(fā)展的趨勢(shì)。所以網(wǎng)上信息的安全和保密是一個(gè)至關(guān)重要的問(wèn)題。因此,網(wǎng)絡(luò)必須有足夠強(qiáng)的安全措施,否則該網(wǎng)絡(luò)將是個(gè)無(wú)用、甚至?xí)<皣?guó)家安全的網(wǎng)絡(luò)。 計(jì)算機(jī)網(wǎng)絡(luò)所面臨的威脅大體可分為兩種:一是對(duì)網(wǎng)絡(luò)中信息的威脅 ;二是對(duì)網(wǎng)絡(luò)中設(shè)備的威脅。 (2)人為的惡意攻擊:這是計(jì)算機(jī)網(wǎng)絡(luò)所面臨的最大威脅,敵手的攻擊和計(jì)算機(jī)犯罪就屬于這一類(lèi)。這兩種攻擊均可對(duì)計(jì)算機(jī)網(wǎng)絡(luò)造成極大的危害,并導(dǎo)致機(jī)密數(shù)據(jù)的泄漏。另外,軟件的 “ 后門(mén) ” 都是軟件公司的設(shè)計(jì)編程人員為了自便而設(shè)置的,一般不為外人所知,但一旦 “ 后門(mén) ” 洞開(kāi),其造成 的后果將不堪設(shè)想。這也是本論文的一個(gè)重要目的。同時(shí)許多防火墻 也是基于包過(guò)濾技術(shù)的。 第 2 頁(yè) 共 23 頁(yè) 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序簡(jiǎn)介 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序 是一種用于 收集網(wǎng)絡(luò)中有用數(shù)據(jù)的程序,這些數(shù)據(jù)可以是用戶(hù)的帳號(hào)和密碼 ,也可以是一些商用機(jī)密數(shù)據(jù)等。 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序 的正當(dāng)用處主要是分析網(wǎng)絡(luò)的流量,以便找出所關(guān)心的網(wǎng)絡(luò)中潛在的問(wèn)題。在合理的網(wǎng)絡(luò)中, 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序 的存在對(duì)系