【正文】
} /*if the any port flag is up,we’re all done (success)*/ If(any_port_flag) Return 1。} If(flagsamp。} If(flagsamp。} If(flagsamp。 Int except_addr_flag=0。} Int CheckSrcPortNotEq(Packet*p,struct_RuleTreeNode*rtn_idx,RuleFpList*fp_list) {if((psprtn_idxhsp)II(psprtn_idxlsp)) 10 {return 0。} Int ChckDstIPNotEq(Packet**rtn_idx,RuleFpList*fp_。rtn_idxsmask)) { /*the packet matches this to the next text*/ retutn fp listnextRuleHeadFunc(next)。 if(test_result) {test_result=CheckAddrPort(rtn_idxsip, rtn_idxsmask, rtn_idxhsp,rtn_idxlsp,p, rtn_idxflags,(CHECK_DSTIINVERSE))。 Return 1。} int EvalOpts(OptTreeNode**p) {if(List==NULL) return 0。 (*LogFunc)(messager。 return 0。} else 6 {return 0。}}} return 0。Log,RULE_LOG,p)) return 1。 idx=PreprocessList。 概括地講,校園網(wǎng)是為學校師生提供教學、科研和綜合信息服務的 寬帶 多媒體網(wǎng)絡。 校園網(wǎng)的設計目標是將各種不同應用的信息資源通過高性能的網(wǎng)絡設備相互連接起來,形成校園區(qū)內部的 12020/ XPra 系統(tǒng),對外通過路由設備接入廣域網(wǎng)。因此對于 Web 等協(xié)議, AIP 應用比較廣泛。當黑客通過這些端口發(fā)起攻擊時防火墻就無法識別和控制。隨著處理器性能的提高,每一層次的交換機都有可能集成入侵防護功能。由于 HIPS工作在保護的主機 /服務器上,它不但能利用特征和行為規(guī)則進行檢測,阻止像緩沖區(qū)溢出之類的書籍攻擊,還能防范未知攻擊,防止針對 Web 頁面、應用和資源的任何非法訪問。 從技術上講, IDS 系統(tǒng)在識別大規(guī)模的組合 式、分布式的入侵攻擊方面,還沒有較好的方法和成熟的解決方案,誤報與漏報現(xiàn)象嚴重,用戶往往淹沒在海量的報警信息中,而漏掉真正的報警;此外, IDS只能報警而不能有效采取阻斷措施的設計理念,也不能滿足用戶對網(wǎng)絡安全日益增長的需求。它的快速發(fā)展和極其潛力的應用前景需要有更多的研究和工程技術人員投身其中,在基礎技術原理的研究和工程項目開發(fā)等多個層面上同時開展工作,才有可能開發(fā)出依靠的產(chǎn)品系統(tǒng)。 非技術因素包括如下 3 個方面。為了保證發(fā)揮效能,網(wǎng)絡入侵檢測系統(tǒng)必須能夠分析所有的 16 內向數(shù)據(jù)包。 確保所有合法流量的正常化 。 比如,有些防火墻供應商,曾經(jīng)聲稱能夠阻止緩存溢出:當黑客在瀏覽器的 URL 中輸入太長數(shù)據(jù),試圖使后臺服務崩潰或使試圖非法訪問的時候,網(wǎng)絡防火墻能夠檢測并制止這種情況。 由于體系結構的原因,即使是最先進的網(wǎng)絡防火墻,在防范 Web應用程序時,由 于無法全面控制網(wǎng)絡、應用程序和數(shù)據(jù)流,也無法截獲應用層的攻擊。這種加密后的攻擊代碼,只要與防火墻規(guī)則庫中的規(guī)則不一樣,就能夠躲過網(wǎng)絡防火墻,成功避開特征匹配。 無法檢測加密的 Web 流量 14 如果你正在部署一個關鍵的門戶網(wǎng)站,希望所有的網(wǎng)絡層和應用層的漏洞都被屏蔽在應用程序之外。 統(tǒng)計方法是當前產(chǎn)品化的入侵檢測系統(tǒng)中常用的方法,它是一種成熟的入侵檢測方法,它使入侵檢測系統(tǒng)能夠學習主體的日常行為,將那些與正?;顒又g存在較大統(tǒng)計偏差的活動標識成為異?;顒?。為實現(xiàn)該類檢測, IDS 建立正?;顒拥摹耙?guī)范集( Normal profile)”,當主體的活動違反其統(tǒng)計規(guī)律時,認為可能是“入侵”行為。當這些事件發(fā)生后,再開始記錄詳細的審計,從而減少審計事件處理負荷。常用的檢測技術為: 專家系統(tǒng):采用一系列的檢測規(guī)則分析入侵的特征行為。 基于主機和基于網(wǎng)絡的入侵檢測系統(tǒng)的集成 許多機構的網(wǎng)絡 安全 解決方案都同時采用了基于主機和基于網(wǎng)絡的兩種入侵檢測系統(tǒng)。反應的快慢取決于輪訊間隔時間的長短。據(jù) FBI的研究, 80%的入侵和攻擊行為來自于組織機構內部。目前在幾種非規(guī)則檢測系統(tǒng)中使用了一種更加復雜的模型,檢測系統(tǒng)同時計算并比較每個用戶的長期和 短期活動狀態(tài),而狀態(tài)信息隨著用戶行為的變化而不斷更新。 較高的虛報警率是此種方法的主要缺陷,因為信息系統(tǒng)所有的正常活動并不一定在學習建模階段就被全部了解。由于處理速度的原因,專家系統(tǒng)技術目前只是在各種研究原型中得到應用,而商業(yè)化的軟件產(chǎn)品采用了其他效率更高的技術,其中目前應用最廣泛的就是特征分析技術。然而,濫用入侵檢測技術的一個明顯缺陷在于,手機所有已知或是已發(fā)現(xiàn)攻擊行為和系統(tǒng)脆弱性信息的困難性以及幾時更新龐大數(shù)據(jù)庫需要消耗大量精力和時間,這是一項艱苦工作。 ( 3) 規(guī)則檢查防火墻 規(guī)則檢查防火墻集中了上述二類防火墻的特點,同時又有自己先進的算法,因此安全功能更好,目前市場上流行的防火墻大多屬于該類產(chǎn)品。這樣既可以保證正常的上網(wǎng)活動,又可以防止危機數(shù)據(jù)對自己的侵襲,保證上網(wǎng)安全。 論文組織與安排 本文共分為五章。就目前的發(fā)展現(xiàn)狀來看, IDS還不能做到完全的自動化,對于檢測結果的最終確認必須有人的參與,而數(shù)量龐大的報警和日志超出人的處理能力,必須找到辦法來解決這一問題。 入侵檢測,就是對入侵行為的發(fā)現(xiàn)。在這個模型中,構筑一個安全系統(tǒng)防御模塊只是其中一小部分。當主控端發(fā)出攻擊命令,每個響應攻擊命令的代理端會向目標主機發(fā)送拒絕服務攻擊的數(shù)據(jù)包,達到攻擊的目的。攻擊者利用在被攻擊者的計算機中安裝通過端口進行通信的客戶機 /服務器程序,使被控制端啟動一個默認端口,成為服務器,而攻擊者作為客戶機一方,利用此端口可以發(fā)出連接請求,進而啟動被控制端的相應程序,將該計算機完全控制;或者在被攻擊的計算機內安裝具有觸發(fā)機制的程序,當對該機操作觸發(fā)該程序,可將計算機內的重要信息定時或不定時傳到異地的機器上去。 ( 4)其它非技術因素。 ( 2) 網(wǎng)絡的飛速發(fā)展。 針對局域網(wǎng)實際應用需求,使用該分布式入侵檢測系統(tǒng)對其進行保護,取得了不錯的實驗效果。它將入侵檢測系統(tǒng)和防火墻技術有機地結合在一起,用于實現(xiàn)對網(wǎng)絡的全面保護和深度防御。 本文在深入細致地分析了現(xiàn)有入侵檢測系統(tǒng)進行了研究與設計,取得了以下工作成果: 參與設計了一種分布式入侵檢測系統(tǒng),并對該系統(tǒng)的體系結構和功能進行了全面、完整的描述。 關鍵詞:網(wǎng)絡安全;入侵檢測;分布式;報警融合;自動響應 3 Research and Design of Based on Campus Network Distributed Intrusion Detection System HE Yinghong ABSTRACT With the development of the Inter, the puter work security has received more and more concern. At present the most popular work security solution is the Intrusion Detection System and the Firewall System, but the Intrusion Detection System produces a lot of Alert and False Positive, an they only can detect passively, cannot defense actively, so they cannot carry on the prehensive protection to the work. Therefore a kind of brandnew work security architecture is urgent needed to solve these problems. The author analyses the good and bad points of many kinds of security defense mechanism and the development tendency of the work security, designs and implements ponentbased hierarchical Distributed Intrusion Detection System. It has good performance and can be expanded easily. It bine the Intrusion Detection System and the Firewall together, so it can carry on the prehensive protection to the work. This article analyses the existing Intrusion Detection System and the Firewall System, designs and implements the Distributed Intrusion Detection System, obtaines the achievement as below: Take part in designing the Distributed Intrusion Detection System, and explains the architecture and function of the system explicitly. Does a research in the implementation mechanism of the snort, and masteres how to write snort rules. Does a research in the steps of hackers’attack, masteres the general means of attack. Does a research and implements the alerts gather and format unification module. Implements work munication module, uses strategy design pattern to guarantee the dynamic expansion of the encryption and decryption module, solves security problems of the Intrusion Detection System effectively. Dose a deep research in the principle of the alert fusion module, and implements based on the similarity alert fusion arithmetic. Does a deep research and implements the automatic response module, which is based on plugin mode, and implements the linkage with the firewall. Aim at the demand of the local area work security, uses this Distributed Intrusion Detection System to carry on the protection for it, and the experiment receives some good effects. KEYWORD: work security, intrusion detection, distribute, alert fusion, automatic response. 4 目 錄 1.緒論 ??????????????????????????????????? 1 1. 1 研究背景 ??????????????????????????????? 1 校園網(wǎng)現(xiàn)狀 ?????????????? ?????????????? 1 入侵檢測技術現(xiàn)狀 ????????????????????????? 1 防火墻技術現(xiàn)狀 ????????????????????????? 1 2.方案論證 ????????????????????????????????? 2 2. 1 Snort 檢測器介紹 ???????????????????????????