# Launching Adversarial Attacks against Network Intrusion Detection Systems for IoT
## 2 Background  
### Intrusion Detection Systems  
There are three popular approaches to protect networks. The first approach is to detect an attack by setting up alert triggers, for example, once a threshold is exceeded. Such a detection strategy informs the administrators that an attack occurs but does not prevent it. The second approach is to prevent an attack by setting protection mechanisms that deny the attack from occurring, which raises a problem if a legitimate action is deemed illegitimate, resulting in a loss of service availability. The final approach is to block an attack, which entails setting protections in place in retrospect of the attack, preventing or detecting the attack when it next occurs. In the latter two approaches, the IDS is configured as an Intrusion Prevention System (IPS) [5].  
There are two locations on which IDS can be placed depending on the sources of information; firstly, sensors can be placed on a Host system (HIDS) and secondly, sensors can be placed on the Network (NIDS) [10; 22]. The HIDS monitors a single host's activity such as running processes, system calls, or code in memory [3; 10; 22]. The NIDS monitors the network traffic by performing packet inspection to check protocol usage and their services or IP addresses of communication partners [3; 10; 22]. NIDS could commonly be placed at the gateway of ingress or egress traffic at the organisation network perimeter.  
Therefore, it would be possible to observe all traffic from external adversaries [23]. An IDS is an essential tool used to identify intrusions; therefore, one of the most widespread problems in cybersecurity is creating sophisticated methods and generating effective rules for the NIDS to be beneficial [1]. An IDS's success is often rated according to their accuracy values when testing controlled data of the known legitimate and illegitimate activity. The accuracy is made up of four metrics [24, 25], and are used when calculating the accuracy seen in Equation (1). We have True Positive (_TP_) when an attack is correctly identified and a True Negative (_TN_) when a benign incident is correctly identified. When a benign incident is identified as an attack, we have a False Positive (_FP_), and when an attack is identified as a benign incident, we have a False Negative (_FN_).  
\[Accuracy=\frac{(TP+TN)}{(TP+TN+FP+FN)} \tag{1}\]  
\[True\ Positive\ Rate=\frac{TP}{(TP+FN)} \tag{2}\]  
\[True\ Negative\ Rate=\frac{TN}{(TN+FP)} \tag{3}\]  
\[False\ Positive\ Rate=\frac{FP}{(FP+TN)} \tag{4}\]  
\[False\ Negative\ Rate=\frac{FN}{(TP+FN)} \tag{5}\]  
An IDS can be classified based on its detection method into: (i) knowledge-based IDS, where the detection is based on static knowledge, (ii) behaviour-based IDS, where the detection is based on dynamic behaviour that has been monitored, and (iii) hybrid IDS, which is a combination of (i) and (ii) [10]. More specifically, a knowledge-based IDS, also known as signature-based, is a system in which alerts are triggered based on a list of pre-determined knowledge, such as hashes, sequence of bytes, etc. A behaviour-based IDS, also known as anomaly-based, takes on the principle of having a normal activity model, triggering alerts when anomalous activity is detected. Creating a baseline of normal activity can sometimes be inaccurate if there is malicious activity captured within the baseline. Moreover, a representative normal activity baseline is unlikely possible with an ever-changing and expanding network [5, 26]. A behaviour-based IDS is capable of detecting zero-day attacks which have not yet been disclosed to the public [10]. However, due to the nature of alerting all deviations from normal activity, they are known to produce high FPRs [10, 26]. Thirdly there is a hybrid IDS that makes use of both knowledge-based IDS and behaviour-based IDS. A hybrid-based IDS can detect both zero-day as well as known attacks [10].