【正文】
帶有3 個參數的回調函數, user 為用戶傳遞給回調函數的指針,通常設置為 NULL。 通過 Winpcap 函數庫,我們得到了網絡中傳輸的原始網絡數據包,為了從中 得到有用的數據信息,接下來就要對原始數據包進行分析,也就是進行網絡協議的解析工作。 本系統(tǒng)目前上未實現對應用層協議的分析,所以數據包的分析流程圖如圖43 所示: 圖 43 數據包分析流程圖 從流程圖可以看到,在捕獲了數據包之后,就對網絡數據包進行分析,本系統(tǒng)對鏈路層只分析了以太網協議。 Data Packet 的結構如下: typedef struct Data_Packet { struct pcap_pkthdr *pkth。 IPHdr *iph。 u_char *data。 u_char mf。 u_int16_t dp。 Options ip_options[40]。 }Packet。 u_int8_t ether_shost [6]。 u_int8_t ip_hlen:4。 u_int16_t ip_id。 u_int16_t ip_checksum。 系統(tǒng)集成 本系統(tǒng)除了由檢測模塊和響應模塊兩個重要部分以外,還有一個必不可少的部分就是系統(tǒng) 的集成部分即中央控制器模塊。具體實現效果如圖 44 所示: 圖 44 檢測模塊效果圖 圖 44 主要顯示了檢測模塊在中央控制器中運行的效果圖。 測試目的 測試目的主要為以下兩點: ( 1) 測試系統(tǒng)是否能夠從共享網段中捕獲到數據包。一個好的 Intra 的安全解決方案應該既滿足安全需求,又具有足夠的透明性、可用性和 易管理性。不斷增大的網絡流量對入侵檢測的實時性提出了考驗 。本論文只完成了入侵檢測系統(tǒng)的前期工作,即捕獲網絡上的數據包,通過對這些捕獲的數據包進行分析,可以為后面的響應模塊提供數據輸入。 [2] 宋勁松 .網絡入侵檢測 [M]. 北京 : 國防工業(yè)出版社 , 。 [6] 謝希仁 .計算機網絡 (第四版 )[M]. 北京 : 電子工業(yè)出版社 ,。文中除了特別加以標注地方外,不包含他人已經發(fā)表或撰寫過的研究成果,也不包含為獲得成都信息工程學院或其他教學機構的學位或證書而使用過的材料。 ( 3)學??梢詫W術交流為目的復制、贈送和交換學位論文。 特此聲明! 作者簽名: 年 月 日 54 Of Vainglory It was prettily devised of Aesop。s diversion, namely, the wild hunt to Amack. Ah, you don39。s night through the air to Amack. They sit backwards on their painting b all lapse of time, and had bee a cipher and a nothing. Then three alone, or moveth upon greater means, if they have never so little hand in it, they think it is they that carry it They that are glorious, must needs be factious。 there are sometimes great effects of cross lies。s memory。s self hath any perfection. For saith Pliny very wittily。 the admiration of fools。s without the consent of theowner。 the fourth kind of violence iswhen any one, regardless of the author ity of the rulers, takes orcarries away or makes use of anything which belongs to them, nothaving their consent。 and others that they are turned from their course bygifts. Now we have a right to claim, as you yourself allowed, in thematter of laws, that before you are hard upon us and threaten us,you should argue with us and convince usyou should f irst attempt toteach and persuade us that there are Gods by reasonable evidences, andalso that they。 but he who did must have supposed one of threethingseither that they did not exist,which is the first possibility,or secondly, that, if they did, they took no care of man, orthirdly, that the y were easily appeased and turned aside from theirpurpose, by sacrifices and prayers. Cleinias. What shall we say or do to these persons? Athenian Stranger. My good friend, let us first hear the jests whichI suspect that they in their superiority will utte r against us. Cle. What jests? Ath. They will make some irreverent speech of this sort:O inhabitants of A thens, and Sparta, and Cnosus, they will reply, inthat you spea k truly。 and espe cially greatwhen in violation of public and holy rites, or of the partly monrites in which tribes and phratries share。 and the slaves of their own vaunts. LastIndexNext And now having spoken of assaults, let us sum up all acts ofviolence under a single law, which shall be as follows:No one shallta ke or carry away any of his neighbour39。 for he that you mend, is either superior to you, in that you mend, or inferior. If he be inferior, if he be to be mended, you much more。 omnium, quae cHxerat jeceratque, arte quadam ostentator: for that proceeds not of vanity, but of natural magnanimity, and discretion: and in some persons is not only ely, but gracious. For excusations, cessions, modesty itself well governed, are but arts of ostentation. And amongst those arts there is none be tter, than that which Plinius Secundus speaketh of。 for as iron sharpens iron, so by glory one courage sharpeh another. In cases of great enterprise, upon charge and adventure, a position of glorious natures doth put life into business。 but according to die French proverb。s eve, to the Brocken。s really a pleasure now and then to bee a mere nothing, especially when a man is as highly placed as I am. And then to think that we all, even with patent lacquer, are nothing more than insects of a moment on that anthill the earth, though we may be insects with stars and garters, places and offices! One feels quite a novice beside these venerable millionyearold boulders. On last New Year39。 ( 5)學??梢怨紝W位論文的全部或部分內容(保密學位論文在解密后遵守此規(guī)定)。 關于學位論文使用權和研究成果知識產權的說明 本人完全了解成都信息工程學院有關保管使用 學位論文的規(guī)定,其中包括: ( 1)學校有權保管并向有關部門遞交學位論文的原件與復印件。 致 謝 本文是在李文濤老師和韓桂華老師的熱情關心和指導下完成的,他們淵博的知識和嚴謹的治學作風使我受益匪淺,對順利完成本課題起到了極大的作用。 [4] 唐正軍 .入侵檢測技術導論 [M]. 北京 : 機械工業(yè)出版社 ,。 由于能力和水平所限,該系統(tǒng)的設計和實現還有很多工作要做,并需進一步完善。因此,入侵檢測技術的進一步完善是研究的重點問題。入侵檢測技術還面臨著許多新的問題,如攻擊者的水平不斷提高,攻擊手段越來越復雜細致 。 測試結果 以下為檢測模塊測試效果圖: 圖 51 檢測模塊測試圖 1 圖 52 檢測模塊測試圖 2 結果分析如表 51: 表 51 結果分析表 測試目的 測試結果 分析 數據包捕獲 正常 能 夠尋獲捕獲共享網段上所有數據包 數據包分析 正常 能夠將捕獲的數據包進行協議分析,以得到響應模塊需要的結果 結 論 網絡安全防范是一個整體的行為,涉及多層次多方面的保護和技術,如防火墻、訪問控制、認證措施、檢測工具、弱點掃描、安全培訓等,防范目標就是使得入侵者突破安全防線更加困難,而防衛(wèi)和檢測入侵更加容易。 5. 系統(tǒng)測試與分析 網絡數據包的捕獲和分析是整個網絡入侵 檢測系統(tǒng)實現的基礎,只有獲得了數據源之后,系統(tǒng)的響應模塊才能夠檢測出當前是否有攻擊行為或者攻擊企圖。它的主要功能就是為用戶提供了 系統(tǒng)的控制界面,并且能夠詳細的顯示出系統(tǒng)運行的結果。 struct in_addr ip_dst。 u_int8_t ip_ttl。 endif u_int8_t ip_tos。 } EtherHdr。通過把解碼后的協議按其協議 放入 Data Packet 結構對應的數據成員中,提供給之后的響應模塊的使用。 Options tcp_options[40]。 u_int32_t dip。 u_char rf。 u_int8_t frag_flag。 UDPHdr *udph。 EtherHdr *eh。在分析 IP 協議時,根據協議類型的值判斷傳輸層協議類型:如果 IP 協議類型字段的值是 6,表示協議為 TCP 協議,則分析 TCP 協議;如果捕獲網絡上的一個數據包 分析以太網協議 分析 TCP 協議 分析 IP 協議 傳入響應模塊 分析 RARP 協議 分析 ARP 協議 判斷以太網類型字段 判斷 IP 協議類型字段 分析 UDTCP 協議 分析 ICMP 協議 IP 協議類型字段的值是 17,表示協議為 UDP 協議,則分析 UDP 協議;如果 IP協議類型字段的值是 1,表示協議為 ICMP 協議,則分析 ICMP 協議。對所有網絡數據包的分