KDD99是一個用來從正常連接中監測非正常連接的數據集。產出於1999年Thrid International Knowlegde Discovery and Data Mining Tools Competition,其目的是建立一個穩定的的入侵檢測系統。
KDD99包含了置入攻擊的軍事網絡環境中的記錄。攻擊可以分類為:
DoS攻擊:Denial of Service
R2U:Remote to User
U2R:User to Root
探針攻擊:Probing
KDD99數據集是 DARPA數據集 的 特征提取(Feature Extract) 版本( DARPA 是原始數據集)KDD99對每個連接提取了 41 個特征,使用Bro-IDS工具對數據貼標簽。
其41個特征可以按以下方式分類:
1-9 TCP連接的基本特征
10-22 TCP連接的內容特征
23-31 基於時間的網絡流量統計特征,使用2秒的時間窗(Traffic features computed using a two-second time window)
32-41 基於主機的網絡流量統計特征,主機特征(Host features),用來評估持續時間在兩秒鍾以上的攻擊
TCP連接的基本特征
feature name description type
duration length (number of seconds) of the connection
連接的持續時間,以秒(s)為單位
[0 ~ 58329]
它的定義是從TCP連接以3次握手建立算起,到FIN/ACK連接結束為止的時間;若為UDP協議類型,則將每個UDP數據包作為一條連接。(數據集中出現大量的duration=0 的情況,是因為該條連接的持續時間不足1秒.) continuous
連續
protocol_type type of the protocol, e.g. tcp, udp, etc.
協議類型,此數據集中有三種:
TCP, UDP, ICMP discrete
離散
service network service on the destination, e.g., http, telnet, etc.
連接目的端的網絡服務。有70+種:
aol, auth, bgp, courier, csnet_ns, ctf, daytime, discard, domain, domain_u, echo, eco_i, ecr_i, efs, exec, finger, ftp, ftp_data, gopher, harvest, hostnames, http, http_2784, http_443, http_8001, imap4, IRC, iso_tsap, klogin, kshell, ldap, link, login, mtp, name, netbios_dgm, netbios_ns, netbios_ssn, netstat, nnsp, nntp, ntp_u, other, pm_dump, pop_2, pop_3, printer, private, red_i, remote_job, rje, shell, smtp, sql_net, ssh, sunrpc, supdup, systat, telnet, tftp_u, tim_i, time, urh_i, urp_i, uucp, uucp_path, vmnet, whois, X11, Z39_50 discrete
離散
src_bytes number of data bytes from source to destination
從源主機到目的主機數據的字節數
[0 ~ 1379963888] continuous
連續
dst_bytes number of data bytes from destination to source
從目的主機到源主機數據的字節數
[0 ~ 1309937401] continuous
連續
flag normal or error status of the connection
連接狀態正常或錯誤的標志,共11中
OTH, REJ, RSTO, RSTOS0, RSTR, S0, S1, S2, S3, SF, SH
表示該連接是否按照協議要求開始或完成。例如SF表示連接正常建立並終止;S0表示只接到了SYN請求數據包,而沒有后面的SYN/ACK。其中SF表示正常,其他10種都是error。
11種狀態的詳細解釋,參考文章[4] discrete
離散
land 1 if connection is from/to the same host/port; 0 otherwise
1: 連接來自/到同一主機/端口
0: 其它 discrete
離散
wrong_fragment number of ``wrong’’ fragments
“錯誤”片段的數量
[0 ~ 3] continuous
連續
urgent number of urgent packets
urgent加急包數量
[0 ~ 14] continuous
連續
Table 1: Basic features of individual TCP connections.
表1:TCP連接的基本特征
TCP連接的內容特征
feature name description type
hot number of ``hot’’ indicators
訪問系統敏感文件和目錄的次數
[0 ~ 101]
例如訪問系統目錄,建立或執行程序等 continuous
連續
num_failed_logins number of failed login attempts
登錄嘗試失敗的次數。
[0 ~ 5] continuous
連續
logged_in 1 if successfully logged in
0 otherwise
1:成功登錄
0:其它 discrete
離散
num_compromised number of ``compromised’’ conditions
’compromised’條件出現的次數
[0 ~ 7479] continuous
連續
root_shell 1 if root shell is obtained; 0 otherwise
1:獲得root shell
0:其它 discrete
離散
su_attempted 1 if ``su root’’ command attempted; 0 otherwise
1:出現’su root’
0:其它 discrete
離散
num_root number of ``root’’ accesses
root用戶訪問次數
[0 ~ 7468] continuous
連續
num_file_creations number of file creation operations
文件創建操作的次數
[0 ~ 100] continuous
連續
num_shells number of shell prompts
使用shell命令的次數
[0 ~ 5] continuous
連續
num_access_files number of operations on access control files
訪問控制文件的次數
[0 ~ 9] continuous
連續
num_outbound_cmds number of outbound commands in an ftp session
一個FTP會話種出現連接的次數
數據集種這一特征出現次數為0 continuous
連續
is_hot_login 1 if the login belongs to the ``hot’’ list; 0 otherwise
1:登錄屬於’hot’列表
0:其它
如超級用戶或管理員登錄 discrete
離散
is_guest_login 1 if the login is a ``guest’'login; 0 otherwise
1:guest登錄
0:其它 discrete
離散
Table 2: Content features within a connection suggested by domain knowledge.
表2:TCP連接的內容特征
基於時間的網絡流量統計特征
feature name description type
count number of connections to the same host as the current connection in the past two seconds
Note: The following features refer to these same-host connections.
過去兩秒內,與當前連接具有相同的目標主機的連接數。
[0 ~ 511]
注意: 以下特征連接到相同主機 continuous
連續
srv_count number of connections to the same service as the current connection in the past two seconds
Note: The following features refer to these same-service connections.
過去兩秒內,與當前連接具有相同服務的連接數
[0 ~ 511]
注意: 以下特征連接到相同服務 continuous
連續
serror_rate % of connections that have ``SYN’’ errors
過去兩秒內,在與當前連接具有相同目標主機的連接中,出現“SYN” 錯誤的連接的百分比
[0.00 ~ 1.00] continuous
連續
rerror_rate % of connections that have ``REJ’’ errors
過去兩秒內,在與當前連接具有相同目標主機的連接中,出現“REJ” 錯誤的連接的百分比
[0.00 ~ 1.00] continuous
連續
same_srv_rate % of connections to the same service
過去兩秒內,在與當前連接具有相同目標主機的連接中,與當前連接具有相同服務的連接的百分比
[0.00 ~ 1.00] continuous
連續
diff_srv_rate % of connections to different services
過去兩秒內,在與當前連接具有相同目標主機的連接中,與當前連接具有不同服務的連接的百分比
[0.00 ~ 1.00] continuous
連續
srv_serror_rate % of connections that have ``SYN’’ errors
過去兩秒內,在與當前連接具有相同服務的連接中,出現“SYN” 錯誤的連接的百分比
[0.00 ~ 1.00] continuous
連續
srv_rerror_rate % of connections that have ``REJ’’ errors
過去兩秒內,在與當前連接具有相同服務的連接中,出現“REJ” 錯誤的連接的百分比
[0.00 ~ 1.00] continuous
連續
srv_diff_host_rate % of connections to different hosts
過去兩秒內,在與當前連接具有相同服務的連接中,與當前連接具有不同目標主機的連接的百分比
[0.00 ~ 1.00] continuous
連續
count、serror_rate、rerror_rate、same_srv_rate、diff_srv_rate這5個特征是 same host特征,前提都是與當前連接具有相同目標主機的連接;
srv_count、srv_serror_rate、srv_rerror_rate、srv_diff_host_rate這4個特征是same service特征,前提都是與當前連接具有相同服務的連接。
Table 3: Traffic features computed using a two-second time window.
表 3:基於時間的網絡流量統計特征
基於主機的網絡流量統計特征
feature name description type
dst_host_count 前100個連接中,與當前連接具有相同目標主機的連接數
[0 ~ 255] 連續
dst_host_srv_count 前100個連接中,與當前連接具有相同目標主機相同服務的連接數
[0 ~ 255] 連續
dst_host_same_srv_rate 前100個連接中,與當前連接具有相同目標主機相同服務的連接所占的百分比
[0.00 ~ 1.00] 連續
dst_host_diff_srv_rate 前100個連接中,與當前連接具有相同目標主機不同服務的連接所占的百分比
[0.00 ~ 1.00] 連續
dst_host_same_src_port_rate 前100個連接中,與當前連接具有相同目標主機相同源端口的連接所占的百分比
[0.00 ~ 1.00] 連續
dst_host_srv_diff_host_rate 前100個連接中,與當前連接具有相同目標主機相同服務的連接中,與當前連接具有不同源主機的連接所占的百分比
[0.00 ~ 1.00] 連續
dst_host_serror_rate 前100個連接中,與當前連接具有相同目標主機的連接中,出現SYN錯誤的連接所占的百分比
[0.00 ~ 1.00] 連續
dst_host_srv_serror_rate 前100個連接中,與當前連接具有相同目標主機相同服務的連接中,出現SYN錯誤的連接所占的百分比
[0.00 ~ 1.00] 連續
dst_host_rerror_rate 前100個連接中,與當前連接具有相同目標主機的連接中,出現REJ錯誤的連接所占的百分比
[0.00 ~ 1.00] 連續
dst_host_srv_rerror_rate 前100個連接中,與當前連接具有相同目標主機相同服務的連接中,出現REJ錯誤的連接所占的百分比
[0.00 ~ 1.00] 連續
表 4:基於主機的網絡流量統計特征(KDD99官網的task部分沒找到對應表格)
其它
KDD99在研究者當中十分流行,研究者也對其本身做了很多工作:
[*]減少特征數量,從最初的41個特征中選擇最有用的特征
[*]指出了KDD99的不足之處
KDD99面臨不平衡的分類方法問題。測試集和訓練集的概率分布是不同的,由於在訓練集中加入新的攻擊,攻擊和正常流量的類別的平衡會被打破。[?]
數據集太老了,可能存在過時的問題
有研究表明,該數據集存在導致對異常檢測性能的過高估計的可能性
參考資料
[1]. CHAABOUNI N, MOSBAH M, ZEMMARI A, et al. Network Intrusion Detection for IoT Security Based on Learning Techniques [J]. Ieee Communications Surveys and Tutorials, 2019, 21(3): 2671-701.
[2]. KDD Cup 1999 Data
[3]. KDD99數據集與NSL-KDD數據集介紹 BTW: 這篇博客對 KDD99 和 NSL-KDD 寫的很詳細
[4]. Song J, Takakura H, Okabe Y. Description of kyoto university benchmark data[J]. Available at link: http://www.takakura.com/Kyoto_data/BenchmarkData-Description-v5.pdf [Accessed on 15 March 2016], 2006.
[5]. Özgür A, Erdem H. A review of KDD99 dataset usage in intrusion detection and machine learning between 2010 and 2015[J]. PeerJ Preprints, 2016, 4: e1954v1.
————————————————
版權聲明:本文為CSDN博主「Monrain7026」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/qq_33949991/article/details/114446677