王秀英
摘 要: 分布式網(wǎng)絡(luò)采用網(wǎng)狀拓?fù)浣Y(jié)構(gòu),傳輸鏈路數(shù)很大,在提高網(wǎng)絡(luò)穩(wěn)定性的同時(shí)也相應(yīng)增加了遭受惡意入侵的風(fēng)險(xiǎn)。針對(duì)傳統(tǒng)網(wǎng)絡(luò)入侵行為檢測(cè)系統(tǒng)設(shè)計(jì)存在的檢測(cè)耗時(shí)長(zhǎng)、準(zhǔn)確率低、誤報(bào)率高等不足,提出基于時(shí)序關(guān)聯(lián)規(guī)則的分布式網(wǎng)絡(luò)入侵攻擊行為檢測(cè)系統(tǒng)?;跁r(shí)序關(guān)聯(lián)規(guī)則算法原理,設(shè)計(jì)了入侵檢測(cè)系統(tǒng)的硬件構(gòu)成,系統(tǒng)硬件部分由數(shù)據(jù)采集、規(guī)則解析、協(xié)議解碼、數(shù)據(jù)預(yù)處理及檢測(cè)分析模塊等部分構(gòu)成;在入侵檢測(cè)系統(tǒng)的軟件算法流程方面,重點(diǎn)將入侵?jǐn)?shù)據(jù)集變換為一種基于時(shí)序的項(xiàng)集矩陣,求解出相關(guān)的頻繁項(xiàng)集及時(shí)序關(guān)聯(lián)規(guī)則,實(shí)現(xiàn)對(duì)分布式網(wǎng)絡(luò)入侵行為的精確檢測(cè)。實(shí)驗(yàn)數(shù)據(jù)表明,提出的入侵系統(tǒng)設(shè)計(jì)具有良好的系統(tǒng)穩(wěn)定性及檢測(cè)效率,在檢測(cè)精度和誤報(bào)率控制方面也具有優(yōu)勢(shì)。
關(guān)鍵詞: 分布式網(wǎng)絡(luò); 時(shí)序關(guān)聯(lián)規(guī)則; 協(xié)議; 入侵行為; 檢測(cè); 系統(tǒng)設(shè)計(jì)
中圖分類號(hào): TN915.08?34; TP391 文獻(xiàn)標(biāo)識(shí)碼: A 文章編號(hào): 1004?373X(2018)03?0107?04
Abstract: The distributed network adopting the mesh topology structure has a large number of transmission links, which can improve the network stability and increase the risk of vicious intrusion attacks. In view of the long time consumption, low accuracy and high false alarm rate existing in the traditional network intrusion behavior detection system, the research on distributed network intrusion behavior detection system based on temporal sequence association rules is proposed. On the principle of temporal sequence association rules algorithm, the hardware component of the intrusion detection system was designed. The hardware of the system is composed of data acquisition module, rules analysis module, protocol decoding module, data preprocessing module and detection analysis module. According to the process of software algorithm of intrusion detection system, the intrusion data set is converted into a item?set matrix based on time sequence to solve the relevant frequent item sets and time sequence association rules, and realize the accurate detection of the distributed network intrusion. The experimental data shows that the intrusion detection system has strong system stability and high detection efficiency, and advantages in detection accuracy and false positive rate control.
Keywords: distributed network; temporal sequence association rule; protocol; intrusion behavior; detection; system design
0 引 言
隨著計(jì)算機(jī)科學(xué)技術(shù)的飛速發(fā)展,全球信息資源的共享程度高速發(fā)展,人們?cè)谙硎芫W(wǎng)絡(luò)帶來(lái)方便與快捷的同時(shí),個(gè)人信息、商業(yè)機(jī)密甚至公司的網(wǎng)絡(luò)系統(tǒng)都面臨著嚴(yán)重的網(wǎng)絡(luò)威脅與攻擊[1?2]。如何保證網(wǎng)絡(luò)安全,設(shè)計(jì)和建立更為完善、安全的入侵檢測(cè)系統(tǒng)成為全世界互聯(lián)網(wǎng)專家和學(xué)者關(guān)注的熱點(diǎn)問(wèn)題。
分布式網(wǎng)絡(luò)[3?4]具有更密集的鏈路設(shè)置[5?6],在網(wǎng)絡(luò)的穩(wěn)定性和數(shù)據(jù)傳輸效率方面具有明顯的優(yōu)勢(shì)。在網(wǎng)絡(luò)范圍拓寬、數(shù)據(jù)傳輸速率提高的背景下,各種惡意數(shù)據(jù)也在不斷地升級(jí)、變種,這就使當(dāng)前網(wǎng)絡(luò)入侵檢測(cè)系統(tǒng)難于適應(yīng)。傳統(tǒng)基于遺傳算法[7?8]的檢測(cè)系統(tǒng)設(shè)計(jì)檢測(cè)效率低,耗時(shí)長(zhǎng);而基于智能BP算法[9]的檢測(cè)系統(tǒng)設(shè)計(jì)檢測(cè)過(guò)程過(guò)于復(fù)雜、誤判率高。為此,本文提出一種基于時(shí)序關(guān)聯(lián)規(guī)則的分布式網(wǎng)絡(luò)檢測(cè)系統(tǒng)設(shè)計(jì)。本文首先介紹了系統(tǒng)設(shè)計(jì)原理及硬件構(gòu)成,在此基礎(chǔ)上給出檢測(cè)系統(tǒng)的軟件設(shè)計(jì);通過(guò)對(duì)入侵?jǐn)?shù)據(jù)集與項(xiàng)集矩陣的時(shí)序變化,得出相關(guān)的頻繁項(xiàng)集及時(shí)序關(guān)聯(lián)規(guī)則,最終完成對(duì)惡意攻擊數(shù)據(jù)的精確檢測(cè)。仿真實(shí)驗(yàn)結(jié)果表明,提出的系統(tǒng)設(shè)計(jì)檢測(cè)效率高、誤報(bào)率低,在檢測(cè)精度和系統(tǒng)穩(wěn)定性方面均有良好表現(xiàn)。
1 基于時(shí)序關(guān)聯(lián)規(guī)則的分布式網(wǎng)絡(luò)入侵檢測(cè)系統(tǒng)設(shè)計(jì)
1.1 時(shí)序關(guān)聯(lián)規(guī)則相關(guān)數(shù)據(jù)模型及算法原理
時(shí)序關(guān)聯(lián)規(guī)則算法是一種典型的數(shù)據(jù)挖掘算法,關(guān)聯(lián)規(guī)則會(huì)隨著時(shí)間的推移而發(fā)生特征上的變化,基于這種變化關(guān)系能夠識(shí)別出網(wǎng)絡(luò)入侵?jǐn)?shù)據(jù)的特征,實(shí)現(xiàn)對(duì)網(wǎng)絡(luò)入侵和攻擊行為的精確檢測(cè)。時(shí)序關(guān)聯(lián)規(guī)則算法原理表述如下:endprint
設(shè)項(xiàng)集如果集合和滿足下列條件:,那么蘊(yùn)含式即為一組關(guān)聯(lián)規(guī)則,為時(shí)序序列。令關(guān)聯(lián)規(guī)則的支持度和置信度分別為和分別表示為:
事務(wù)集中的數(shù)據(jù)項(xiàng)都由一個(gè)二元組時(shí)序項(xiàng)來(lái)表示,在基于時(shí)序檢測(cè)中可能會(huì)出現(xiàn)多個(gè)時(shí)序項(xiàng),如表1所示。
]
表1中為時(shí)序項(xiàng),基于時(shí)序關(guān)聯(lián)規(guī)則的算法在頻繁項(xiàng)集的求解及全部時(shí)序規(guī)則的運(yùn)用中,要盡量保證每個(gè)時(shí)序規(guī)則滿足入侵?jǐn)?shù)據(jù)檢測(cè)集的最小支持度,因此,保證數(shù)據(jù)檢測(cè)可轉(zhuǎn)換為頻繁時(shí)序規(guī)則的求解。
1.2 基于時(shí)序關(guān)聯(lián)規(guī)則的檢測(cè)系統(tǒng)硬件構(gòu)成
基于時(shí)序關(guān)聯(lián)規(guī)則的數(shù)據(jù)入侵檢測(cè)模型及算法原理,本文設(shè)計(jì)了用于分布式網(wǎng)絡(luò)惡意數(shù)據(jù)攻擊檢測(cè)系統(tǒng)的硬件結(jié)構(gòu)。系統(tǒng)硬件由數(shù)據(jù)采集模塊、解碼模塊、規(guī)則解析模塊、數(shù)據(jù)預(yù)處理模塊及檢測(cè)分析模塊構(gòu)成,檢測(cè)系統(tǒng)的結(jié)構(gòu)簡(jiǎn)圖,如圖1所示。
數(shù)據(jù)采集通過(guò)網(wǎng)絡(luò)數(shù)據(jù)傳輸?shù)姆绞綄?shí)現(xiàn),在檢測(cè)系統(tǒng)工作過(guò)程中,應(yīng)用程序?qū)W(wǎng)絡(luò)數(shù)據(jù)包進(jìn)行篩選和過(guò)濾。入侵檢測(cè)系統(tǒng)的數(shù)據(jù)采集模塊直接訪問(wèn)網(wǎng)絡(luò)數(shù)據(jù)鏈路層捕獲相關(guān)數(shù)據(jù),數(shù)據(jù)包捕獲流程如圖2所示。
單純的模式匹配方法識(shí)別的模式簡(jiǎn)單機(jī)械,檢測(cè)率低、誤報(bào)率高。而基于協(xié)議編碼的智能分析技術(shù)可以提高惡意數(shù)據(jù)檢測(cè)效率。網(wǎng)絡(luò)協(xié)議重新定義了數(shù)據(jù)包的格式,采用這種層級(jí)性的關(guān)系能夠簡(jiǎn)化運(yùn)算量,提高數(shù)據(jù)分析和處理效率。要具體地區(qū)分IP協(xié)議、TCP協(xié)議、ICMP協(xié)議及UDP協(xié)議,因?yàn)椴煌瑓f(xié)議具有不同的特點(diǎn)。
用于惡意網(wǎng)絡(luò)數(shù)據(jù)檢測(cè)與分析的模塊是整個(gè)檢測(cè)系統(tǒng)設(shè)計(jì)的核心部分,它將捕獲網(wǎng)絡(luò)數(shù)據(jù)與建立時(shí)序關(guān)聯(lián)規(guī)則進(jìn)行匹配,識(shí)別出惡意數(shù)據(jù)系統(tǒng)將自動(dòng)報(bào)警。
1.3 分布式網(wǎng)絡(luò)入侵檢測(cè)系統(tǒng)設(shè)計(jì)的軟件實(shí)現(xiàn)流程
與分布式網(wǎng)絡(luò)檢測(cè)系統(tǒng)的硬件模塊相匹配,將入侵?jǐn)?shù)據(jù)集變換為一種基于時(shí)序的項(xiàng)集矩陣,得出相關(guān)的頻繁項(xiàng)集及時(shí)序關(guān)聯(lián)規(guī)則,分布式網(wǎng)絡(luò)入侵?jǐn)?shù)據(jù)的關(guān)系矩陣可以表示為:
將分布式網(wǎng)絡(luò)中入侵?jǐn)?shù)據(jù)源轉(zhuǎn)換為矩陣形式,可以提高算法的運(yùn)行效率和系統(tǒng)對(duì)于惡意網(wǎng)絡(luò)的數(shù)據(jù)檢測(cè)精度,基于時(shí)序關(guān)聯(lián)規(guī)則的分布式網(wǎng)絡(luò)入侵?jǐn)?shù)據(jù)檢測(cè)流程,如圖3所示。
基于頻繁時(shí)序關(guān)聯(lián)規(guī)則對(duì)采集到的入侵?jǐn)?shù)據(jù)集進(jìn)行配比和檢測(cè),設(shè)時(shí)序項(xiàng)集為,其中為數(shù)據(jù)項(xiàng)集,為時(shí)序項(xiàng)集的時(shí)間戳。若為全部時(shí)序中的最大值,則輸出為1,否則輸出為0,那么對(duì)于分布式網(wǎng)絡(luò)入侵?jǐn)?shù)據(jù)識(shí)別與檢測(cè)的偽代碼如下:
在求解頻繁項(xiàng)集支持?jǐn)?shù)及時(shí)序的關(guān)聯(lián)規(guī)則時(shí),如果對(duì)應(yīng)的均值一致時(shí),結(jié)果為1,否則結(jié)果為0。
本文基于時(shí)序關(guān)聯(lián)規(guī)則設(shè)計(jì)了用于分布式網(wǎng)絡(luò)入侵攻擊行為檢測(cè)系統(tǒng)設(shè)計(jì),基于時(shí)序關(guān)聯(lián)入侵規(guī)則原理,設(shè)計(jì)檢測(cè)系統(tǒng)硬件構(gòu)成和軟件實(shí)現(xiàn)流程,對(duì)項(xiàng)集矩陣變化及頻繁項(xiàng)集的求解,實(shí)現(xiàn)對(duì)入侵源的精確檢測(cè)。
2 實(shí)驗(yàn)結(jié)果與分析
本文在時(shí)序數(shù)據(jù)挖掘時(shí)長(zhǎng)、支持度水平及樣本數(shù)據(jù)相同的條件下,將傳統(tǒng)基于遺傳算法的檢測(cè)系統(tǒng)設(shè)計(jì)與本文提出的系統(tǒng)設(shè)計(jì)入侵攻擊數(shù)據(jù)檢測(cè)性能進(jìn)行對(duì)比驗(yàn)證。
2.1 實(shí)驗(yàn)測(cè)試環(huán)境
仿真實(shí)驗(yàn)所需樣本數(shù)據(jù)來(lái)源、數(shù)據(jù)類型如表2所示。
本文實(shí)驗(yàn)在Matlab 7.0測(cè)試平臺(tái)下進(jìn)行,實(shí)驗(yàn)的編程環(huán)境為VS2010,硬件環(huán)境要求Intel Core i7,Ram 8 GB,500 GB SATA存儲(chǔ)。
2.2 檢測(cè)性能分析
首先驗(yàn)證本文提出的基于時(shí)序關(guān)聯(lián)規(guī)則檢測(cè)系統(tǒng)設(shè)計(jì)與傳統(tǒng)基于遺傳算法檢測(cè)系統(tǒng)設(shè)計(jì)在分布式網(wǎng)絡(luò)惡意數(shù)據(jù)入侵檢測(cè)方面的效率對(duì)比,數(shù)據(jù)從1 000~150 000條,兩種檢測(cè)系統(tǒng)設(shè)計(jì)的檢測(cè)效率如表3所示。
從表3的數(shù)據(jù)變化能夠分析出在入侵檢測(cè)和數(shù)據(jù)挖掘效率上,本文所采取的優(yōu)化策略起到了明顯效果,能夠識(shí)別出時(shí)序關(guān)聯(lián)規(guī)則及頻繁項(xiàng)集,將滿足條件的關(guān)聯(lián)規(guī)則挖掘和識(shí)別出來(lái),提高了對(duì)于具有入侵和攻擊行為惡意數(shù)據(jù)的檢測(cè)效率。
對(duì)包含不同記錄數(shù)的入侵?jǐn)?shù)據(jù)進(jìn)行仿真實(shí)驗(yàn),驗(yàn)證其在復(fù)合條件下的檢測(cè)性能,實(shí)驗(yàn)結(jié)果如圖4所示。
本文選定了500個(gè)訓(xùn)練周期對(duì)兩種系統(tǒng)設(shè)計(jì)的訓(xùn)練精度進(jìn)行對(duì)比驗(yàn)證。在訓(xùn)練精度方面,本文提出的系統(tǒng)設(shè)計(jì)比傳統(tǒng)設(shè)計(jì)性能更為穩(wěn)定,訓(xùn)練精度更高,兩種系統(tǒng)設(shè)計(jì)的實(shí)驗(yàn)驗(yàn)證結(jié)果如圖5所示。
對(duì)兩種算法的誤報(bào)率和檢測(cè)率進(jìn)行了數(shù)據(jù)分析,分析結(jié)果如表4所示。
從表4中的數(shù)據(jù)統(tǒng)計(jì)能夠看出,本文基于實(shí)現(xiàn)關(guān)聯(lián)規(guī)則的入侵攻擊行為檢測(cè)在相同的訓(xùn)練周期下具有更高的檢測(cè)率和更低的誤報(bào)率。
3 結(jié) 論
本文提出一種基于時(shí)序關(guān)聯(lián)規(guī)則的分布式網(wǎng)絡(luò)入侵攻擊行為檢測(cè)系統(tǒng)設(shè)計(jì),詳盡介紹了系統(tǒng)的硬件構(gòu)成及軟件算法流程,仿真對(duì)比實(shí)驗(yàn)結(jié)果證明了提出系統(tǒng)設(shè)計(jì)的有效性。
參考文獻(xiàn)
[1] 武裝,陳佳欣,王克平.一種改進(jìn)的IPv4/v6網(wǎng)絡(luò)入侵檢測(cè)技術(shù)研究[J].計(jì)算機(jī)科學(xué),2011,38(6):140?141.
WU Zhuang, CHEN Jiaxin, WANG Keping. Improved IPv4/v6 network IDS technology [J]. Computer science, 2011, 38(6): 140?141.
[2] 盧先鋒,楊頻,梁剛.基于動(dòng)態(tài)IP黑名單的入侵防御系統(tǒng)模型[J].計(jì)算機(jī)工程與設(shè)計(jì),2011,32(1):10?13.
LU Xianfeng, YANG Pin, LIANG Gang. Model of intrusion prevention system based on dynamic IP blacklist [J]. Computer engineering and design, 2011, 32(1): 10?13.
[3] 張信杰,王旭仁,吳剛.分布式網(wǎng)絡(luò)監(jiān)控系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)[J].計(jì)算機(jī)工程與設(shè)計(jì),2010,31(17):3797?3799.endprint
ZHANG Xinjie, WANG Xuren, WU Gang. Design and implementation of distributed net auditing system [J]. Computer engineering and design, 2010, 31(17): 3797?3799.
[4] 安金鑫,王軍,孫章,等.基于分布式網(wǎng)絡(luò)的并行多通道數(shù)據(jù)采集系統(tǒng)設(shè)計(jì)[J].電測(cè)與儀表,2013(6):109?114.
AN Jinxin, WANG Jun, SUN Zhang, et al. Design of parallel multi?channel data acquisition system based on distribution network [J]. Electrical measurement & instrumentation, 2013(6): 109?114.
[5] 谷曉燕,代真,何鋒.基于虛擬鏈路的航電網(wǎng)絡(luò)信用量評(píng)估模型[J].計(jì)算機(jī)工程與設(shè)計(jì),2015,36(4):892?895.
GU Xiaoyan, DAI Zhen, HE Feng. Evaluation of credit consume of avionics network based on virtual link [J]. Computer engineering and design, 2015, 36(4): 892?895.
[6] 胡曦,李喆,劉軍.移動(dòng)Ad hoc網(wǎng)絡(luò)中基于鏈路穩(wěn)定性預(yù)測(cè)的按需路由協(xié)議[J].電子與信息學(xué)報(bào),2010,32(2):284?289.
HU Xi, LI Zhe, LIU Jun. A link stability prediction?based on?demand routing protocol in mobile Ad Hoc networks [J]. Journal of electronics & information technology, 2010, 32(2): 284?289.
[7] 張超群,鄭建國(guó),錢潔.遺傳算法編碼方案比較[J].計(jì)算機(jī)應(yīng)用研究,2011,28(3):819?822.
ZHANG Chaoqun, ZHENG Jianguo, QIAN Jie. Comparison of coding schemes for genetic algorithms [J]. Application research of computers, 2011, 28(3): 819?822.
[8] 王華忠,楊智慧,顏秉勇,等.融合PCA和PSO?SVM方法在工控入侵檢測(cè)中的應(yīng)用[J].科技通報(bào),2017,33(1):80?85.
WANG Huazhong, YANG Zhihui, YAN Bingyong, et al. Application of fusion PCA and PSO?SVM method in industrial control intrusion detection [J]. Bulletin of science and technology, 2017, 33(1): 80?85.
[9] 李松,劉力軍,解永樂(lè).遺傳算法優(yōu)化BP神經(jīng)網(wǎng)絡(luò)的短時(shí)交通流混沌預(yù)測(cè)[J].控制與決策,2011,26(10):1581?1585.
LI Song, LIU Lijun, XIE Yongle. Chaotic prediction for short?term traffic flow of optimized BP neural network based on genetic algorithm [J]. Control and decision, 2011, 26(10): 1581?1585.endprint