郭海智 郭亮 王連勝
摘 ?要: 為了克服當(dāng)前網(wǎng)絡(luò)入侵檢測(cè)模型存在的局限性,以獲得更加理想的網(wǎng)絡(luò)入侵檢測(cè)結(jié)果,設(shè)計(jì)基于特征優(yōu)化的網(wǎng)絡(luò)入侵檢測(cè)模型。首先研究當(dāng)前網(wǎng)絡(luò)入侵檢測(cè)建?,F(xiàn)狀,分析特征對(duì)網(wǎng)絡(luò)入侵檢測(cè)結(jié)果的影響,然后建立網(wǎng)絡(luò)入侵檢測(cè)的特征優(yōu)化數(shù)學(xué)模型,通過(guò)模擬自然界生物進(jìn)化的自適應(yīng)遺傳算法對(duì)特征優(yōu)化數(shù)學(xué)模型的解進(jìn)行搜索,對(duì)最優(yōu)解反編碼得到入侵檢測(cè)的最優(yōu)特征子集,最后根據(jù)最優(yōu)特征子集對(duì)網(wǎng)絡(luò)入侵檢測(cè)的學(xué)習(xí)樣本進(jìn)行建模,設(shè)計(jì)最優(yōu)的網(wǎng)絡(luò)入侵檢測(cè)模型。采用網(wǎng)絡(luò)入侵檢測(cè)的標(biāo)準(zhǔn)數(shù)據(jù)集進(jìn)行仿真對(duì)比測(cè)試,文中模型的網(wǎng)絡(luò)入侵檢測(cè)平均正確率大約為95%,而當(dāng)前其他網(wǎng)絡(luò)入侵檢測(cè)模型均在95%以下,同時(shí)該模型的入侵檢測(cè)建模訓(xùn)練和檢測(cè)時(shí)間大幅度減少,能夠獲得更優(yōu)的網(wǎng)絡(luò)入侵檢測(cè)效率。
關(guān)鍵詞: 網(wǎng)絡(luò)安全; 入侵行為; 網(wǎng)絡(luò)入侵檢測(cè); 學(xué)習(xí)樣本建模; 檢測(cè)模型; 特征分析
中圖分類號(hào): TN915.08?34 ? ? ? ? ? ? ? ? ? ? ? 文獻(xiàn)標(biāo)識(shí)碼: A ? ? ? ? ? ? ? ? ? ? ? ?文章編號(hào): 1004?373X(2019)19?0068?05
Abstract: In order to overcome the limitations of current network intrusion detection model and obtain more ideal network intrusion detection results, a network intrusion detection model based on feature optimization is designed. The current status of network intrusion detection modeling is studied. The impact of features on network intrusion detection results is analyzed. A feature optimization mathematical model of network intrusion detection is established. The solution of the feature optimization mathematical model is searched by means of adaptive genetic algorithm simulating the biological evolution in the natural world. The optimal feature subset of the intrusion detection is obtained by anti?coding the optimal solution. The learning samples of network intrusion detection are modeled according to the optimal feature subset, and the optimal network intrusion detection model is designed. The standard data set of network intrusion detection is adopted for simulation and comparison test. The average correct rate of the network intrusion detection model proposed in this paper is about 95%, and that of other network intrusion detection models is lower than 95%. The time consumption of training and detection of the intrusion detection model proposed in this paper is greatly reduced. The network intrusion detection efficiency is improved.
Keywords: network security; intrusion behavior; network intrusion detection; learning sample modeling; detection model; feature analysis
隨著各種網(wǎng)絡(luò)技術(shù)的不斷發(fā)展,各個(gè)領(lǐng)域中出現(xiàn)各種類型的網(wǎng)絡(luò),所有類型均具有不設(shè)防的共性,這為一些非法用戶入侵到網(wǎng)絡(luò)中提供了機(jī)會(huì),這樣網(wǎng)絡(luò)安全問(wèn)題便出現(xiàn)了,因此網(wǎng)絡(luò)安全問(wèn)題成為一個(gè)全世界關(guān)注的問(wèn)題[1?3]。
當(dāng)前網(wǎng)絡(luò)安全問(wèn)題的主要防范技術(shù)為入侵檢測(cè),入侵檢測(cè)通過(guò)對(duì)網(wǎng)絡(luò)中的一些數(shù)據(jù)(如訪問(wèn)記錄、網(wǎng)絡(luò)流量、用戶日志等)進(jìn)行分析,找到網(wǎng)絡(luò)中的一些異常行為,即非法入侵行為,并根據(jù)這些非法入侵行為制定相應(yīng)的安全防范措施進(jìn)行預(yù)警[4]。由于網(wǎng)絡(luò)入侵行為的種類很多,如遠(yuǎn)端未經(jīng)授權(quán)的訪問(wèn)等,因此屬于模式識(shí)別的問(wèn)題,這樣就牽涉到特征優(yōu)化問(wèn)題和分類器設(shè)計(jì)問(wèn)題。由于特征主要用于描述網(wǎng)絡(luò)中的各種行為,通常情況下,用戶盡可能地從數(shù)據(jù)中提取更多的特征,使得原始特征數(shù)量相當(dāng)龐大,網(wǎng)絡(luò)入侵檢測(cè)的分類器輸入數(shù)量相當(dāng)大,易出現(xiàn)“維數(shù)災(zāi)難”[5?7]。
特征優(yōu)化主要根據(jù)特征對(duì)網(wǎng)絡(luò)入侵行為類型的識(shí)別貢獻(xiàn)對(duì)特征進(jìn)行選擇,當(dāng)前特征優(yōu)化方法很多,大致可以劃分為兩大類:一類是特征空間變換法,如主成分分析、核主成分分析、灰色關(guān)聯(lián)分析等,通過(guò)對(duì)原始特征進(jìn)行一定的變換,減少特征的數(shù)量,通過(guò)較少數(shù)據(jù)特征描述原始特征信息,工作效率高,但是由于變換后的特征與原始特征之間的差別,優(yōu)化后特征的可解釋性差;另一類為群智能優(yōu)化算法,如粒子群算法、蟻群算法、遺傳算法等,通過(guò)構(gòu)建許多特征子集[8?10],對(duì)每一個(gè)特征子集的貢獻(xiàn)進(jìn)行評(píng)價(jià),選擇出最優(yōu)的特征子集,從而實(shí)現(xiàn)網(wǎng)絡(luò)入侵檢測(cè)特征優(yōu)化操作。
該方法可以更好地解釋優(yōu)化后的特征,但是這些算法均存在一定的不足,如粒子群算法的工作后期難收斂,找到最優(yōu)特征集的速度慢;蟻群算法的信息初始值難以合理確定,易找到局部最優(yōu)的網(wǎng)絡(luò)入侵特征子集,遺傳算法的交叉、變異算子采用固定方式,通用性差。
當(dāng)前網(wǎng)絡(luò)入侵檢測(cè)分類器的設(shè)計(jì)方法很多,如貝葉斯網(wǎng)絡(luò)、各種類型神經(jīng)網(wǎng)絡(luò),但是建模過(guò)程十分復(fù)雜,參數(shù)難以確定,影響網(wǎng)絡(luò)入侵檢測(cè)效果[11?13]。
網(wǎng)絡(luò)入侵行為由于環(huán)境的不同,變化相當(dāng)復(fù)雜,而傳統(tǒng)特征優(yōu)化方法無(wú)法有效地找到最優(yōu)特征子集,網(wǎng)絡(luò)入侵檢測(cè)結(jié)果不可靠、速度慢,為此,本文設(shè)計(jì)基于特征優(yōu)化的網(wǎng)絡(luò)入侵檢測(cè)模型。該模型分析和建立網(wǎng)絡(luò)入侵檢測(cè)的特征優(yōu)化數(shù)學(xué)模型,然后通過(guò)模擬自然界生物進(jìn)化的自適應(yīng)遺傳算法搜索最優(yōu)網(wǎng)絡(luò)入侵檢測(cè)的最優(yōu)特征子集,最后基于最優(yōu)特征子集,通過(guò)最小二乘支持向量機(jī)對(duì)網(wǎng)絡(luò)入侵檢測(cè)的學(xué)習(xí)樣本進(jìn)行建模,設(shè)計(jì)最優(yōu)的網(wǎng)絡(luò)入侵檢測(cè)模型,在Maltab仿真對(duì)比測(cè)試結(jié)果顯示,本文模型的網(wǎng)絡(luò)入侵檢測(cè)平均正確率大約95%,而且當(dāng)前其他網(wǎng)絡(luò)入侵檢測(cè)模型均在95%以下,同時(shí)本文模型的入侵檢測(cè)建模訓(xùn)練和檢測(cè)時(shí)間大幅度減少,能夠獲得更優(yōu)的網(wǎng)絡(luò)入侵檢測(cè)效率。
對(duì)于一個(gè)網(wǎng)絡(luò)系統(tǒng),通過(guò)參閱專家意見(jiàn)和相關(guān)文獻(xiàn)研究結(jié)果,從網(wǎng)絡(luò)數(shù)據(jù)中提取了[n]個(gè)原始入侵行為特征,它們組成一個(gè)集合:[F=f1,f2,…,fn],在特征優(yōu)化過(guò)程中,采用二進(jìn)制編碼方式描述特征選擇狀態(tài),相應(yīng)的網(wǎng)絡(luò)入侵特征子集表示為:[S=s1,s2,…,sm],[si∈]{0,1},[m]為特征子集中的特征數(shù),1和0分別表示特征是否被選中。
統(tǒng)計(jì)各模型對(duì)各種網(wǎng)絡(luò)入侵行為的訓(xùn)練和檢測(cè)時(shí)間,結(jié)果如表3所示。從表3可知,對(duì)于訓(xùn)練和檢測(cè)時(shí)間,本文模型均最低,表明本文模型的計(jì)算量小,減少了計(jì)算復(fù)雜度,入侵檢測(cè)效率更高。
本文結(jié)合網(wǎng)絡(luò)入侵的原始特征數(shù)量大,易出現(xiàn)“維數(shù)災(zāi)”的難題,為加快網(wǎng)絡(luò)入侵檢測(cè)速度,設(shè)計(jì)了基于特征優(yōu)化的網(wǎng)絡(luò)入侵檢測(cè)模型。網(wǎng)絡(luò)入侵檢測(cè)的標(biāo)準(zhǔn)數(shù)據(jù)集仿真測(cè)試結(jié)果表明,本文模型的網(wǎng)絡(luò)入侵檢測(cè)平均正確率要優(yōu)于對(duì)比模型,建模訓(xùn)練和檢測(cè)時(shí)間相對(duì)更少,可以廣泛應(yīng)用于實(shí)際網(wǎng)絡(luò)安全管理中。
參考文獻(xiàn)
[1] MC HUGH J, CHRISTIE A, ALLEN J. Defending yourself: the role of intrusion detection systems [J]. Software, 2000, 17(5): 42?51.
[2] 吳慶濤,邵志清.入侵檢測(cè)研究綜述[J].計(jì)算機(jī)應(yīng)用研究,2005,22(12):11?14.
WU Qingtao, SHAO Zhiqing. Survey on intrusion detection techniques [J]. Application research of computers, 2005, 22(12): 11?14.
[3] 朱小華.基于人工魚(yú)群算法優(yōu)化神經(jīng)網(wǎng)絡(luò)在網(wǎng)絡(luò)入侵檢測(cè)中的應(yīng)用研究[J].現(xiàn)代電子技術(shù),2017,40(1):80?82.
ZHU Xiaohua. Application of neural network optimized by artificial fish swarm algorithm in network intrusion detection [J]. Modern electronics technique, 2017, 40(1): 80?82.
[4] 王耀光,陳偉權(quán),吳鎮(zhèn)邦,等.基于混合差分演化的網(wǎng)絡(luò)入侵檢測(cè)算法[J].鄭州大學(xué)學(xué)報(bào)(工學(xué)版),2017,38(6):29?32.
WANG Yaoguang, CHEN Weiquan, WU Zhenbang, et al. Network intrusion detection algorithm based on hybrid differential evolution algorithm [J]. Journal of Zhengzhou University (Engineering science), 2017, 38(6): 29?32.
[5] 黃思慧,陳萬(wàn)忠,李晶.基于PCA和ELM的網(wǎng)絡(luò)入侵檢測(cè)技術(shù)[J].吉林大學(xué)學(xué)報(bào)(信息科學(xué)版),2017,35(5):576?583.
HUANG Sihui, CHEN Wanzhong, LI Jing. Network intrusion detection based on extreme learning machine and principal component analysis [J]. Journal of Jilin University (Information science edition), 2017, 35(5): 576?583.
[6] 顧兆軍,李冰,劉濤.基于ELM?KNN算法的網(wǎng)絡(luò)入侵檢測(cè)模型[J].計(jì)算機(jī)工程與設(shè)計(jì),2018,39(8):2412?2416.
GU Zhaojun, LI Bing, LIU Tao. Network intrusion detection based on ELM?KNN algorithm [J]. Computer engineering and design, 2018, 39(8): 2412?2416.
[7] 王紅梅.簡(jiǎn)化粒子群優(yōu)化結(jié)合SOM的網(wǎng)絡(luò)入侵檢測(cè)方法[J].微型電腦應(yīng)用,2018,34(5):29?31.
WANG Hongmei. A network intrusion detection method using simplified particle swarm optimization algorithm and SOM [J]. Microcomputer applications, 2018, 34(5): 29?31.
[8] 羅俊松.基于神經(jīng)網(wǎng)絡(luò)的BP算法研究及在網(wǎng)絡(luò)入侵檢測(cè)中的應(yīng)用[J].現(xiàn)代電子技術(shù),2017,40(11):91?94.
LUO Junsong. Research on BP algorithm based on neural network and its application in network intrusion detection [J]. Mo?dern electronics technique, 2017, 40(11): 91?94.
[9] 潘大勝.基于模糊關(guān)聯(lián)規(guī)則挖掘的網(wǎng)絡(luò)入侵檢測(cè)算法[J].現(xiàn)代電子技術(shù),2017,40(9):86?88.
PAN Dasheng. Network intrusion detection algorithm based on fuzzy association rules mining [J]. Modern electronics technique, 2017, 40(9): 86?88.
[10] 向昌盛,張林峰.PSO?SVM在網(wǎng)絡(luò)入侵檢測(cè)中的應(yīng)用[J].計(jì)算機(jī)工程與設(shè)計(jì),2013,34(4):1222?1225.
XIANG Changsheng, ZHANG Linfeng. Application of support vector machine optimized by particle swarm optimization algorithm in network intrusion detection [J]. Computer engineering and design, 2013, 34(4): 1222?1225.
[11] 袁琴琴,呂林濤.基于改進(jìn)蟻群算法與遺傳算法組合的網(wǎng)絡(luò)入侵檢測(cè)[J].重慶郵電大學(xué)學(xué)報(bào)(自然科學(xué)版),2017,29(1):84?89.
YUAN Qinqin, L? Lintao. Network intrusion detection method based on combination of improved ant colony optimization and genetic algorithm [J]. Journal of Chongqing University of Posts and Telecommunications (Natural science edition), 2017, 29(1): 84?89.
[12] 趙建華,劉寧.結(jié)合主動(dòng)學(xué)習(xí)和半監(jiān)督學(xué)習(xí)的網(wǎng)絡(luò)入侵檢測(cè)算法[J].西華大學(xué)學(xué)報(bào)(自然科學(xué)版),2015,34(6):53?57.
ZHAO Jianhua, LIU Ning. Network Intrusion detection algorithm based on active learning and semi?supervised learning [J]. Journal of Xihua University (Natural science edition), 2015, 34(6): 53?57.
[13] 牟琦,龔尚福,畢孝儒,等.基于快速屬性約簡(jiǎn)的網(wǎng)絡(luò)入侵特征選擇[J].計(jì)算機(jī)工程,2011,37(17):113?115.
MU Qi, GONG Shangfu, BI Xiaoru, et al. Network intrusion feature selection based on fast attribute reduction [J]. Computer engineering, 2011, 37(17): 113?115.