鳳祥云
摘要:網(wǎng)絡(luò)安全是網(wǎng)絡(luò)研究的熱點,而隨著對計算機(jī)系統(tǒng)弱點和入侵行為分析研究的深入,入侵檢測系統(tǒng)在網(wǎng)絡(luò)安全中發(fā)揮著越來越重要的作用,并成為處理網(wǎng)絡(luò)安全問題的有效工具。提出的許多聚類算法及其變種在增量式聚類算法研究方面所做工作較少的問題。通過對K-Means聚類算法、迭代算法的改進(jìn),提出優(yōu)化算法。很好地解決傳統(tǒng)聚類算法在伸縮性、數(shù)據(jù)定期更新上所面臨的問題?;贙-Means聚類算法入侵檢測系統(tǒng)中重要的數(shù)據(jù)集常用的數(shù)據(jù)分析方法,搭建檢測系統(tǒng)發(fā)現(xiàn)入侵行為。
關(guān)鍵詞: 網(wǎng)絡(luò)入侵檢測;K-means算法;迭代最優(yōu)算法;NIDS設(shè)計
中圖分類號:TP393 文獻(xiàn)標(biāo)識碼:A 文章編號:1009-3044(2016)16-0049-03
Abstract:The network security is becoming a hot area in network researches. With the comprehensive analysis of the vulnerability of the network and intrusion behaviors, the Intrusion Detection System (IDS) becomes more and more important in network security. IDS is an important supplement to the traditional network security technologies. When updates are collected and applied to the databases ,then,all patterns derived from the databases by K-means algorithms have to be updated as well. Due to the very large size of the databases,it is highly desirable to perform these updates incrementally. The commonly-used Tec logical means of data analysis and the development trend of the intrusion detection technology.Experimental results show that the algorithms proposed in this paper are efficient, and the anticipated results are realized.
Key words:network security;intrusion detection; iterative algorithm; K-means algorithms; research on NIDS
1概述
網(wǎng)絡(luò)技術(shù)的飛速發(fā)展,產(chǎn)生了許多安全問題,僅僅依靠防火墻技術(shù),已經(jīng)遠(yuǎn)遠(yuǎn)不能滿足當(dāng)前復(fù)雜網(wǎng)絡(luò)環(huán)境的需要,入侵檢測技術(shù)的出現(xiàn)實現(xiàn)了時時監(jiān)視網(wǎng)絡(luò)流量[1]。通過網(wǎng)絡(luò)數(shù)據(jù)傳輸節(jié)點對相關(guān)懷疑數(shù)據(jù)進(jìn)行標(biāo)注對比,并發(fā)現(xiàn)網(wǎng)絡(luò)攻擊行為和違反安全策略的事件。
基于K-Means聚類算法入侵檢測系統(tǒng)串聯(lián)到網(wǎng)絡(luò)鏈路中[2,3],通過接收網(wǎng)絡(luò)數(shù)據(jù)流量包甄別攻擊包發(fā)現(xiàn)危險語句段并進(jìn)行標(biāo)注,阻斷危險來源節(jié)點保護(hù)自身網(wǎng)絡(luò)安全。
2入侵檢測系統(tǒng)
2.1 入侵檢測系統(tǒng)結(jié)構(gòu)
入侵檢測系統(tǒng)分為4個組件:事件產(chǎn)生器、事件分析器、響應(yīng)單元及事件數(shù)據(jù)庫。將入侵檢測系統(tǒng)需要分析的數(shù)據(jù)統(tǒng)稱為事件,它可以是網(wǎng)絡(luò)中的數(shù)據(jù)包,也可以是從系統(tǒng)日志等其他途徑得到的信息[4,5]。系統(tǒng)的框架如圖1所示。
2.2 入侵檢測任務(wù)
入侵檢測系統(tǒng)能夠監(jiān)視用戶系統(tǒng)的活動,分析系統(tǒng)構(gòu)造和網(wǎng)絡(luò)弱點。識別反饋已掌握的進(jìn)攻模式,統(tǒng)計網(wǎng)絡(luò)異常行為。檢測系統(tǒng)重要數(shù)據(jù)文件完整性,審計跟蹤操作系統(tǒng)行為,識別通告違反安全策略行為。基于網(wǎng)絡(luò)的入侵檢測系統(tǒng)。其輸入數(shù)據(jù)來源于網(wǎng)絡(luò)的信息流,能夠檢測該網(wǎng)段上發(fā)生的網(wǎng)絡(luò)入侵。
3 網(wǎng)絡(luò)入侵檢測中聚類算法應(yīng)用
3.1 模式識別
采用模式識別方法[7]分析數(shù)據(jù)。建立模式系統(tǒng)如圖2所示。通過分析辨認(rèn)網(wǎng)絡(luò)數(shù)據(jù),提取特征碼,依照class進(jìn)行分類。
3.2 聚類算法
3.3 K-means算法的基本思想
K-means算法給一個包含n個數(shù)據(jù)的數(shù)據(jù)集和產(chǎn)生的聚類的個數(shù),將n個數(shù)據(jù)劃分成k個子集,每個子集代表一個聚類,同一個聚類中的數(shù)據(jù)之間距離較近,而不同聚類的數(shù)據(jù)間距離較遠(yuǎn)[9]。每個聚類由其中心值來表示,通過計算聚類中所有數(shù)據(jù)的平均值可以得到它的中心值。
4 檢測系統(tǒng)設(shè)計
4.1 系統(tǒng)概述
網(wǎng)絡(luò)入侵檢測系統(tǒng)采用分布式體系結(jié)構(gòu),共分三層:入侵事件統(tǒng)計數(shù)據(jù)庫、網(wǎng)絡(luò)入侵嗅探器和網(wǎng)絡(luò)分析控制器[10]。使用網(wǎng)絡(luò)加密傳輸協(xié)議遠(yuǎn)程發(fā)送數(shù)據(jù)到控制臺進(jìn)行數(shù)據(jù)包探測,檢驗算法抓包效果。
4.2 Snort參數(shù)設(shè)置
采用Snort的網(wǎng)絡(luò)抓包庫Libpcap,設(shè)置Snort。
1)創(chuàng)建Snort入侵事件數(shù)據(jù)庫和存檔數(shù)據(jù)庫。
2)分析控制臺ACID包含三個功能組件:Adodb數(shù)據(jù)庫、PHP圖表類和ACID軟件包。
3)編輯ACID的配置文件Acid_conf.php,給變量賦值。
4.4 系統(tǒng)運(yùn)行設(shè)置
把系統(tǒng)設(shè)置在網(wǎng)絡(luò)服務(wù)器的緩沖區(qū),對內(nèi)外網(wǎng)絡(luò)數(shù)據(jù)流量進(jìn)行檢測。使用分析控制臺程序ACID,網(wǎng)絡(luò)入侵檢測系統(tǒng)對入侵事件進(jìn)行統(tǒng)計,并擴(kuò)展相關(guān)項數(shù)據(jù)庫,采用nmap工具, 使用X-scan對系統(tǒng)進(jìn)行掃描,并生成提示記錄標(biāo)注入侵事件[11-13]。
圖3所示檢測出觸發(fā)TCP協(xié)議等安全規(guī)則比例次數(shù)、端口號、目標(biāo)主機(jī)等。使用分析檢測控制臺制圖功能組件、分析控制臺會按指定的時間段生成入侵事件的頻率圖,如圖4所示
5 結(jié)論
在入侵行為方式、攻擊類別分析的相應(yīng)入侵檢測方法上,按照模式識別與分類,基于特征和統(tǒng)計的檢測規(guī)則,對改進(jìn)聚類算法提出設(shè)計構(gòu)想,設(shè)計了基于網(wǎng)絡(luò)的入侵檢測系統(tǒng)。得出以下結(jié)論:
1)在信息搜集、信號分析基礎(chǔ)上,采用廣泛使用的數(shù)據(jù)測試集KDD CUP數(shù)據(jù)包進(jìn)行訓(xùn)練、分析,發(fā)現(xiàn)訓(xùn)練集中的攻擊類型,使用K-means算法優(yōu)化提高效率。
2)根據(jù)網(wǎng)絡(luò)入侵的大規(guī)模端口掃描行為,采用三層分布式體系結(jié)構(gòu)設(shè)計基于網(wǎng)絡(luò)的入侵檢測系統(tǒng),對網(wǎng)絡(luò)入侵行為進(jìn)行安全檢測。
參考文獻(xiàn):
[1] 蔣建春,馮登國.網(wǎng)絡(luò)入侵檢測技術(shù)原理與技術(shù)[M].北京:國防工業(yè)出版社,2001:1-32.
[2] 吳焱.入侵者檢測技術(shù)[M].北京:電子工業(yè)出版社,2011:38-42.
[3] 張杰,戴英俠.入侵檢測系統(tǒng)技術(shù)現(xiàn)狀及其發(fā)展趨勢[J].計算機(jī)與通信,2012(6):28-32.
[4] 唐洪英,付國瑜.入侵檢測的原理與方法[J].重慶工學(xué)院學(xué)報,2012(4):71-73.
[5] Arbaugh W A. Windows of vulner ability:Acase study analysis[J].IEEE Comput, 2010: 16-48.
[6] 章夏芬,溫濤.基于數(shù)據(jù)挖掘智能代理的入侵檢測和相應(yīng)[J].計算機(jī)工程,2013, 29(7):157-186.
[7] Lee W,Stolfo S J. Data mining approaches for intrusion detection[C].Proceedings of the 1998 USENIX Security Symposium, 1998:45-60.
[8] 李鎮(zhèn)江, 戴英俠. IDS入侵檢測系統(tǒng)研究[J].計算機(jī)工程, 2011(4):15-26.
[9] 鄒柏賢. 一種網(wǎng)絡(luò)異常實時檢測方法[J].計算機(jī)學(xué)報, 2013(8):124-153.
[10] Asaka M,Taguchi A,Goto S.The implementation of IDA:An intrusion detection agent system[C].Proc.of the 11th FIRST Conf.1999.Brisbane,2011:1083-1176.
[11] Chu Y. Researches on large-scale distributed intrusion detection[D].Beijing University of Posts and Telecommunications, 2015:65-72.
[12] 蔣嶷川,田盛豐. 數(shù)據(jù)挖掘技術(shù)在入侵檢測系統(tǒng)中的應(yīng)用[J].計算機(jī)工程, 2001(4):75-93.
[13] Snapp R, Goan L,Brentano. DIDS(distributed intrusion detection system) Motivation, architecture, and an early prototype[C].Proc.of the14th National Computer Security Conf. ,Vo110. Washington,2015:167-176.