草庐IT

快速了解NSL-KDD数据集

迷人的派大星 2023-05-21 原文

NSL-KDD 数据集是著名的KDD’99数据集的修订版本,该数据集由四个子数据集组成:KDDTest+、KDDTest-21、KDDTrain+、KDDTrain+_20Percent。其中KDDTest-21 和 KDDTrain+_20Percent 是 KDDTrain+ 和 KDDTest+ 的子集。数据集每条记录包含 43 个特征,其中 41 个特征指的是流量输入本身,最后两个是标签(正常或攻击)和分数(流量输入本身的严重性)。

数据集中存在 4 种不同类型的攻击:拒绝服务 (DoS)、探测、用户到根 (U2R) 和远程到本地 (R2L)。每种攻击的简要说明如下:

  • DoS 是一种尝试关闭进出目标系统的流量的攻击。 IDS被系统无法处理的异常流量淹没,并关闭以保护自己。这可以防止正常流量访问网络。这方面的一个例子可能是在线零售商在大促销的一天被大量在线订单淹没,并且由于网络无法处理所有请求,它将关闭阻止付费客户购买任何东西。这是数据集中最常见的攻击。
  • 探测或监视是一种尝试从网络获取信息的攻击。这里的目标是像小偷一样窃取重要信息,无论是关于客户的个人信息还是银行信息。
  • U2R 是一种从普通用户帐户开始并尝试以超级用户 (root) 身份访问系统或网络的攻击。攻击者试图利用系统中的漏洞来获得 root权限/访问权限。
  • R2L 是一种尝试获得对远程机器的本地访问权限的攻击。攻击者没有对系统/网络的本地访问权限,并试图以“破解”他们的方式进入网络。

每种攻击的不同子类的细分如下表:

每种攻击类型的数据分布如下:

数据集中提供的特征可以分为四类:内在、内容、基于主机和基于时间。以下是对不同类别功能的描述:

  • 内在特征可以从数据包的包头中获得,无需查看有效负载本身,保存有关数据包的基本信息。此类别包含在特征 1-9。
  • 内容特征包含有关原始数据包的信息,因为它们是分多个而不是一个发送的。有了这些信息,系统就可以访问有效载荷。此类别包含在特征 10–22。
  • 基于时间的功能在两秒的窗口内对流量输入进行分析,并包含诸如尝试与同一主机建立多少连接等信息。这些特征主要是计数和速率,而不是有关流量输入内容的信息。此类别包含在特征 23–31。
  • 基于主机的功能与基于时间的功能类似,不同之处在于它不是在 2 秒的窗口内分析,而是对一系列连接进行分析(通过 x 个连接向同一主机发出多少请求)。这些功能旨在访问跨度超过两秒窗口时间跨度的攻击。此类别包含在特征 32–41。

下表中可以看到分类特征的可能值的细分。有 3 个可能的协议类型值、60 个可能的服务值和 11 个可能的标志值。

Flag 中的每个值代表一个连接的状态,每个值的解释如下:

每个特征的描述和数据集的细分如下表:

