【正文】
帶有3 個參數(shù)的回調(diào)函數(shù), user 為用戶傳遞給回調(diào)函數(shù)的指針,通常設(shè)置為 NULL。 通過 Winpcap 函數(shù)庫,我們得到了網(wǎng)絡(luò)中傳輸?shù)脑季W(wǎng)絡(luò)數(shù)據(jù)包,為了從中 得到有用的數(shù)據(jù)信息,接下來就要對原始數(shù)據(jù)包進行分析,也就是進行網(wǎng)絡(luò)協(xié)議的解析工作。 本系統(tǒng)目前上未實現(xiàn)對應(yīng)用層協(xié)議的分析,所以數(shù)據(jù)包的分析流程圖如圖43 所示: 圖 43 數(shù)據(jù)包分析流程圖 從流程圖可以看到,在捕獲了數(shù)據(jù)包之后,就對網(wǎng)絡(luò)數(shù)據(jù)包進行分析,本系統(tǒng)對鏈路層只分析了以太網(wǎng)協(xié)議。 Data Packet 的結(jié)構(gòu)如下: 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)除了由檢測模塊和響應(yīng)模塊兩個重要部分以外,還有一個必不可少的部分就是系統(tǒng) 的集成部分即中央控制器模塊。具體實現(xiàn)效果如圖 44 所示: 圖 44 檢測模塊效果圖 圖 44 主要顯示了檢測模塊在中央控制器中運行的效果圖。 測試目的 測試目的主要為以下兩點: ( 1) 測試系統(tǒng)是否能夠從共享網(wǎng)段中捕獲到數(shù)據(jù)包。一個好的 Intra 的安全解決方案應(yīng)該既滿足安全需求,又具有足夠的透明性、可用性和 易管理性。不斷增大的網(wǎng)絡(luò)流量對入侵檢測的實時性提出了考驗 。本論文只完成了入侵檢測系統(tǒng)的前期工作,即捕獲網(wǎng)絡(luò)上的數(shù)據(jù)包,通過對這些捕獲的數(shù)據(jù)包進行分析,可以為后面的響應(yīng)模塊提供數(shù)據(jù)輸入。 [2] 宋勁松 .網(wǎng)絡(luò)入侵檢測 [M]. 北京 : 國防工業(yè)出版社 , 。 [6] 謝希仁 .計算機網(wǎng)絡(luò) (第四版 )[M]. 北京 : 電子工業(yè)出版社 ,。文中除了特別加以標注地方外,不包含他人已經(jīng)發(fā)表或撰寫過的研究成果,也不包含為獲得成都信息工程學院或其他教學機構(gòu)的學位或證書而使用過的材料。 ( 3)學??梢詫W術(shù)交流為目的復制、贈送和交換學位論文。 特此聲明! 作者簽名: 年 月 日 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位論文的全部或部分內(nèi)容(保密學位論文在解密后遵守此規(guī)定)。 關(guān)于學位論文使用權(quán)和研究成果知識產(chǎn)權(quán)的說明 本人完全了解成都信息工程學院有關(guān)保管使用 學位論文的規(guī)定,其中包括: ( 1)學校有權(quán)保管并向有關(guān)部門遞交學位論文的原件與復印件。 致 謝 本文是在李文濤老師和韓桂華老師的熱情關(guān)心和指導下完成的,他們淵博的知識和嚴謹?shù)闹螌W作風使我受益匪淺,對順利完成本課題起到了極大的作用。 [4] 唐正軍 .入侵檢測技術(shù)導論 [M]. 北京 : 機械工業(yè)出版社 ,。 由于能力和水平所限,該系統(tǒng)的設(shè)計和實現(xiàn)還有很多工作要做,并需進一步完善。因此,入侵檢測技術(shù)的進一步完善是研究的重點問題。入侵檢測技術(shù)還面臨著許多新的問題,如攻擊者的水平不斷提高,攻擊手段越來越復雜細致 。 測試結(jié)果 以下為檢測模塊測試效果圖: 圖 51 檢測模塊測試圖 1 圖 52 檢測模塊測試圖 2 結(jié)果分析如表 51: 表 51 結(jié)果分析表 測試目的 測試結(jié)果 分析 數(shù)據(jù)包捕獲 正常 能 夠?qū)か@捕獲共享網(wǎng)段上所有數(shù)據(jù)包 數(shù)據(jù)包分析 正常 能夠?qū)⒉东@的數(shù)據(jù)包進行協(xié)議分析,以得到響應(yīng)模塊需要的結(jié)果 結(jié) 論 網(wǎng)絡(luò)安全防范是一個整體的行為,涉及多層次多方面的保護和技術(shù),如防火墻、訪問控制、認證措施、檢測工具、弱點掃描、安全培訓等,防范目標就是使得入侵者突破安全防線更加困難,而防衛(wèi)和檢測入侵更加容易。 5. 系統(tǒng)測試與分析 網(wǎng)絡(luò)數(shù)據(jù)包的捕獲和分析是整個網(wǎng)絡(luò)入侵 檢測系統(tǒng)實現(xiàn)的基礎(chǔ),只有獲得了數(shù)據(jù)源之后,系統(tǒng)的響應(yīng)模塊才能夠檢測出當前是否有攻擊行為或者攻擊企圖。它的主要功能就是為用戶提供了 系統(tǒng)的控制界面,并且能夠詳細的顯示出系統(tǒng)運行的結(jié)果。 struct in_addr ip_dst。 u_int8_t ip_ttl。 endif u_int8_t ip_tos。 } EtherHdr。通過把解碼后的協(xié)議按其協(xié)議 放入 Data Packet 結(jié)構(gòu)對應(yīng)的數(shù)據(jù)成員中,提供給之后的響應(yīng)模塊的使用。 Options tcp_options[40]。 u_int32_t dip。 u_char rf。 u_int8_t frag_flag。 UDPHdr *udph。 EtherHdr *eh。在分析 IP 協(xié)議時,根據(jù)協(xié)議類型的值判斷傳輸層協(xié)議類型:如果 IP 協(xié)議類型字段的值是 6,表示協(xié)議為 TCP 協(xié)議,則分析 TCP 協(xié)議;如果捕獲網(wǎng)絡(luò)上的一個數(shù)據(jù)包 分析以太網(wǎng)協(xié)議 分析 TCP 協(xié)議 分析 IP 協(xié)議 傳入響應(yīng)模塊 分析 RARP 協(xié)議 分析 ARP 協(xié)議 判斷以太網(wǎng)類型字段 判斷 IP 協(xié)議類型字段 分析 UDTCP 協(xié)議 分析 ICMP 協(xié)議 IP 協(xié)議類型字段的值是 17,表示協(xié)議為 UDP 協(xié)議,則分析 UDP 協(xié)議;如果 IP協(xié)議類型字段的值是 1,表示協(xié)議為 ICMP 協(xié)議,則分析 ICMP 協(xié)議。對所有網(wǎng)絡(luò)數(shù)據(jù)包的分