Analytical Model for Mitigating Primary User Emulation Attack using Hypothesis Testing in Cognitive Radio Networks

: The Cognitive Radio (CR) is the key technology to deal with spectrum scarcity by allowing unlicensed CR users to coexist with existing users in licensed spectrum bands without interfering with binding communications. Cognitive technology provides the spectrum ability to be shared with licensed networks. This radio system can adjust its transmitter and recipient parameters on the basis of interaction with the current conditions in the environment. Due to this flexibility cognitive radios are exploring different types of threats and security attacks. In this paper, we focus primarily on the Primary User Emulation Attack (PUEA) which is a major attack in the cognitive radio network. PUEA is similar to a Denial-of-service attack that can seriously disrupt the spectrum sensing process and deny other legitimate secondary users to access the available spectrum. We proposed a Neyman-Pearson composite hypothesis test (NPCHT) based analytical model to study the impact of PUEA in a fading wireless communication environment. Simulation results show that the proposed techniques can substantially reduce the impact of the malicious attack on the network.


Introduction
Recent advances in wireless communication have contributed to the challenge of rising spectrum scarcity.Owing to the growing demand for new mobile technologies, the allocated frequency bandwidth has become increasingly scarce.A significant amount of available frequency spectrum has been used occasionally, causing underutilization of the spectrum.Cognitive Radio technology offers a potential approach to the problems of spectrum scarcity in wireless networks (Mitola, 1999).The CR network facilitates the effective use of the limited frequency range.Licensed users or primary users are classified in cognitive radio jargon as user with a right to use the spectrum band, whereas non-licensed and secondary users are identified as users who can use a spectrum for the moment not used by authorized users without interruption.Around the same time, more attention is paid to the safety issues of cognitive radio as the intrinsic properties of CR networks present new challenges for wireless communications.
In this paper work, we mainly concerted the physical layer attack that is primary user emulation (PUE) attack, which is a sever attack and can degrade the performance of the CR network.In a CR network, the authorized user is being referred to as the primary user (PU) to have the highest priority over unauthorized users, which are being called as secondary the users (SU) for utilizing the band of frequencies.Hence, some of the secondary users are taking advantage of this opportunity by imitating as the authorized user characteristics, to utilize a frequency band with priority over other users (Chen et.al., 2008)-(Rajesh Sharma et.al., 2015).This scenario is referred as PUEA, which is pictorially illustrated in the figure 1.
One of the most extreme attacks is a primary user emulation attack (PUEA), whose objective focuses on the layers of physical CR and MAC.In this attack the malicious node deludes other secondary users by mimicking the transmission features of the incumbent user (PU).It produces a negative threat to the incumbent user, and thwarts other secondary users' use of idle frequency bands.Furthermore, the emulation of the incumbent user signal in multiple channels extends the SU handoff, leading to reduced network performance (Chen et.al., 2008)- (Marinho et.al., 2015).The malicious user (PUE attacker) mimic as a PU and other legitimate SUs considered, this as incumbent primary user.Then they send false statistics to the Fusion Centre, these can increase the probability of false detection.
The rest of the paper is organized as follows: In section II, we gave the comprehensive study of the literature survey.In the section III, we present the system model and all assumptions made to formulate the problem and derive an analytical model of the problem, the PDF of received signal and also use the Neyman-Pearson's Composite Hypothesis Test for investigation.In Section IV presented the simulation results followed by conclusion and future work in section V.An analytical approach based on Fenton's approximation and Markov's inequality was discussed in the study by S. Anand, et.al. (2008), the feasibility of PUEA in CRNs for the fading Wireless environment.This was used to create a lower limit on the probability of productive PUEA.Jin, Anand & Subbulakshmi (2009) devised some composite hypothesis checks based on Neyman-Pearson and sequence likelihood ratio check Wald's were used for the identification of PUEA.In order to calculate the power and density function of probability, the Neyman-Pearsons composite hypothesis test was used to study PUEA's impact on the network in the article by Z. Jin, et.al. (2014).Mahesh Kumar N. et.al. (2020), proposed a detection approach based on transmitter location and modulation technique using Received Signal Strength and cyclostationary feature detection.In this work, we proposed a Neyman-Pearsons Composite Hypothesis Test based mathematical model to study the effect of PUEA on the CRNs.