#Feature NameDescriptionTypeValue TypeRanges (Between both train and test)
1DurationLength of time duration of the connectionContinuousIntegers0 - 54451
2Protocol TypeProtocol used in the connectionCategoricalStrings
3ServiceDestination network service usedCategoricalStrings
4FlagStatus of the connection – Normal or ErrorCategoricalStrings
5Src BytesNumber of data bytes transferred from source to destination in single connectionContinuousIntegers0 - 1379963888
6Dst BytesNumber of data bytes transferred from destination to source in single connectionContinuousIntegers0 - 309937401
7LandIf source and destination IP addresses and port numbers are equal then, this variable takes value 1 else 0BinaryIntegers{ 0 , 1 }
8Wrong FragmentTotal number of wrong fragments in this connectionDiscreteIntegers{ 0,1,3 }
9UrgentNumber of urgent packets in this connection. Urgent packets are packets with the urgent bit activatedDiscreteIntegers0 - 3
10HotNumber of “hot‟ indicators in the content such as: entering a system directory, creating programs and executing programsContinuousIntegers0 - 101
11Num Failed LoginsCount of failed login attemptsContinuousIntegers0 - 4
12Logged InLogin Status : 1 if successfully logged in; 0 otherwiseBinaryIntegers{ 0 , 1 }
13Num CompromisedNumber of "compromised” conditionsContinuousIntegers0 - 7479
14Root Shell1 if root shell is obtained; 0 otherwiseBinaryIntegers{ 0 , 1 }
15Su Attempted1 if "su root’’ command attempted or used; 0 otherwiseDiscrete (Dataset contains ‘2’ value)Integers0 - 2
16Num RootNumber of "root’’ accesses or number of operations performed as a root in the connectionContinuousIntegers0 - 7468
17Num File CreationsNumber of file creation operations in the connectionContinuousIntegers0 - 100
18Num ShellsNumber of shell promptsContinuousIntegers0 - 2
19Num Access FilesNumber of operations on access control filesContinuousIntegers0 - 9
20Num Outbound CmdsNumber of outbound commands in an ftp sessionContinuousIntegers{ 0 }
21Is Hot Logins1 if the login belongs to the "hot’’ list i.e., root or admin; else 0BinaryIntegers{ 0 , 1 }
22Is Guest Login1 if the login is a "guest’’ login; 0 otherwiseBinaryIntegers{ 0 , 1 }
23CountNumber of connections to the same destination host as the current connection in the past two secondsDiscreteIntegers0 - 511
24Srv CountNumber of connections to the same service (port number) as the current connection in the past two secondsDiscreteIntegers0 - 511
25Serror RateThe percentage of connections that have activated the flag (4) s0, s1, s2 or s3, among the connections aggregated in count (23)DiscreteFloats (hundredths of a decimal)0 - 1
26Srv Serror RateThe percentage of connections that have activated the flag (4) s0, s1, s2 or s3, among the connections aggregated in srv_count (24)DiscreteFloats (hundredths of a decimal)0 - 1
27Rerror RateThe percentage of connections that have activated the flag (4) REJ, among the connections aggregated in count (23)DiscreteFloats (hundredths of a decimal)0 - 1
28Srv Rerror RateThe percentage of connections that have activated the flag (4) REJ, among the connections aggregated in srv_count (24)DiscreteFloats (hundredths of a decimal)0 - 1
29Same Srv RateThe percentage of connections that were to the same service, among the connections aggregated in count (23)DiscreteFloats (hundredths of a decimal)0 - 1
30Diff Srv RateThe percentage of connections that were to different services, among the connections aggregated in count (23)DiscreteFloats (hundredths of a decimal)0 - 1
31Srv Diff Host RateThe percentage of connections that were to different destination machines among the connections aggregated in srv_count (24)DiscreteFloats (hundredths of a decimal)0 - 1
32Dst Host CountNumber of connections having the same destination host IP addressDiscreteIntegers0 - 255
33Dst Host Srv CountNumber of connections having the same port numberDiscreteIntegers0 - 255
34Dst Host Same Srv RateThe percentage of connections that were to different services, among the connections aggregated in dst_host_count (32)DiscreteFloats (hundredths of a decimal)0 - 1
35Dst Host Diff Srv RateThe percentage of connections that were to different services, among the connections aggregated in dst_host_count (32)DiscreteFloats (hundredths of a decimal)0 - 1
36Dst Host Same Src Port RateThe percentage of connections that were to the same source port, among the connections aggregated in dst_host_srv_count (33)DiscreteFloats (hundredths of a decimal)0 - 1
37Dst Host Srv Diff Host RateThe percentage of connections that were to different destination machines, among the connections aggregated in dst_host_srv_count (33)DiscreteFloats (hundredths of a decimal)0 - 1
38Dst Host Serror RateThe percentage of connections that have activated the flag (4) s0, s1, s2 or s3, among the connections aggregated in dst_host_count (32)DiscreteFloats (hundredths of a decimal)0 - 1
39Dst Host Srv Serror RateThe percent of connections that have activated the flag (4) s0, s1, s2 or s3, among the connections aggregated in dst_host_srv_count (33)DiscreteFloats (hundredths of a decimal)0 - 1
40Dst Host Rerror RateThe percentage of connections that have activated the flag (4) REJ, among the connections aggregated in dst_host_count (32)DiscreteFloats (hundredths of a decimal)0 - 1
41Dst Host Srv Rerror RateThe percentage of connections that have activated the flag (4) REJ, among the connections aggregated in dst_host_srv_count (33)DiscreteFloats (hundredths of a decimal)0 - 1
42ClassClassification of the traffic inputCategoricalStrings
43Difficulty LevelDifficulty levelDiscreteIntegers0 - 21

