KDD99数据集的特征(Features)介绍

KDD99数据集的特征(Features)介绍

首发于我的博客:寒山雨的个人博客

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 namedescriptiontype
durationlength (number of seconds) of the connection
连接的持续时间,以秒(s)为单位
[0 ~ 58329]
它的定义是从TCP连接以3次握手建立算起,到FIN/ACK连接结束为止的时间;若为UDP协议类型,则将每个UDP数据包作为一条连接。(数据集中出现大量的duration=0 的情况,是因为该条连接的持续时间不足1秒.)
continuous
连续
protocol_typetype of the protocol, e.g. tcp, udp, etc.
协议类型,此数据集中有三种:
TCP, UDP, ICMP
discrete
离散
servicenetwork 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_bytesnumber of data bytes from source to destination
从源主机到目的主机数据的字节数
[0 ~ 1379963888]
continuous
连续
dst_bytesnumber of data bytes from destination to source
从目的主机到源主机数据的字节数
[0 ~ 1309937401]
continuous
连续
flagnormal 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
离散
land1 if connection is from/to the same host/port; 0 otherwise
1: 连接来自/到同一主机/端口
0: 其它
discrete
离散
wrong_fragmentnumber of ``wrong’’ fragments
“错误”片段的数量
[0 ~ 3]
continuous
连续
urgentnumber of urgent packets
urgent加急包数量
[0 ~ 14]
continuous
连续

Table 1: Basic features of individual TCP connections.

表1:TCP连接的基本特征

TCP连接的内容特征

feature namedescriptiontype
hotnumber of ``hot’’ indicators
访问系统敏感文件和目录的次数
[0 ~ 101]
例如访问系统目录,建立或执行程序等
continuous
连续
num_failed_loginsnumber of failed login attempts
登录尝试失败的次数。
[0 ~ 5]
continuous
连续
logged_in1 if successfully logged in
0 otherwise
1:成功登录
0:其它
discrete
离散
num_compromisednumber of ``compromised’’ conditions
’compromised’条件出现的次数
[0 ~ 7479]
continuous
连续
root_shell1 if root shell is obtained; 0 otherwise
1:获得root shell
0:其它
discrete
离散
su_attempted1 if ``su root’’ command attempted; 0 otherwise
1:出现’su root’
0:其它
discrete
离散
num_rootnumber of ``root’’ accesses
root用户访问次数
[0 ~ 7468]
continuous
连续
num_file_creationsnumber of file creation operations
文件创建操作的次数
[0 ~ 100]
continuous
连续
num_shellsnumber of shell prompts
使用shell命令的次数
[0 ~ 5]
continuous
连续
num_access_filesnumber of operations on access control files
访问控制文件的次数
[0 ~ 9]
continuous
连续
num_outbound_cmdsnumber of outbound commands in an ftp session
一个FTP会话种出现连接的次数
数据集种这一特征出现次数为0
continuous
连续
is_hot_login1 if the login belongs to the ``hot’’ list; 0 otherwise
1:登录属于’hot’列表
0:其它
如超级用户或管理员登录
discrete
离散
is_guest_login1 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 namedescriptiontype
countnumber 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_countnumber 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 namedescriptiontype
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的不足之处
    1. KDD99面临不平衡的分类方法问题。测试集和训练集的概率分布是不同的,由于在训练集中加入新的攻击,攻击和正常流量的类别的平衡会被打破。[?]
    2. 数据集太老了,可能存在过时的问题
    3. 有研究表明,该数据集存在导致对异常检测性能的过高估计的可能性

参考资料

[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.

  • 13
    点赞
  • 69
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: KDD99数据集是一个广泛使用的数据集,用于网络入侵检测方面的研究。有多种方式可以下载这个数据集。 首先,可以通过以下网址访问数据集:http://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html。该网址提供了一些文件供下载,包括包含攻击类型和特征数据集文件(kddcup.data_10_percent.gz 和 kddcup.data.gz)以及攻击类型的描述文件(kddcup.names)等。 其次,您也可以通过其他网站下载该数据集,例如:https://www.unb.ca/cic/datasets/nsl.html或https://www.kaggle.com/karaage0703/kddcup99。这些网站提供了与前面提到的相同的文件,但可能会有其他附加功能。 最后,使用工具如Wget或Curl从命令行下载数据集是另一种可行方法。这些工具使您可以通过执行命令来自动下载文件,例如: wget http://kdd.ics.uci.edu/databases/kddcup99/kddcup.data_10_percent.gz 无论您使用哪种方式,下载数据集后,建议您花时间了解该数据集的背景和特征,以便更好地使用它进行网络入侵检测研究。 ### 回答2: KDD99数据集是一个用于入侵检测的常用数据集,它包含了网络连接数据。要下载KDD99数据集,可以按照以下步骤进行: 1. 打开互联网浏览器,进入KDD99数据集的官方网站。可以在搜索引擎中搜索"KDD99数据集官方网站"来找到。 2. 在官方网站上寻找数据集下载链接。通常,官方网站会提供数据集的下载链接或指向其他网站,因此你可以下载到KDD99数据集的文件。 3. 点击下载链接或者跳转到指定的下载页面。确认下载链接是否有效并可以直接访问。 4. 根据数据集的大小选择下载方式。KDD99数据集非常大,因此可能提供分割成多个文件的下载选项或压缩文件下载选项。如果存在压缩文件,可以优先选择下载压缩文件并在本地解压。 5. 点击下载按钮或链接,等待数据集文件下载完成。下载时间可能因互联网连接速度而异。 6. 下载完成后,确认文件是否完整。可以通过检查文件大小或文件哈希值等方式验证文件的完整性。 7. 如果下载的文件是压缩文件,在本地使用解压工具将其解压。 8. 解压后,你将获得KDD99数据集的文件和文件夹。其中,可能包含训练集、测试集以及其他数据文件。 总之,下载KDD99数据集可以通过访问官方网站,找到数据集的下载链接,选择下载方式,下载文件,验证文件完整性,解压文件,最终获取到KDD99数据集的文件和文件夹。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值