Figure 1.
Typical procedure of the session-feature-based-NIDS to process the session.
Figure 2.
Proposed incremental classification for a session using LSTM.
Figure 3.
Proposed system architecture composed of two-stage LSTM and DNN.
Figure 4.
Comparison of intrusion detection rates for each NIDS using each dataset. (a) ISCXIDS2012; (b) CIC-IDS2017.
Figure 5.
Confusion matrix for each NIDS using ISCXIDS2012. (a) CNN; (b) DNN; (c) HAST-I; (d) Proposed.
Figure 6.
Confusion matrix for each NIDS using CIC-IDS2017. (a) CNN; (b) DNN; (c) HAST-I; (d) Proposed.
Table 1.
ISCXIDS 2012 feature list showing ‘act’: active, ‘avg’: average, ‘blk’: block, ‘bwd’: backward, ‘byts’: bytes, ‘cnt’: count, ‘CWR’: congestion window reduced flag, ‘dst’: destination, ‘ECE’: explicit congestion notification for echo flag, ‘fwd’: forward, ‘IAT’: inter-arrival-time, ‘init’: initial, ‘len’: length, ‘pkt’: packet, ‘PSH’: push flag, ‘RST’: reset flag, ‘seg’: segment, ‘src’: source, ‘std’: standard deviation, ‘tot’: total, ‘URG’: urgent flag, ‘var’: variance, ‘win’: window.
Table 1.
ISCXIDS 2012 feature list showing ‘act’: active, ‘avg’: average, ‘blk’: block, ‘bwd’: backward, ‘byts’: bytes, ‘cnt’: count, ‘CWR’: congestion window reduced flag, ‘dst’: destination, ‘ECE’: explicit congestion notification for echo flag, ‘fwd’: forward, ‘IAT’: inter-arrival-time, ‘init’: initial, ‘len’: length, ‘pkt’: packet, ‘PSH’: push flag, ‘RST’: reset flag, ‘seg’: segment, ‘src’: source, ‘std’: standard deviation, ‘tot’: total, ‘URG’: urgent flag, ‘var’: variance, ‘win’: window.
No. | Name | No. | Name | No. | Name | No. | Name | No. | Name |
---|
1 | Src IP | 18 | Bwd Pkt Len Max | 35 | Bwd IAT Std | 52 | SYN Flag Cnt | 69 | Subflow Fwd Pkts |
2 | Src Port | 19 | Bwd Pkt Len Min | 36 | Bwd IAT Max | 53 | RST Flag Cnt | 70 | Subflow Fwd Byts |
3 | Dst IP | 20 | Bwd Pkt Len Mean | 37 | Bwd IAT Min | 54 | PSH Flag Cnt | 71 | Subflow Bwd Pkts |
4 | Dst Port | 21 | Bwd Pkt Len Std | 38 | Fwd PSH Flags | 55 | ACK Flag Cnt | 72 | Subflow Bwd Byts |
5 | Protocol_HOPOPT | 22 | Flow Byts/s | 39 | Bwd PSH Flags | 56 | URG Flag Cnt | 73 | Init Fwd Win Byts |
6 | Protocol_TCP | 23 | Flow Pkts/s | 40 | Fwd URG Flags | 57 | CWE Flag Count | 74 | Init Bwd Win Byts |
7 | Protocol_UDP | 24 | Flow IAT Mean | 41 | Bwd URG Flags | 58 | ECE Flag Cnt | 75 | Fwd Act Data Pkts |
8 | Timestamp | 25 | Flow IAT Std | 42 | Fwd Header Len | 59 | Down/Up Ratio | 76 | Fwd Seg Size Min |
9 | Flow Duration | 26 | Flow IAT Max | 43 | Bwd Header Len | 60 | Pkt Size Avg | 77 | Active Mean |
10 | Tot Fwd Pkts | 27 | Flow IAT Min | 44 | Fwd Pkts/s | 61 | Fwd Seg Size Avg | 78 | Active Std |
11 | Tot Bwd Pkts | 28 | Fwd IAT Tot | 45 | Bwd Pkts/s | 62 | Bwd Seg Size Avg | 79 | Active Max |
12 | TotLen Fwd Pkts | 29 | Fwd IAT Mean | 46 | Pkt Len Min | 63 | Fwd Byts/b Avg | 80 | Active Min |
13 | TotLen Bwd Pkts | 30 | Fwd IAT Std | 47 | Pkt Len Max | 64 | Fwd Pkts/b Avg | 81 | Idle Mean |
14 | Fwd Pkt Len Max | 31 | Fwd IAT Max | 48 | Pkt Len Mean | 65 | Fwd Blk Rate Avg | 82 | Idle Std |
15 | Fwd Pkt Len Min | 32 | Fwd IAT Min | 49 | Pkt Len Std | 66 | Bwd Byts/b Avg | 83 | Idle Max |
16 | Fwd Pkt Len Mean | 33 | Bwd IAT Tot | 50 | Pkt Len Var | 67 | Bwd Pkts/b Avg | 84 | Idle Min |
17 | Fwd Pkt Len Std | 34 | Bwd IAT Mean | 51 | FIN Flag Cnt | 68 | Bwd Blk Rate Avg | 85 | Label |
Table 2.
Advantages and disadvantages of session-feature-based NIDS.
Advantages | - ▪
Intrusion detection is performed at every session termination instead of every received packet, reducing computational overhead required for detection. - ▪
Robust against loss of some packets.
|
Disadvantages | - ▪
Huge memory requirement to store received packets per session. - ▪
The NIDS developer must select and design the feature type. - ▪
When a new attack emerges, it is likely that a new feature type will have to be designed. - ▪
Detection delay occurs due to waiting for the maximum inter-arrival time to recognize session termination. - ▪
Vulnerable to NIDS detection bypass attacks through repetitive transmission of packets by an attacker to change important session feature values.
|
Table 3.
Advantages and disadvantages of packet-feature-based NIDS.
Advantages | - ▪
When a new attack emerges, it can automatically create features to detect the new attack, eliminating the need for NIDS developer intervention. - ▪
Intrusion detection is possible before session termination. - ▪
When it handles long sessions, there is no detection delay due to the maximum inter-arrival time for end-of-session recognition. - ▪
It supports deep packet inspection. - ▪
Detection rate is very high.
|
Disadvantages | - ▪
High memory requirement to store some packet data per session. - ▪
Patterns located in packet payloads that are not used as features cannot be detected.
|
Table 4.
Recurrently creating selected features without storing any packet data. Fifteen features are created recursively using seven states in addition to fifteen features. For example, for the Flow Duration feature, ‘old Flow Duration + new Flow IAT’ implies that a new Flow Duration value can be obtained by adding the updated Flow IAT value to the previous Flow Duration, when a new packet belonging to the current session is received.
Table 4.
Recurrently creating selected features without storing any packet data. Fifteen features are created recursively using seven states in addition to fifteen features. For example, for the Flow Duration feature, ‘old Flow Duration + new Flow IAT’ implies that a new Flow Duration value can be obtained by adding the updated Flow IAT value to the previous Flow Duration, when a new packet belonging to the current session is received.
Label | Type | Recurrent Expression |
---|
Last Flow Timestamp | State | current packet timestamp |
Flow IAT | State | new Last Flow Timestamp—old Last Flow Timestamp |
Fwd Last Timestamp | State | new current packet timestamp if the current packet is sent forwards |
Bwd Last Timestamp | State | new current packet timestamp if the current packet is sent backwards |
Fwd IAT | State | new Last Flow Timestamp—old Fwd Last Timestamp if the current packet is sent forwards |
Flow IAT2 Mean | State | (old Flow IAT2 Mean × old Tot Pkts + new Flow IAT2)/new Tot Pkts |
Pkt Len2 Mean | State | ((old Tot Fwd Pkts + old Tot Bwd Pkts) × old Pkt Len2 Mean + packet size2)/(new Tot Fwd Pkts + new Tot Bwd Pkts) |
Flow Duration | Feature | old Flow Duration + new Flow IAT |
Tot Fwd Pkts | Feature | old Tot Fwd Pkts + 1 if the current packet is sent forwards |
Tot Bwd Pkts | Feature | old Tot Bwd Pkts + 1 if the current packet is sent backwards |
Flow IAT Mean | Feature | (old Flow IAT Mean × old Tot Pkts + new Flow IAT)/new Tot Pkts |
TotLen Fwd Pkts | Feature | old TotLen Fwd Pkts + the packet size if the current packet is sent forwards |
TotLen Bwd Pkts | Feature | old TotLen Bwd Pkts + the packet size if the current packet is sent backwards |
Pkt Len Mean | Feature | (new TotLen Fwd Pkts + new TotLen Bwd Pkts)/(new Tot Fwd Pkts + new Tot Bwd Pkts) |
Flow IAT Std | Feature | sqrt(new Flow IAT2 Mean − new Flow IAT Mean2) |
Fwd Pkts/s | Feature | new Tot Fwd Pkts/(new Flow Duration − (new Last Flow Timestamp − new Fwd Last Timestamp) |
Flow Pkts/s | Feature | (new Tot Fwd Pkts + new Tot Bwd Pkts)/new Flow Duration |
Fwd IAT Mean | Feature | (old Fwd IAT Mean × old Tot Fwd Pkts + new Fwd IAT)/new Tot Fwd Pkts if current packet is sent forwards |
Pkt Len Std | Feature | sqrt(new Pkt Len2 Mean − new Pkt Len Mean2) |
Bwd Pkts/s | Feature | new Tot Bwd Pkts/(new Flow Duration − (new Last Flow Timestamp − new Fwd Last Timestamp) |
Flow IAT Mean | Feature | (old Flow IAT Mean × old Tot Pkts + new Flow IAT)/new Tot Pkts |
Flow IAT Max | Feature | max(old Flow IAT, new Flow IAT) |
Table 8.
Average memory size in bytes for storing the packet data needed to create the feature. Assume that only initial six packets are used for each session and only 100 bytes of each packet are used to create packet-based features.
Dataset | Session-Feature-Based | Packet-Feature-Based | Proposed |
---|
ISCXIDS2012 | 21,066 | 357 | 296 (196 + 100) |
CIC-IDS2017 | 5791 | 418 | 296 (196 + 100) |
Table 9.
The average number of packets required to detect an intrusion per session.
Dataset | Session-Feature-Based | Proposed |
---|
ISCXIDS2012 | 32.92 | 3.6 |
CIC-IDS2017 | 9.04 | 4.1 |