数据集下载链接:https://www.unb.ca/cic/datasets/nsl.html
数据集详细介绍请参考:https://towardsdatascience.com/a-deeper-dive-into-the-nsl-kdd-data-set-15c753364657

有关快速了解NSL-KDD数据集的更多相关文章

  1. ruby - 解析 RDFa、微数据等的最佳方式是什么,使用统一的模式/词汇(例如 schema.org)存储和显示信息 - 2

    我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i

  2. ruby - Ruby 有 `Pair` 数据类型吗? - 2

    有时我需要处理键/值数据。我不喜欢使用数组,因为它们在大小上没有限制(很容易不小心添加超过2个项目,而且您最终需要稍后验证大小)。此外,0和1的索引变成了魔数(MagicNumber),并且在传达含义方面做得很差(“当我说0时,我的意思是head...”)。散列也不合适,因为可能会不小心添加额外的条目。我写了下面的类来解决这个问题:classPairattr_accessor:head,:taildefinitialize(h,t)@head,@tail=h,tendend它工作得很好并且解决了问题,但我很想知道:Ruby标准库是否已经带有这样一个类? 最佳

  3. ruby - 我如何添加二进制数据来遏制 POST - 2

    我正在尝试使用Curbgem执行以下POST以解析云curl-XPOST\-H"X-Parse-Application-Id:PARSE_APP_ID"\-H"X-Parse-REST-API-Key:PARSE_API_KEY"\-H"Content-Type:image/jpeg"\--data-binary'@myPicture.jpg'\https://api.parse.com/1/files/pic.jpg用这个:curl=Curl::Easy.new("https://api.parse.com/1/files/lion.jpg")curl.multipart_form_

  4. 世界前沿3D开发引擎HOOPS全面讲解——集3D数据读取、3D图形渲染、3D数据发布于一体的全新3D应用开发工具 - 2

    无论您是想搭建桌面端、WEB端或者移动端APP应用,HOOPSPlatform组件都可以为您提供弹性的3D集成架构,同时,由工业领域3D技术专家组成的HOOPS技术团队也能为您提供技术支持服务。如果您的客户期望有一种在多个平台(桌面/WEB/APP,而且某些客户端是“瘦”客户端)快速、方便地将数据接入到3D应用系统的解决方案,并且当访问数据时,在各个平台上的性能和用户体验保持一致,HOOPSPlatform将帮助您完成。利用HOOPSPlatform,您可以开发在任何环境下的3D基础应用架构。HOOPSPlatform可以帮您打造3D创新型产品,HOOPSSDK包含的技术有:快速且准确的CAD

  5. FOHEART H1数据手套驱动Optitrack光学动捕双手运动(Unity3D) - 2

    本教程将在Unity3D中混合Optitrack与数据手套的数据流,在人体运动的基础上,添加双手手指部分的运动。双手手背的角度仍由Optitrack提供,数据手套提供双手手指的角度。 01  客户端软件分别安装MotiveBody与MotionVenus并校准人体与数据手套。MotiveBodyMotionVenus数据手套使用、校准流程参照:https://gitee.com/foheart_1/foheart-h1-data-summary.git02  数据转发打开MotiveBody软件的Streaming,开始向Unity3D广播数据;MotionVenus中设置->选项选择Unit

  6. 使用canal同步MySQL数据到ES - 2

    文章目录一、概述简介原理模块二、配置Mysql使用版本环境要求1.操作系统2.mysql要求三、配置canal-server离线下载在线下载上传解压修改配置单机配置集群配置分库分表配置1.修改全局配置2.实例配置垂直分库水平分库3.修改group-instance.xml4.启动监听四、配置canal-adapter1修改启动配置2配置映射文件3启动ES数据同步查询所有订阅同步数据同步开关启动4.验证五、配置canal-admin一、概述简介canal是Alibaba旗下的一款开源项目,Java开发。基于数据库增量日志解析,提供增量数据订阅&消费。Git地址:https://github.co

  7. ruby-on-rails - 创建 ruby​​ 数据库时惰性符号绑定(bind)失败 - 2

    我正在尝试在Rails上安装ruby​​,到目前为止一切都已安装,但是当我尝试使用rakedb:create创建数据库时,我收到一个奇怪的错误:dyld:lazysymbolbindingfailed:Symbolnotfound:_mysql_get_client_infoReferencedfrom:/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundleExpectedin:flatnamespacedyld:Symbolnotfound:_mysql_get_client_infoReferencedf

  8. STM32读取串口传感器数据(颗粒物传感器,主动上传) - 2

    文章目录1.开发板选择*用到的资源2.串口通信(个人理解)3.代码分析(注释比较详细)1.主函数2.串口1配置3.串口2配置以及中断函数4.注意问题5.源码链接1.开发板选择我用的是STM32F103RCT6的板子,不过代码大概在F103系列的板子上都可以运行,我试过在野火103的霸道板上也可以,主要看一下串口对应的引脚一不一样就行了,不一样的就更改一下。*用到的资源keil5软件这里用到了两个串口资源,采集数据一个,串口通信一个,板子对应引脚如下:串口1,TX:PA9,RX:PA10串口2,TX:PA2,RX:PA32.串口通信(个人理解)我就从串口采集传感器数据这个过程说一下我自己的理解,

  9. SPI接收数据异常问题总结 - 2

    SPI接收数据左移一位问题目录SPI接收数据左移一位问题一、问题描述二、问题分析三、探究原理四、经验总结最近在工作在学习调试SPI的过程中遇到一个问题——接收数据整体向左移了一位(1bit)。SPI数据收发是数据交换,因此接收数据时从第二个字节开始才是有效数据,也就是数据整体向右移一个字节(1byte)。请教前辈之后也没有得到解决,通过在网上查阅前人经验终于解决问题,所以写一个避坑经验总结。实际背景:MCU与一款芯片使用spi通信,MCU作为主机,芯片作为从机。这款芯片采用的是它规定的六线SPI,多了两根线:RDY和INT,这样从机就可以主动请求主机给主机发送数据了。一、问题描述根据从机芯片手

  10. 微信小程序通过字典表匹配对应数据 - 2

    前言一般来说,前端根据后台返回code码展示对应内容只需要在前台判断code值展示对应的内容即可,但要是匹配的code码比较多或者多个页面用到时,为了便于后期维护,后台就会使用字典表让前端匹配,下面我将在微信小程序中通过wxs的方法实现这个操作。为什么要使用wxs?{{method(a,b)}}可以看到,上述代码是一个调用方法传值的操作,在vue中很常见,多用于数据之间的转换,但由于微信小程序诸多限制的原因,你并不能优雅的这样操作,可能有人会说,为什么不用if判断实现呢?但是if判断的局限性在于如果存在数据量过大时,大量重复性操作和if判断会让你的代码显得异常冗余。wxswxs相当于是一个独立

随机推荐