Probability Density Function of the Received Signal
1.There is no coordination or cooperation between each secondary user in the network.Each secondary user can independently analyze the presence of malicious users.The effect of PUE attack is equal to all the user in the network.2. There are Mu malicious users who are geometrically distributed with a mean Em in the network.3.All the SUs in the network are apart of dp distance from the primary users.4. Both secondary users and MUs are uniformly distributed in the circular gird fashion of radius R, as illustrated in Fig. 2.
5. Each secondary user origin at the axis ( ) ,θ r of a radius R0 termed as an exclusive range from the SU.
There is no malicious users are present within this radius.6.All the users in the network have prior knowledge of the primary user transmitter location.7. The PU transmits with high power denoted as Pt and malicious user power is denoted as Pm.we consider Pt >> Pm and dp >> R. 8. Considered the path loss and log-normal shadow effects (in dB) between transmitter and receiver while traversing the signal.The shadow effect is considered at the SU from the primary user with mean zero and variance σ 2 p and from a malicious user with mean zero and variance σ 2 m.We assumed that the path loss component from the primary user is 2 and from a malicious user is 4. The power density function (PDF) is considered as log-normally distribution values.9.The effect of PUE attack is identical to all the user in the network because there is no communication between the SUs.We assume that the secondary user lies at the origin (x , y coordinates are 0 , 0) and primary user coordinates are ( ) The position of the primary user will differs at each secondary users.
10.We analyze the Probability density function (PDF) of the received signal at any one SU in the network.
In order to find a hypothesis test using Neyman-Pearson criteria, it is vital to obtain the probability density function of the received signal at the SU due to broadcast by the PU and MUs.We considered M malicious users located at origin ( ) where M is randomly distributed variable and 1 Mj .Then the probability of mass function of M is given by where . Each malicious users are uniformly scattered in the angular region within R0 and R. Hence rj and θj are coordinates of the j th malicious user.The probability density function of rj, p(rj) is given by equation ( 2) as where θj is uniformly distributed in (− ,   j).
The received power at the SU from the PU transmitter where  is RV (Random variable) and ( ) . The mean of the primary user is modelled by the Eqn.( 5 () m r P can be estimated as normally log distributed variable and mean and variance can be expressed by using Fenton's approach.The conditional probability (probability density function of () m r P ) of the location of all malicious user can be expressed by the equation ( 8) as where r is the vector with elements r1, r2, ……., rM and μM and  ̂ 2 are expressed as equations ( 9) and ( 10) as ( ) ( ) The probability density function of the received power from all M malicious users, p (m) (x), can be achieved by averaging Eq. ( 8) over r1, r2, ……., rM and is written using the Eqn.(11) as x  be expressed using the Eqns.( 12) & ( 13) as and ( ) ( ) 1 ln 2ln From equations ( 12) and ( 13), the equation ( 11) can be written as  () , can be written as .
where The equation ( 17) can be written as .

Impact of PUEA investigation using Neyman-Pearson Composite Hypothesis (NPCH) Test
Neyman-Pearson Composite Hypothesis Test can be used to distinguish between two hypotheses: • H1 -Primary User transmission, which indicates only PU signal is present.
• H2 -Malicious user transmission, which indicates that PU signal is absent only malicious user signal is present.
In this hypothesis test, each legitimate SU can make out two types of errors that is the probability of false alarm and probability of miss detection as shown in Figure 3.In the Figure 3, where the probability density functions of the received signal can be identified with and without the primary signal.If we want to keep the likelihood of missed detections very low, the likelihood of false alarms increases and this would lead to low spectrum usage.On the other hand, a low probability of false alarms would result in a high probability of missed detection which increases the primary user interference.This trade-off must be looked into carefully.
• False alarm: The SU makes a decision that the transmission is due to a PU but the MU is actually communicating.
• Miss detection: The SU makes a decision that the transmission is due to a MU but the PU is actually communicating.
The NPCH test calculates the PDF of received power at the SUs due to the PU transmitter and also the PDF of received power at the SUs due for the MUs and the division gives the decision variable T as The SU may take the decision of D2 when H1 is true and D1 when H2 is true.These errors based on the decision rule, which is associated with the probability.The probability of miss detection and probability of false alarm are given by the equations ( 27) and ( 28  where  the constraint of the probability and both equations is can also be represented in a shorthand form as:  Here, in the Section-4, experimental outcomes are portrayed in order to prove the effectiveness of the mathematical model which is being developed by us and also analysis the impact of malicious user mainly PUEA in the CRN.All the simulation is performed for the developed model using MATLAB 2018a platform.Figure 2 shows that, a simple model of CRN, SUs deployed in the circular grid (R) network with R = 1 km, R0 = 30 m.The primary user transmitter is located at a distance Dp = 100 km from the secondary users.p) and MU (σ 2 m) transmissions are taken to be 8 dB and 5.5 dB, respectively.The number of MUs are assumed to be randomly distributed around the circular grid.The simulation testing time is set to 10000.The results are carried out by using Matlab 2018a, as well as the theoretical models are shown in figure 2, the PDFs of the received power from the PU transmitter and malicious user transmitter at the SUs as illustrated in figure 4 and figure 5.Both the figures show that the PDFs of the received power from the PU transmitter and malicious user transmitter at the secondary user differ from each other using the NPCH test.The probability of errors (Pf and Pm) are observed and tabulated as shown in table 1, at a different number of the malicious user (MU = 5, 10, and 15) and the radius of outer region R various from 100 m to 1000 m and the radius of primary exclusive region R0 = 30 m as illustrated in the figures 13 and figure 14.When angular region (R) is 100m and malicious users are 5, the probability of false alarm is 0.1176.If we vary the number of malicious users from 5 to 10 or 15, the probability of false alarm increases to 0.1964 and 0.3007 respectively.It is observed that the probability of false alarm increases as the more malicious users present in the network.As we increase the radius of the outer region can reduce the effect of the PUEA on the network.Figure 15, illustrate the probability of false alarm at different malicious users (MU = 5, 10 and 15) present in the network with varying their transmitting range(primary exclusive region 0) from 10 m to 80 m at constant radius of outer region R = 100 m.From this graph, we can observed that the probability of false alarm increases if the primary exclusive region and the number of attackers increases.This is because for a large value of R0, the radius of outer region R tends to be smaller.Therefore, the malicious users become closer to the legitimate secondary users and the total received power from all the malicious users become close to the receiver (legitimate secondary user).
If the radius of outer region R is large, the total received power from the MUs may not be enough to successfully launch a PUEA in the network.From the figure 15 present in network.Hence the proper selection of the network defined angular region radius R and the primary exclusive region radius 0 can reduce the impact of the PUEA in the network.

Conclusion
The Primary User Emulation attack affects the performance of the spectrum sensing process in the cognitive radio networks by imitating as the licensed user.We proposed an analytical model to study the effect of the probability of errors in terms of the probability of false alarm and probability of miss detection based on the NPCH test by varying the range of the radius.In this proposed work we analyze the impact of the PUEA by varying the distance between the licensed user and secondary users, a radius of the secondary users, and also a number of malicious users present in the network.The simulation results show that the probability of false alarm increases due to the number of malicious users increases.It also increases due to decreases in the outer angular radius of the range and increases the radius of the primary exclusive region.Hence the proper selection of the network defined angular region radius R and the primary exclusive region radius 0 can reduce the impact of the PUEA in the network.In the future work will consider two or more primary transmitter to analyze the effect of this attack.

Figure 1 .
Figure 1.PUE Attack Ruilang Chen et.al.(2016), authors proposed a transmitter verification technique using DRT and DDT.These methods employ a position verification scheme to differentiate licensed users and malicious user transmitters.Lianfen Huang et.al.(2010), they proposed joint position verification method is proposed to enhance the positioning accuracy using TDoA and FDoA methods.The combination of energy detection technique and localization technique using TDoA proposed by authors Fan Jin et.al.(2015), in this work, the authors used multiple thresholds for each secondary user to detect a PUE attack.A. Alahmadi et.al.(2013), in this work the authors used a reliable Advanced Encryption Standard (AES) DTV technique for mitigating PUE attack.In this method, they used symmetric-key techniques between transmitters and receivers.The authors led by N. Goergen et.al.(2010) presented a watermarking technique to prevent PUE attacks by using applying watermark signals at the physical layer in CRN.In the method suggested by Z. Yuan et.al.(2012), each secondary user must compute the local function and compatibility function, calculate the message, exchange messages and measure belief to the neighboring user before convergence takes place.The PUE attacker is then detected and the features of the attacker's signal are transmitted to all secondary users on the network.Mahesh Kumar N. et.al.(2020), proposed a spectrum sensing techniques based on Energy detection, Matched filter and feature detection methods to detect the PUEA.

Figure 2 .
Figure 2. Simple System model of CR Networks in Circular grid fashion of R radius and consists legitimate SU and malicious SUs.
the total received power at the SU from all malicious user (MU) is expressed as Eqn.(6) as, distance and shadowing between the j th MU and the legitimate SU respectively.
pr px the probability density function of the received power at the SU receiver from the PU transmitter following a log normal distribution and () () pr px is the probability density function of received power at the SU receiver from malicious users following a log normal distribution.The value of T is comparedTurkish Journal of Computer and Mathematics EducationVol.12No. 11 (2021),[486][487][488][489][490][491][492][493][494][495][496][497][498][499][500] Research Articl with predefined threshold and the SU makes the following decision which is made based on the following the measure: equation (29), NPCH test allows us to decide any one probability either probability of false alarm or probability of miss detection.

Figure. 3 .
Figure. 3. The probability density functions of the received signal

Figure 4 .Figure 5 .
Figure 4. Probability density functions of received power at the secondary user receiver due to PU: () p r P

Figure 6 .
Figure 6.Probability of detection v/s SNR using Energy detection.

Figure 6
Figure6illustrates the probability of detection for different SNR with 10 malicious user.We vary the SNR form 0 to −20 dB.This figure shows that probability of detection is very poor for low SNR using Energy detection technique.We considered SNR = 0 dB to calculate Probability of false alarm and probability of miss detection in this work.Figures7 and figure 8, illustrates the plot for the probability of False alarm and the probability of Miss Detection respectively.The number of malicious users, in this case, is set to be MU = 10, the radius of outer region R = 500 m, Radius of primary exclusive region 0 = 30 m.The transmitting power of the primary user transmitter and malicious user transmitter is taken as  = 100 KW and  = 4 w respectively.Variances of the primary user (σ 2 p) and malicious user (σ 2 m) transmissions are taken to be 8 dB and 5.5 dB, respectively.The simulation time is set to be 500 times and the threshold value (λ) = 2.

Figures 9 ,
Figures 9, 10, 11 and 12 shows the probability of errors rate (probability of false alarm and miss detection rate) at different numbers of malicious users.The radius of outer region R = 500 m, Radius of primary exclusive region 0 = 30 m.The transmitting power of the primary user transmitter and malicious user transmitter is taken as  = 100 Kw and  = 4 w respectively.The threshold values is set to 2. The probability of errors (Pf and Pm) are observed for different values of outer radius (R = 300 m and R = 800 m) with same number of malicious users (MU = 15).

Figure 13 .
Figure 13.Probability of False Alarm with respect to various radius of the angular region (R) and number of malicious users.

Figure 14 .
Figure 14.Probability of Miss Detection with respect to various radius of the angular region (R) and number of malicious users.

Figure 15 .
Figure 15.Probability of false Alarm at different number of malicious user present in the Network.
, shows that the probability of false alarm is less when the malicious user is low (MU = 5) compare to when more malicious users (MU = 10 or MU = 15) are (11)efined in equation (2) and eq(11)is roughly evaluated by log normally distributed random variable with parameters μ x & can 2 where ( ) j

Table 1 .
Probability of Errors with respect to various radius of the outer region(R) and number of malicious users.